Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

dBase + VB2008

dBase + VB2008

dBase + VB2008

I am trying to a Dbase file with a .CDB extension using MS VB2008.
If I change the extension to .DBF everything works fine. I must retain the .CDB extension.
The connection string I am using is:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\folder;Extended Properties=dBASE IV;User ID=Admin;Password=;.

I am told the "Microsoft.Jet" engine will only recognise .DBF

Is there any other connection string I could use ?

RE: dBase + VB2008

Have you tried using ADO, creating a ConnectionString and RecordSet?  Although it's a pain and a bit awkward, it does work once you figure it all out.  Here's how it is done in Visual FoxPro (requires installed Microsoft Office2007 OLE ODBC Access Database Engine):


oConn = CREATEOBJECT("ADODB.Connection")
* set this property:
oConn.Open("Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq="+myPath)
oRSet.Open("SELECT * FROM "+myTable,oConn)
* set these properties:
Be sure to lookup the various property settings on some tutorial sites such as http://www.w3schools.com/ado/default.asp

ADO drivers do have limits and not all ADO features are coded in every driver, for example, Sort does not workin this driver.

Warning from past experience: If appending a record, any dates in those appended records that are referenced in indexes must have non-empty values or the index *always* gets corrupted and has to be reindexed or recreated from within dBase.  Evidently the driver does not know how to handle null dates when manipulating the index.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close