Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange Error Message
Message
 
To
25/03/2011 13:29:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01504918
Message ID:
01505014
Views:
42
>>Rich,
>>
>>
>>* Your code:
>>IF EMPTY(tcSql)  && Processing via an SQLPREPARE() statement
>>	tcSql = " "   && So Error Routine has character value
>>	lnResult = SQLEXEC(tnConnection)                                 &&     ?????
>>
>>
>>What does it mean? What is exatly tnConnection? And what is your sqlprepare line looks like?
>
>From the help:
>"SQLPREPARE( ) sends the SQL statement to the data source where it is compiled for faster execution. After the SQL statement is compiled, it can be executed with SQLEXEC( ). If SQLEXEC( ) is used to execute a SQL statement prepared with SQLPREPARE( ), only the statement handle is required in SQLEXEC( )."
>
>
>In my case it could be something like
>lcSql = "UPDATE myTable SET myField = ?myValue WHERE pk = ?mypk"
>IF oDataClass.prepare(tnConnection,lcSql)
>  SCAN
>    mypk = table.pk
>    myvalue = table.value
>    IF NOT oDataClass.sql_execute(tnConnection,lcSql)
>      ** Error Handling Code
>    ENDIF
>  ENDSCAN
>ELSE
>  ** Error Handling Code
>ENDIF
>
>***oDataClass.prepare
>LPARAMETERS tnConnection,tcSql
>=SQLPREPARE(tnConnection,tcSql)
>** With appropriate error handling
>
Probably I still missing something. So, just in case:
You have prepared statement with valid not empty lcSQL. Is parameter tcSql supposed to be lcSql?
If so, is it possible that for some reason tcSql appeared empty instead of expected lcSql ?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform