Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CA Builder How to Mark McCasland Please
Message
From
15/11/2003 23:45:43
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00848600
Message ID:
00850382
Views:
30
Thanks Mark

Can't wait for the spBuilder addon!!

>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform