Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UPDATE a text datatype IN SQL
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00518211
Message ID:
00518221
Views:
10
Andrew,

Thanks for helping me sleep. Worked like a charm!! Give yourself three stars. Learned something new about VFP SQLEXEC also. I didn't know you could pass parameters with ?. Thanks again.

Bill


>G'day Bill,
>
>One way to do this would be to create an updatable remote view on the SQL table, do the update in the memo field from the view and then TABLEUPDATE(). Another possibility is to copy the updated contents to a variable and then SQLEXEC something like:
>
SQLEXEC(nConnHandle, 'Update MyTable set MyTextField = ?cUpdateTextFieldContents where KeyField = KeyValue')
>
>Cheers,
>
>Andrew
>
>>I have a table in SQL with a field having a text datatype. The SQL database is administered by a VB Client that I don't have the source for. The text datatype field contains the text (7,300 characters) of a stored procedure that is parsed at runtime to generate a recordset for a crystal report. I have queried the record from VFP into a VFP cursor. I have made the necessary changes and am now trying to update the revised contents to the SQL table from whence it came. I get a -1 on the SQLEXEC. When I try to pass the text to the field, I get an error saying that the text string is greater than 128 characters. When I try to paste this into the SQL Query Analyzer, I get a message that text, and ntext values cannot be passed in the Query Analyzer. I'm trying to figure out how this text ever made it to the table in the first place (probably on an import). Anyway, anyone have any thoughts on how to do this from VFP.
>>
>>I would be eternally grateful after I get about 8 hours continuous sleep after this one.
>>
>>Thanks,
>>
>>Bill
CySolutions, Medical Information Technology
You're only as good as your last
success, so . . .If it works. . .don't fix it!
Previous
Reply
Map
View

Click here to load this message in the networking platform