Can I open a .DBF file without the associated .CDX file?

A

Arthur Naoumidis

I have an AS.net web app that I am using to upoload data files into my
application. I am trying to upload a DBF file and I don't have access to
the associated CDX file - is there some option in the OLE Db connection
that will enable me to do this?

My code is:

myConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=" & Server.MapPath("../Uploads") & ";Extended Properties=""DBASE
III;HDR=Yes"""

mySelectQuery = "select * from " & w_file_name

Dim myConnection As New oledbConnection(myConnectionString)
Dim myCommand As New oledbCommand(mySelectQuery, myConnection)
myConnection.Open()
Dim myReader As oledbDataReader = myCommand.ExecuteReader()

Try
While
debug_write(myReader.Item(0))
End While
Finally
myReader.Close()
myConnection.Close()
End Try

I would appreciate any assistance.

Thanks

Arthur
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,810
Latest member
Kassie0918

Latest Threads

Top