473,323 Members | 1,570 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

DSN Connection to Microsoft Access

Hi,

I want to use a DSN connection to connect to MS Access Database. The
ODBC DSN has been configured as MIT.
I use the following connection string to connect (using VB.NET):

Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;
DSN=MIT")

This throws up an error: Could not find installable ISAM
[OleDbException (0x80004005): Could not find installable ISAM.]
System.Data.OleDb.OleDbConnection.ProcessResults(I nt32 hr) +20
System.Data.OleDb.OleDbConnection.InitializeProvid er() +57
System.Data.OleDb.OleDbConnection.Open() +203

Can some one please let me know how to make a DSN connection to
Microsoft Access 2000 database in ASP.NET 1.1?

Thanks in advance,
Sandeep

May 18 '07 #1
12 2108
"Sandeep Gupta" <sa*******@gmail.comwrote in message
news:11**********************@k79g2000hse.googlegr oups.com...
I want to use a DSN connection to connect to MS Access Database.
Why?
Can some one please let me know how to make a DSN connection to
Microsoft Access 2000 database in ASP.NET 1.1?
Is there any reason you're not using OleDb???
--
http://www.markrae.net

May 18 '07 #2

see mark's comment

and

Check your connection string very anally. When "ISAM" pops up , it is 70%
of the time a bad connection string.

ODBC is ..... a thing of the past, and a "last resort cuz I got nothing else
to use".


"Sandeep Gupta" <sa*******@gmail.comwrote in message
news:11**********************@k79g2000hse.googlegr oups.com...
Hi,

I want to use a DSN connection to connect to MS Access Database. The
ODBC DSN has been configured as MIT.
I use the following connection string to connect (using VB.NET):

Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;
DSN=MIT")

This throws up an error: Could not find installable ISAM
[OleDbException (0x80004005): Could not find installable ISAM.]
System.Data.OleDb.OleDbConnection.ProcessResults(I nt32 hr) +20
System.Data.OleDb.OleDbConnection.InitializeProvid er() +57
System.Data.OleDb.OleDbConnection.Open() +203

Can some one please let me know how to make a DSN connection to
Microsoft Access 2000 database in ASP.NET 1.1?

Thanks in advance,
Sandeep

May 18 '07 #3
My web hosting service does not allow me direct OLE DB connections...
for it needs to have physical path to the file. I have tried fetching
the paths from server and using them but it just doesn't work.
On May 18, 12:43 pm, "Mark Rae" <m...@markNOSPAMrae.netwrote:
"Sandeep Gupta" <sandy....@gmail.comwrote in message

news:11**********************@k79g2000hse.googlegr oups.com...
I want to use aDSNconnectionto connect to MSAccessDatabase.

Why?
Can some one please let me know how to make aDSNconnectionto
MicrosoftAccess2000 database in ASP.NET 1.1?

Is there any reason you're not using OleDb???

--http://www.markrae.net

May 18 '07 #4
I checked for the connection string. A search on MSDN reveals that the
error mentioned can crop up if there is any parameter that is not
supported in the connection string or if the parameter needs to be
specified once the connection is specified.

As per MSDN, we cannot use DSN entries with the OLE Jet driver and
hence the error.

- Sandeep
On May 18, 6:27 pm, "sloan" <s...@ipass.netwrote:
see mark's comment

and

Check yourconnectionstring very anally. When "ISAM" pops up , it is 70%
of the time a badconnectionstring.

ODBC is ..... a thing of the past, and a "last resort cuz I got nothing else
to use".

"Sandeep Gupta" <sandy....@gmail.comwrote in message

news:11**********************@k79g2000hse.googlegr oups.com...
Hi,
I want to use aDSNconnectionto connect to MSAccessDatabase. The
ODBCDSNhas been configured as MIT.
I use the followingconnectionstring to connect (using VB.NET):
Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;
DSN=MIT")
This throws up an error: Could not find installable ISAM
[OleDbException (0x80004005): Could not find installable ISAM.]
System.Data.OleDb.OleDbConnection.ProcessResults(I nt32 hr) +20
System.Data.OleDb.OleDbConnection.InitializeProvid er() +57
System.Data.OleDb.OleDbConnection.Open() +203
Can some one please let me know how to make aDSNconnectionto
MicrosoftAccess2000 database in ASP.NET 1.1?
Thanks in advance,
Sandeep

May 18 '07 #5
"Sandeep Gupta" <sa*******@gmail.comwrote in message
news:11**********************@h2g2000hsg.googlegro ups.com...
My web hosting service does not allow me direct OLE DB connections...
for it needs to have physical path to the file. I have tried fetching
the paths from server and using them but it just doesn't work.
That makes no sense at all...

http://www.connectionstrings.com/?carrier=access
--
http://www.markrae.net

May 18 '07 #6
"Sandeep Gupta" <sa*******@gmail.comwrote in message
news:11**********************@e65g2000hsc.googlegr oups.com...
As per MSDN, we cannot use DSN entries with the OLE Jet driver and
hence the error.
Why on earth would you need to...?
http://www.connectionstrings.com/?carrier=access

--
http://www.markrae.net

May 18 '07 #7
Mark,

I am using the following code:

Dim conn as String = "Provider=Microsoft.Jet.OLEDB.4.0; DataSource=" +
Server.MapPath(".") + "\Data\MIT.db"
Dim cn As New OleDbConnection(conn)

Now the Server.MapPath(".") returns d:\host\mit\www, which build my
connection string to be
d:\host\mit\www\data\mit.db

While connecting using cn.open() i get a file not found error. I have
configured a DSN for the database using my host control panel,
and while connecting using the DSN it is connecting fine.

But as the DSN thing is not recommended for connecting to Microsoft
Access, I am trying to figure out a way to connect to my database
using the Jet OleDB driver.

Thanks,
Sandeep

On May 18, 8:23 pm, "Mark Rae" <m...@markNOSPAMrae.netwrote:
"Sandeep Gupta" <sandy....@gmail.comwrote in message

news:11**********************@e65g2000hsc.googlegr oups.com...
As per MSDN, we cannot use DSN entries with the OLE Jet driver and
hence the error.

Why on earth would you need to...?http://www.connectionstrings.com/?carrier=access

--http://www.markrae.net

May 23 '07 #8
"Sandeep Gupta" <sa*******@gmail.comwrote in message
news:11**********************@p77g2000hsh.googlegr oups.com...
Dim conn as String = "Provider=Microsoft.Jet.OLEDB.4.0; DataSource=" +
Server.MapPath(".") + "\Data\MIT.db"
Dim cn As New OleDbConnection(conn)

Now the Server.MapPath(".") returns d:\host\mit\www, which build my
connection string to be d:\host\mit\www\data\mit.db
A couple of further questions:

1) Is 'd:\host\mit\www\data\mit.db' actually correct...?

2) What is MIT.db? It doesn't appear to be a Jet database from the file
extension...
While connecting using cn.open() i get a file not found error.
See 1) above...
--
http://www.markrae.net

May 23 '07 #9
Mark,

The path for the database file "d:\host\mit\www\data\mit.mdb" is
actually been constructed on the fly using the Server.MapPath()

And, about the extension, sorry, that was actually a typographical
error. It is actually MDB (the extension of Microsoft Access)

Thanks,
Sandeep Gupta

On May 23, 12:18 pm, "Mark Rae" <m...@markNOSPAMrae.netwrote:
"Sandeep Gupta" <sandy....@gmail.comwrote in message

news:11**********************@p77g2000hsh.googlegr oups.com...
Dim conn as String = "Provider=Microsoft.Jet.OLEDB.4.0; DataSource=" +
Server.MapPath(".") + "\Data\MIT.db"
Dim cn As New OleDbConnection(conn)
Now the Server.MapPath(".") returns d:\host\mit\www, which build my
connection string to be d:\host\mit\www\data\mit.db

A couple of further questions:

1) Is 'd:\host\mit\www\data\mit.db' actually correct...?

2) What is MIT.db? It doesn't appear to be a Jet database from the file
extension...
While connecting using cn.open() i get a file not found error.

See 1) above...

--http://www.markrae.net

May 24 '07 #10
"Sandeep Gupta" <sa*******@gmail.comwrote in message
news:11**********************@h2g2000hsg.googlegro ups.com...
The path for the database file "d:\host\mit\www\data\mit.mdb" is
actually been constructed on the fly using the Server.MapPath()
Yes, but is it actually *correct*? Does the database file actually exist in
that folder?
And, about the extension, sorry, that was actually a typographical
error. It is actually MDB (the extension of Microsoft Access)
And does the account that ASP.NET is running under have write permissions on
that folder?
When a Jet database is opened, it creates a corresponding "locking" (.ldb)
file in the same folder...
--
http://www.markrae.net

May 24 '07 #11
Mark,

Thanks a lot. The issue was of write permission for the ASP.NET
account.
I got it resolved from my HOST.

Thanks a lot again.
Sandeep Gupta
On May 24, 12:01 pm, "Mark Rae" <m...@markNOSPAMrae.netwrote:
"Sandeep Gupta" <sandy....@gmail.comwrote in message

news:11**********************@h2g2000hsg.googlegro ups.com...
The path for the database file "d:\host\mit\www\data\mit.mdb" is
actually been constructed on the fly using the Server.MapPath()

Yes, but is it actually *correct*? Does the database file actually exist in
that folder?
And, about the extension, sorry, that was actually a typographical
error. It is actually MDB (the extension of Microsoft Access)

And does the account that ASP.NET is running under have write permissions on
that folder?
When a Jet database is opened, it creates a corresponding "locking" (.ldb)
file in the same folder...

--http://www.markrae.net

May 25 '07 #12
"Sandeep Gupta" <sa*******@gmail.comwrote in message
news:11**********************@x35g2000prf.googlegr oups.com...
Thanks a lot. The issue was of write permission for the ASP.NET
account.
Aha - it's a common problem with Jet databases...
I got it resolved from my HOST.
Cool.
Thanks a lot again.
NP.
--
http://www.markrae.net

May 25 '07 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Tee | last post by:
Hi, I need some help here for DSN connection string. I know it's not recommended to use DSN, even I dont like it as well ... but for now, my situation is I am using a shared hosting. I do not...
18
by: WStoreyII | last post by:
I am making a asp page that will run on my computer by iis. But the problem is the database in on a web server. I can not seem to get the connection to work for it though here his the connection...
7
by: Gary Brizard | last post by:
OK. For an n-tier architecture, where is the best place to store the connection string for the DA layer? I don't want to use the reg. Can't use a app.config for a dll. For other projects I...
26
by: Rajeev Tipnis | last post by:
http://support.microsoft.com/default.aspx?scid=kb;en- us;819450 Questions: 1) Is this patch (fix) applicable to the .NET 1.1 Framework as well? That is, if we have Framework 1.1 (On...
14
by: WebMatrix | last post by:
Hello, I have developed a web application that connects to 2 different database servers. The connection strings with db username + password are stored in web.config file. After a code review,...
10
by: cleo | last post by:
I am migrating from VB6/Access to Visual Basic and SQL Express. I have success writing test code on my local machine and am now setting up tests for deployment to a server. I have installed SQL...
6
by: Mike | last post by:
We are intermitantly receiving this error on our website. ExecuteReader requires an open and available Connection. The connection's current state is connecting. Following is the code from the Load...
16
by: crbd98 | last post by:
Hello All, Some time ago, I implemented a data access layer that included a simple connectin pool. At the time, I did it all by myself: I created N connections, each connection associated with...
20
by: fniles | last post by:
I am using VS2003 and connecting to MS Access database. When using a connection pooling (every time I open the OLEDBCONNECTION I use the exact matching connection string), 1. how can I know how...
6
Cintury
by: Cintury | last post by:
Hi all, I've developed a mobile application for windows mobile 5.0 that has been in use for a while (1 year and a couple of months). It was developed in visual studios 2005 with a back-end sql...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.