Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server, VFP and corrupted cursors
Message
From
18/06/1998 12:42:07
Bob Lucas
The WordWare Agency
Alberta, Canada
 
 
To
18/06/1998 12:27:57
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00109041
Message ID:
00109554
Views:
27
>>I don't very often query the result sets, if that is what you are doing. Are the joins against all local tables or are they also using remote views?
>
>We are not using remote views. We are using calls to stored
>procedures to extract data from reference tables and using these
>fox cursors to validate data. After the SQL SP calls we do not
>use SQL Server or remote views - all data from then on is Fox tables
>or cursors from SQL Server.

Do you know for certain that the initial retrieval of data through SQL passthrough is okay? I noticed our problem when I tried browsing some of the retrieved data and the field data was pretty messed up. This occured early in the project and I know it was ODBC related but I can't remember if it was fixed by a new driver or by one of the SQL options on the ODBC datasource. I remember it was important for the app to work that the datasource had to be properly configured and I went so far that when the user logged in, the first thing I did was update their ODBC datasource through registry calls to set the flags appropriately before even opening the first cursor.

This is the code I used EVERY time they login, so I can always be sure of the settings of the datasource.

lcRegistryKey = "SOFTWARE\ODBC\ODBC.INI\" + lcDataSource
*-- HKEY_CURRENT_USER value is -2147483647 && bitset(0,31)+1
lcDatabase = goApp.oSystemSetting.Get(lcRegistryKey, 'Database', '', HKEY_CURRENT_USER)
lcAnsiNPW = goApp.oSystemSetting.Get(lcRegistryKey, 'AnsiNPW', 'No', HKEY_CURRENT_USER)

IF PROPER(lcAnsiNPW) # "No"
goApp.oSystemSetting.Set(lcRegistryKey, 'AnsiNPW', 'No', HKEY_CURRENT_USER)
ENDIF

lcOemtoAnsi = goApp.oSystemSetting.Get(lcRegistryKey, 'OemtoAnsi', 'No', HKEY_CURRENT_USER)

IF PROPER(lcOemtoAnsi) # "No"
goApp.oSystemSetting.Set(lcRegistryKey, 'OemtoAnsi', 'No', HKEY_CURRENT_USER)
ENDIF

lcQuotedID = goApp.oSystemSetting.Get(lcRegistryKey, 'QuotedID', 'Yes', HKEY_CURRENT_USER)

IF PROPER(lcQuotedID) # "No"
goApp.oSystemSetting.Set(lcRegistryKey, 'QuotedID', 'No', HKEY_CURRENT_USER)
ENDIF

lcUseProcForPrepare = goApp.oSystemSetting.Get(lcRegistryKey, 'UseProcForPrepare', 'Yes', HKEY_CURRENT_USER)

IF PROPER(lcUseProcForPrepare) # "Yes"
goApp.oSystemSetting.Set(lcRegistryKey, 'UseProcForPrepare', 'Yes', HKEY_CURRENT_USER)
ENDIF
Previous
Reply
Map
View

Click here to load this message in the networking platform