|
-
Jun 5th, 2006, 08:11 PM
#1
Thread Starter
Junior Member
[RESOLVED] [2005] Simple: Querying/opening a DBF (db3 fox pro) file
pretty new to vb.net here 
I was never much good at database programming either since I never had to do much of it. Now I find myself searching and not learning much online even though I see tons of "resources" everywhere. I am not grasping it I guess.
I simply had an old database .DBF file (db3 foxpro I think, not 100%) and I need to open and get just three columns/tables from it: EMPNUM, FNAME, and LNAME.
So far, I have:
VB Code:
Const CONNECTION_STRING As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\flags\;Extended Properties=dBASE IV;User ID=Admin;Password="
Dim connection As New OleDb.OleDbConnection
connection.ConnectionString = String.Format(CONNECTION_STRING, "C:\temp\employee.dbf")
connection.Open()
And that finally produces no errors since I did a little research and got the right "connection string" for my type of database.
Now, supposedly, from this point forward from what I've read, the actual pulling of information after opening the file should be the same as most of the other database querying done in .net. However, I am unsure of how to do it even if it is the same as the other database types.
I will take the data however I can get it. An Array or just dumped into a variable that I can parse through will be fine. Once I have the data, I predict I'll be fine. Just pulling the data from this database is proving way harder than I thought.
Employee.dbf has no PW on it. I can open and view the file with a program called "Database Desktop 7.0" and edit it there, etc. (much like MS Access). employee.dbf contains about 2 dozen or so columns/tables, but only about 20 rows. This will be different for each employee.dbf I access though, so I has to just pull the 20 rows or however many it has. The employee.dbf file I have comes accompanied by an employee.ndx file that I am not sure if it needs or not...but its there.
Thanks for any input!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|