If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > DBase and ADO

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-25-03, 16:30
badge0913 badge0913 is offline
Registered User
 
Join Date: Mar 2003
Posts: 1
DBase and ADO

I'm trying to connect to DBase IV files using ADO. I'm using VB 6 and I have the following code:

Public g_objConn As ADODB.Connection

Dim sConnectString As String

Set g_objConn = New ADODB.Connection

sConnectString = "Driver={Microsoft dBase Driver (*.dbf)};DriverID=277;Dbq=c:\dx\dbfs;"

g_objConn.Open sConnectString

When it tries to make the connection I get a "SQLSetConnectAttr failed" error message. The connection string I assume is correct because I went to a few different sites that had examples and they all had the same connection string. I have the ODBC driver installed, the directory I'm specifing is valid with DBF files. I don't know what I'm missing here. Thanks in advance!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On