General information
Title:
Problem with ODBC connection
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only