Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with ODBC connection
Message
From
05/05/2004 09:59:17
Albert Beermann
Piepenbrock Service Gmbh & Cokg
Osnabrück, Germany
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Problem with ODBC connection
Miscellaneous
Thread ID:
00901172
Message ID:
00901172
Views:
51
Hello everbody !

I have a programm that connects me to a database and than starts a form

public p_connection
p_connection = -1
STORE SQLSTRINGCONNECT('dsn=maxdblokal;uid=xxx;pwd=xxx;DATABASE=xxx') to p_connection
if p_connection > 0
messagebox(str(p_connection)) = 1 !!!
do form xyz
=sqldisconnect(0)
endif

When calling
l_sqlcmd = "select * from tablename"
l_error = SQLEXEC(p_connection,l_sqlcmd,"alldata")
browse
in the init event of the form xyz everything is ok !

but when calling the same at the click event of a command button in the form i get a error
connection handle not valid ????????????????????????
the debugger show me, that p_connection = 1 ??????????????

any help welcomed

best regards
Albert
Next
Reply
Map
View

Click here to load this message in the networking platform