Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UPDATE a text datatype
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00518209
Message ID:
00520505
Views:
15
This message has been marked as the solution to the initial question of the thread.
Hi!

For VFP, do following:

nHandle=SQLConnect(...)
* or use SQLStringConnect("Driver=SQL Server;Serevr=MYSERVER;UID=sa;PWD+Password;Database=MyData;")
cText="Some very very long text..."
? SQLEXEC(nHandle,'UPDATE MyTable SET MyTable.TextField = ?cText')
&& ? reads the VFP variable as a parameter, the parameter could be a text of length up to 2GB
&& now if SQLEXEC returns -1, use aerror() function to see what error is returned from SQl Server

HTH.

>I have asked this another way in another thread but after doing some reading and testing I can refine my problem.
>
>I have a table with a text datatype field. The field presently contains all of the language for a stored procedure run by a VB client to generate a recordset for a report at runtime. I need to modify the language of this field. I cannot do it from the Query Analyzer because you cannot use ntext or text datatype in a Query Analyzer query. I try and run this from VFP with a SQLExec statement (where I retrieved the value of the field that was modified in the first place) and upon trying to update the field I retrieved, I get a -1 returned (meaning that it failed). I try and run it from Access 2000 using the SQLSpecific query screen and I get the same error as the Query Analyzer error. How do you get all of the text into the field programatically once you can get the field to a variable? FYI, the length of the field is 7263 characters, which is under the varchar(8000) limit, if that means anything.
>
>Thanks,
>
>Bill
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform