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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

show a dbf file in vb pls help as this is my third time asking

Status
Not open for further replies.

Toastie

Programmer
Joined
May 19, 2001
Messages
123
Location
AU
how do i open a dbf in vb or even just make vb open it in excel?
opening it a datagrid and editing it and saving the changes is what i ultumately want to do so can anyone point me towards some info ?????????
 
Try this.

Global gfEXE_DB As ADODB.Connection
Global gfConnectString as String


Dim mySQL as String
Dim rs as new ADODB.Recordset

gfConnectString = &quot;Provider=MSDASQL.1;Extended Properties=DSN=Visual FoxPro Database;SourceDB=<enter location of you tables, ex. C:\temp\ . . .>;SourceType=DBF;Exclusive=No;&quot;

With gfEXE_DB
.ConnectionString = gfConnectString
.Open
End With


In your database close routine

GfEXE_DB.Close
Set gfEXE_DB = Nothing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top