Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connection handle error
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01519893
Message ID:
01519930
Views:
53
This message has been marked as the solution to the initial question of the thread.
>>>>The connection handle is valid and =16
>>>
>>>Than, what is the problem?
>>
>>
>> when i run the code it points to this line and says Data mismatch
>>
>>IF SQLExec(m.Handle, 'SELECT * FROM useraccesscon', 'User')
>>
>>*Handle=SQLCONNECT('Upsize','','',.T.)
>>give the handle error
>>
>>
>>just tested
>>'Upsize','','',.T.
>>
>>it says its valid and =17
>
>Put the whole code here and point where you get the error.
>Maybe you establish the connection somewhere and then handle going out of scope and that is why it is invalid.

SQLExec function returns a number. So, you need to test it with comparing to 0, not just IF SqlExec (...)

E.g.
IF SQLExec(...) < 0 && here we got a problem
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform