>Just something I need to know - again!
>
>In the init :
>
>This.DataSource = sqlstringconnect([Driver={Sql Server};Server=localhost;Database=New32;Int Security;])
>
>Now after CURSORFILL() and before doing a TABLEUPDATE() or REQUERY(), if the connection for any reason is broken to SQLSERVER, This.Datasource stays the same value. When I run this code, the CA returns me nothing other than .F. from CursorFill(). And no cursor is created.
>
>How can I check whether the connection is still good without checking whether the cursor is created or the return value?
AFAIK, there is no easy way to see if the connection is still good. If you get a bad return value [i.e., .F.] from a TABLEUPDATE(), the best you can do is check AERROR() return results.
I also never put the connection string as the DataSource. I create the connection programmaticaly and store that handle to a goApp connection property. I then set the DataSource to =goApp.nConnectHandle. Just remember to include the equal sign so the property value is evaluated at runtime instead of treated as just a string.
Mark McCasland
Midlothian, TX USA