By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,616 Members | 1,190 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,616 IT Pros & Developers. It's quick & easy.

Open and read a .DBF file into a datagrid

P: 3
Hi every one. I'm new to VB .NET and this is my first try of reading in a data.DBF file. After many trial and err, i was able to populate the datagrid with values. but my problem is that I have to open the data.DBF file in excel first before I can use VB to populate it, else I got the error: "External table is not in the expected format"
Any insight thought for this problem?
Apr 9 '07 #1
Share this Question
Share on Google+
1 Reply

P: 3
Never mind, I figured out the problem. I was using the excel com to read the .dbf file, and that was probably the problem.
My connection used to be:
olecon = New OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0; " & _
'"Data Source=" & sSource & " Extended Properties=""Excel 8.0;IMEX=1;HDR=YES""")

Now it is:

olecon = New OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0; " & _
"Data Source=" & sTest & " ;Extended Properties=""dBase III""")
I just run the program and realized i don't have to open the data.dbf in excel before I can open it in visual basic
Apr 11 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.