I am new to FoxPro and still trying to some of the basics.
I am trying to connect to a FoxPro table from within a FoxPro application (VFP 6). I am doing this so that I can use the SQLEXEC() function to execute an SQL String that was built with a bunch of Logic statements.
STORE SQLCONNECT('db_data') TO gnConnHandle
SQLEXEC(gnConnHandle, str_sql, 'MyCursor')
SQLDISCONNECT(gnConnHandle)
//db_data is my generic text FoxPro database.
//str_sql is my Characeter String Variable with my SQL statement.
This worked once perfectly. However, when I re-opened the form that was giving this command, I would get an error stating "Connection handle is invalid". I modified the SQLCONNECT statement to have the full path for the connection including the .dbc at the end. This worked well until I closed and re-opened the form. Then I got the same error as above.
Any Ideas as to why this I am getting this result?
I am trying to connect to a FoxPro table from within a FoxPro application (VFP 6). I am doing this so that I can use the SQLEXEC() function to execute an SQL String that was built with a bunch of Logic statements.
STORE SQLCONNECT('db_data') TO gnConnHandle
SQLEXEC(gnConnHandle, str_sql, 'MyCursor')
SQLDISCONNECT(gnConnHandle)
//db_data is my generic text FoxPro database.
//str_sql is my Characeter String Variable with my SQL statement.
This worked once perfectly. However, when I re-opened the form that was giving this command, I would get an error stating "Connection handle is invalid". I modified the SQLCONNECT statement to have the full path for the connection including the .dbc at the end. This worked well until I closed and re-opened the form. Then I got the same error as above.
Any Ideas as to why this I am getting this result?