Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Big strings
Message
From
02/07/2007 13:09:29
 
 
To
02/07/2007 08:46:52
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
MySQL
Miscellaneous
Thread ID:
01237101
Message ID:
01237170
Views:
18
>>Hi..
>>
>>If the variable 'lcvalues' on the following expression gets a big size.. only truncate and the sql expression is not accepted..
>>
>>Does anyone, could share any solution to concatenate it..
>>
>>
>>lcsqlstring  = "INSERT INTO " + lctable + " ( " + lcsqlfields + " ) VALUES (" + lcvalues + ")"
>>
>>
>>TIA
>>
>>Claudio
>
>You can change your approach and use INSERT ... From Name oObject. This way it will never be too long expression.


Another option would be to break the statement up as follows:
lcsqlstring  = "INSERT INTO " + lctable + " ( " 
   lcSQlString = lcSqlString + lcsqlfields + " ) VALUES ("
   lcSQlString = lcSqlString + lcvalues + ")"
This can be broken up even further, if you continue having problems.

However, IMO, Borislav's solution would probably be the best way to go.
Carsten M. Thode
Previous
Reply
Map
View

Click here to load this message in the networking platform