Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Provider returned an E_FAIL status

Status
Not open for further replies.

IBSkippy

Programmer
Aug 7, 2000
12
0
0
US
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
 
yes..

did you map L: on the target machine????
because it will always look for L: and database in it... and if it doesnt find L: then it will give error
 
Of course I mapped the L:\ drive. The problem lay in the version of the FoxPro drivers that were installed on the target machine. I just went to MSDN and downloaded the drivers. Thanks for your help though!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top