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:
01505009
Views:
32
>>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
>
Yuri question is what happens when you don't pass lcSQL? Are you passing the handle in this case?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform