Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invalid Connection Handle in CA...
Message
 
 
To
30/05/2003 17:29:50
Peter Wagner
Point Informática Ltda.
Limeira, Brazil
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00794772
Message ID:
00794813
Views:
9
>Problem With CA....
>I have APP where I create an object (oODBC) and store a connection handle in a propertie called nID when I call a Form with a CA, in the CursorFill event it returns .F.
>I capture the error with AERROR() and it return's me the error 1466 - connection handle supplied is invalid.
>I cant understand this, its an handle of a SQLSTRINGCONNECT() function that is stored in the Prop. nID in oODBC
>
>I made a test with a Form with the same CA, and in a prg created a connection and when I called the Form, it worked.
>
>PUBLIC nID
>cStringConnect =("DRIVER={SQL Server};SERVER=BOSS700;UID=sa;PWD=sa;DATABASE=Vitoria;Network=DBMSSOCN")
>nID = SQLStringConnect(cStringConnect)
>DO FORM ca_vitoria_teste
>
Your code above states:

nID = SQLStringConnect(cStringConnect)

Yet your DataSource property is set to oODBC.nID

Based on that, you should modify your code to state:

oODBC.nID = SQLStringConnect(cStringConnect)

Then you will not need the PUBLIC nID statement. I am also assuming the oODBC object remains in scope throughout the life of your App.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform