Ole provider connection String

N

neogeo

I am trying to read a DBF from ASP.NET page, this is the code that I a
using.....

Dim myConn As Ne
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Dat
Source=C:\capitaltest\data;Expanded Properties=dBase IV")

myConn.Open()

Dim myCommand As New OleDbCommand("Select * from stock", myConn)

Dim reader As OleDbDataReader
reader = myCommand.ExecuteReader()
myConn.Close()

I get the following error ->>> Could not find installable ISAM

If the code is changed to the following...
Dim myConn As Ne
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Dat
Source=C:\capitaltest\data\stock.dbf;")
myConn.Open()

Dim myCommand As New OleDbCommand("Select * from stock", myConn)

reader = myCommand.ExecuteReader()
myConn.Close()

I get this type of error ->>>>
Unrecognized database format 'C:\capitaltest\data\STOCK.DBF'

Can anyone please help!!


-
neoge
 
S

Simon Gorski

Hello Neogeo,
neogeo said:
I am trying to read a DBF from ASP.NET page, this is the code that I am
using.....

Dim myConn As New
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\capitaltest\data;Expanded Properties=dBase IV")

myConn.Open()

Dim myCommand As New OleDbCommand("Select * from stock", myConn)

Dim reader As OleDbDataReader
reader = myCommand.ExecuteReader()
myConn.Close()

I get the following error ->>> Could not find installable ISAM

If the code is changed to the following...
Dim myConn As New
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\capitaltest\data\stock.dbf;")
myConn.Open()

Dim myCommand As New OleDbCommand("Select * from stock", myConn)

reader = myCommand.ExecuteReader()
myConn.Close()

I get this type of error ->>>>
Unrecognized database format 'C:\capitaltest\data\STOCK.DBF'

Can anyone please help!!!

Read
http://dbforums.com/arch/212/2002/11/556668



mfg simon g.
 

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,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top