I'm using VB 6.0 and interfacing with Visual FoxPro DBF tables in order to retrieve data. I've created a datagrid to display the data to users and allow them to edit it. The code works fine on my development machine, but the code bombs on other machines with the error of "Data Provider or other service returned an E_FAIL status. So far, nothing on the web has helped. Any ideas???
Code follows:
Private Sub Form_Load()
Dim db As Connection
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "DSN=Visual FoxPro Tables;UID=;PWD=;SourceDB=L:\VisualBasic\MarketingRatesDevelopment;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;"
Set adoPrimaryRS = New Recordset
'Errors out on next line
adoPrimaryRS.Open "select * from Incentive order by Incen_code", db, adOpenStatic, adLockOptimistic
Set grdDataGrid.DataSource = adoPrimaryRS
grdDataGrid.AllowUpdate = False
Code follows:
Private Sub Form_Load()
Dim db As Connection
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "DSN=Visual FoxPro Tables;UID=;PWD=;SourceDB=L:\VisualBasic\MarketingRatesDevelopment;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;"
Set adoPrimaryRS = New Recordset
'Errors out on next line
adoPrimaryRS.Open "select * from Incentive order by Incen_code", db, adOpenStatic, adLockOptimistic
Set grdDataGrid.DataSource = adoPrimaryRS
grdDataGrid.AllowUpdate = False