Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
254 character limitiation on strings sent to sql..
Message
 
 
To
18/06/2001 16:42:52
Frank Cavone
Monetary Management of Ny, Inc.
Albany, New York, United States
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00520766
Message ID:
00520845
Views:
22
Frank,

What specific error are you getting? One from VFP or one from sql server?

Remember that in VFP no single string constant can be longer that 254 characters, string memvars are limited by available memory, SPT strings have like an 8k limit but I think there's a sys() function call that increases that buffer size.

Since constants are limited in size you typically have to add several constants together:
lcSQL = "select <i>(no more than 254 characters)</i> " + ;
   " from TheTable" + ;
   " where ... "

SQLExec( lnHandle, lcSQL )
>i am sending query stings to sql server to bring back cursors for my reports. when the string is 254 characters or less it runs fine but otherwise it bombs out. has anyone else had this problem, and/or is their a workaround for it
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform