Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Equivelant of ? in general field insert
Message
From
30/12/2002 13:23:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
30/12/2002 13:15:29
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00735861
Message ID:
00736652
Views:
14
>>Hi!
>>
>>The variable past "?" is called "parameter" for SQL command(s). When executing, all "?{variable}" are automatically replaced by real values and sent to SQL server. More, these values are replaced in a such way that you can pass really large data (megabytes) using this approach, that is limited when passing data directly as a constant. This way is very useful for saving General and large Memo field data.
>>
>>>Hi,
>>>
>>>If I want to insert a general field (in SPT) to an image field in SQL Serve, I can issue:
>>>
>>>SQLEXEC(lnConnect, [Insert into mytable (ImageField) values (?MyCursor.GeneralField)])
>>>
>>>Question - what is the "?" doing exactly here? Is there a function equivelant of it if I wanted to concatenate the SQL String myself?
>>>
>>>TIA,
>
>The problem is that using the "?" covnerts an SPT Insert statment into an sp_executesql which is in it's own SQL scope. This prevents me from being able to sue scope_identity() to get the identity back from SQL Server.


You could get the identity from 'inserted' cursor.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform