Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connection handle error
Message
 
 
To
02/08/2011 14:08:45
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01519893
Message ID:
01519934
Views:
36
>ok
>but i should mention that i have the connection string in a "connection" named Upsize
>
>
>Handle=SQLCONNECT('Upsize','','',.T.)
>
>IF SQLExec(m.Handle, 'SELECT * FROM useraccesscon', 'User')
>  browse
>   MESSAGEBOX("Success")
>ELSE
>	MESSAGEBOX("Failed")
>   
>ENDIF
>
>
>Resulting Error / Handle is invalid
>
>Handle = SQLSTRINGCONNECT("DSN=dpsal;UID=Josephine;APP=Microsoft Visual FoxPro;WSID=HP6PQ8;DATABASE=RemoteAccess;Network=DBMSLPCN;Address=HP6PQ8\SQLEXPRESS,1433;
>Trusted_Connection=Yes;Regional=Yes;UseProcForPrepare=0")
>
>
>IF SQLExec(m.Handle, 'SELECT * FROM useraccesscon', 'User')
>  browse
>   MESSAGEBOX("Success")
>ELSE
>	MESSAGEBOX("Failed")
>   
>ENDIF
>
>
>REsulting Error / Data type Mis-match
>
>the error points to the following line
>
>
>IF SQLExec(m.Handle, 'SELECT * FROM useraccesscon', 'User')
>
Did you read my last comment? This line of code is incorrect because SQLExec returns a number, not a logical value.
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