Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL passthrough when error is a unique key violation.
Message
From
02/06/2001 06:11:50
 
 
To
01/06/2001 15:58:12
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00512889
Message ID:
00514164
Views:
14
William,
? is a parameter and ?@ is an output parameter. Could it be that there's *also* a unique key violation when you attempt to add a record to the error table? This is just a wild guess.

FWIW, this is what VFP help says about output parameters:

Defining Parameters
The syntax for output parameters is:

?@parameter_name

When you implement input/output parameters, define the Visual FoxPro variables you want to include in your SQL pass-through command before you use the variables in the SQL statement. To successfully send and receive information with input/output parameters, you must define:

A stored procedure parameter, with an output type, that returns a value.
For example, if your stored procedure parameter is @result, you must assign an output type, such as int, to @result, and you must assign a value to @result.

An output parameter (@parameter_name) expression that evaluates to an existing Visual FoxPro variable.
For example, if your output parameter expression is ?@outParam, your application must have defined the Visual FoxPro variable outParam.

Note If you don't use an output parameter, either in Visual FoxPro or in the stored procedure, or you don't define a Visual FoxPro variable to receive the return value, the Visual FoxPro parameter value will not change.


>Daniel, I see what you have done, this is exactly what I do.
>
>Question: Why do you use the @ and ?, I just pass the parameters.
Daniel
Previous
Reply
Map
View

Click here to load this message in the networking platform