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

Access 2000 OleDbConnection ISAM issue

Status
Not open for further replies.

ChainsawJoe

Programmer
Dec 5, 2000
154
GB
Greetings all!

I'm having some issues just connecting to an Access 2k db in .NET using C#.

Using this deeaaddd basic code (that's probably TOTALLY flawed)
Code:
protected OleDbConnection oCon	= new OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;DataSource="+ sDBLocation + ";");
(where
Code:
sDBlocation
is the location of the DB)

When I attempt to
Code:
Open()
it I get this error:
Code:
Connection Failed: System.Data.OleDb.OleDbException: Could not find installable ISAM

Apparantly this is caused by superfluous junk in the connection string - but I can't cut it down any more than it already is!! On that topic - can I still chuck in "PWD=blahblah;" at the end (I thought that's what was killing it initially, but removing it didn't change any errors...)?

PLEASE - what's causing this damned error?! All I want to do is connect to an Access 2k db and do the simplest of queries! aarrrrgghhh!!!

thanksbye!

ps - merry new year!

--------------------------------------------------
- better than toast.
Penguins - better than --------------------------------------------------
 
hahahahaaaaaa....

Code:
protected OleDbConnection oCon    = new OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source="+ sDBLocation + ";");

Needed a space in
Code:
Data Source
... :mad:

However - I now get:
Code:
Cannot start your application. The workgroup information file is missing or opened exclusively by another user

No-one has the db open, and the db has all the necessary access/security defined (and then some more! IWAM, IUSER, ASP.NET etc..).

any clues people? I really REALLY don't want to have to create a workgroup file - is there any way I can continue without one?!

--------------------------------------------------
- better than toast.
Penguins - better than --------------------------------------------------
 
ok - sorted that one too now... damn this new syntax malarky.

I had to use:
Code:
"PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source="+ sDBLocation + ";Jet OLEDB:Database Password=password";

in order to use a password... duh... who'da thunk?!

;)

--------------------------------------------------
- better than toast.
Penguins - better than --------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top