473,396 Members | 1,917 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,396 software developers and data experts.

Error with ASP.NET opening OleDb/ODBC database

Hi there,

I got a problem using an MS Access database through
ASP.NET.

After updating my system from .NET Framework 1.0 to 1.1,
my existing
application gives me the following error when opening a
connection
with the code below:

"Unspecified error" (ErrorCode: -2147467259)

string connectionStringKey = "LocalDBConnectionString";
string connectionString
= "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\InetPub\wwwroot\IS_Italy_2003\IS.mdb";

OdbcConnection connection = new OdbcConnection
(connectionString);
try
{
connection.Open();
}
catch (OdbcException ex)
{
string error = ex.Message;
}
finally
{
connection.Close();
}

What's really strange is that:
1. The same application works on some of my colleagues'
computers with
the .net Framework 1.1
2. The very same code works on my computer when creating a
brand new
application with VS.NET 2003
3. The same application was working with .NET Framework 1.0

The same thing happens (including the two cases above)
when using ODBC
classes instead of OleDB ones. In this case the connection
string is:

"FIL=MS Access;DSN=AIS_Local"

and the error is:

"ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
Disk or
network error.\r\nERROR [IM006] [Microsoft][ODBC Driver
Manager]
Driver's SQLSetConnectAttr failed\r\nERROR [HY000]
[Microsoft][ODBC
Microsoft Access Driver] Disk or network error."

Need HELP!!!
tks
Nov 17 '05 #1
3 8880
Just to help with a little more info on what might be the
same problem.

http://www.asp.net/Forums/ShowPost.aspx?
tabindex=1&PostID=225749

I have the same problem that I can't access my mdb.
I have enabled p/w on my db but this does not seem to work
for me.

If you solve the problem please post the solution.

Peter
-----Original Message-----
Hi there,

I got a problem using an MS Access database through
ASP.NET.

After updating my system from .NET Framework 1.0 to 1.1,
my existing
application gives me the following error when opening a
connection
with the code below:

"Unspecified error" (ErrorCode: -2147467259)

string connectionStringKey = "LocalDBConnectionString";
string connectionString
= "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\InetPub\wwwroot\IS_Italy_2003\IS.mdb" ;

OdbcConnection connection = new OdbcConnection
(connectionString);
try
{
connection.Open();
}
catch (OdbcException ex)
{
string error = ex.Message;
}
finally
{
connection.Close();
}

What's really strange is that:
1. The same application works on some of my colleagues'
computers with
the .net Framework 1.1
2. The very same code works on my computer when creating abrand new
application with VS.NET 2003
3. The same application was working with .NET Framework 1.0
The same thing happens (including the two cases above)
when using ODBC
classes instead of OleDB ones. In this case the connectionstring is:

"FIL=MS Access;DSN=AIS_Local"

and the error is:

"ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
Disk or
network error.\r\nERROR [IM006] [Microsoft][ODBC Driver
Manager]
Driver's SQLSetConnectAttr failed\r\nERROR [HY000]
[Microsoft][ODBC
Microsoft Access Driver] Disk or network error."

Need HELP!!!
tks
.

Nov 17 '05 #2
Just to help with a little more info on what might be the
same problem.

http://www.asp.net/Forums/ShowPost.aspx?
tabindex=1&PostID=225749

I have the same problem that I can't access my mdb.
I have enabled p/w on my db but this does not seem to work
for me.

If you solve the problem please post the solution.

Peter
-----Original Message-----
Hi there,

I got a problem using an MS Access database through
ASP.NET.

After updating my system from .NET Framework 1.0 to 1.1,
my existing
application gives me the following error when opening a
connection
with the code below:

"Unspecified error" (ErrorCode: -2147467259)

string connectionStringKey = "LocalDBConnectionString";
string connectionString
= "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\InetPub\wwwroot\IS_Italy_2003\IS.mdb" ;

OdbcConnection connection = new OdbcConnection
(connectionString);
try
{
connection.Open();
}
catch (OdbcException ex)
{
string error = ex.Message;
}
finally
{
connection.Close();
}

What's really strange is that:
1. The same application works on some of my colleagues'
computers with
the .net Framework 1.1
2. The very same code works on my computer when creating abrand new
application with VS.NET 2003
3. The same application was working with .NET Framework 1.0
The same thing happens (including the two cases above)
when using ODBC
classes instead of OleDB ones. In this case the connectionstring is:

"FIL=MS Access;DSN=AIS_Local"

and the error is:

"ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
Disk or
network error.\r\nERROR [IM006] [Microsoft][ODBC Driver
Manager]
Driver's SQLSetConnectAttr failed\r\nERROR [HY000]
[Microsoft][ODBC
Microsoft Access Driver] Disk or network error."

Need HELP!!!
tks
.

Nov 17 '05 #3
Hi Peter, I had a similar problem with MSAccess. It was becasuse the ASPNET
user (it seems this is the user that ASP.NET uses) did not have permissions
to read/write ... in the directory I had chosen to place the file. I moved
it into it's own directory and changed the permission to allow ASPNET to do
anything and ... it worked.

I'm using an XP machine. When I clicked on the properties for the folder,
there was no security property. I had to change "folder options" in control
panel away from "simple security" so that I could make this change. Then
after I had it working, I changed "folder options" back to simple security
and it's still working.

That was what I did for my PC. Not necessarily the solution for you.

"Peter" <pe***@myresource.co.uk> wrote in message
news:0b****************************@phx.gbl...
Just to help with a little more info on what might be the
same problem.

http://www.asp.net/Forums/ShowPost.aspx?
tabindex=1&PostID=225749

I have the same problem that I can't access my mdb.
I have enabled p/w on my db but this does not seem to work
for me.

If you solve the problem please post the solution.

Peter
-----Original Message-----
Hi there,

I got a problem using an MS Access database through
ASP.NET.

After updating my system from .NET Framework 1.0 to 1.1,
my existing
application gives me the following error when opening a
connection
with the code below:

"Unspecified error" (ErrorCode: -2147467259)

string connectionStringKey = "LocalDBConnectionString";
string connectionString
= "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\InetPub\wwwroot\IS_Italy_2003\IS.mdb" ;

OdbcConnection connection = new OdbcConnection
(connectionString);
try
{
connection.Open();
}
catch (OdbcException ex)
{
string error = ex.Message;
}
finally
{
connection.Close();
}

What's really strange is that:
1. The same application works on some of my colleagues'
computers with
the .net Framework 1.1
2. The very same code works on my computer when creating

a
brand new
application with VS.NET 2003
3. The same application was working with .NET Framework

1.0

The same thing happens (including the two cases above)
when using ODBC
classes instead of OleDB ones. In this case the

connection
string is:

"FIL=MS Access;DSN=AIS_Local"

and the error is:

"ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
Disk or
network error.\r\nERROR [IM006] [Microsoft][ODBC Driver
Manager]
Driver's SQLSetConnectAttr failed\r\nERROR [HY000]
[Microsoft][ODBC
Microsoft Access Driver] Disk or network error."

Need HELP!!!
tks
.

Nov 17 '05 #4

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

Similar topics

12
by: Grahammer | last post by:
For some reason I am getting an error when trying to open a recordset on an Access database on my Win2K3 machine from my INDEX.ASP page, but the same code accesses the database fine when coming...
1
by: Running | last post by:
I read several MS KB articles but none of then helped. I have a NT4/IIS4 with an ASP application, Crystal 8 installed and a DSN/ODBC poiting to a DB2 database. The database is OK. After a...
15
by: M P | last post by:
What does this mean? I am accessing an ASP page that queries Access Database thru fileDSN. I'm using IIS 5.0 Win2K SP4 Microsoft OLE DB Provider for ODBC Drivers error '80004005' General...
3
by: Thomas Tsang | last post by:
I am using ASP + IIS + MS access, when running the following codes: set Conn=Server.CREATEOBJECT("ADODB.CONNECTION") conn.open "DRIVER={Microsoft Access Driver (*.mdb)}; " &...
5
by: jrefactors | last post by:
My machine is Windows XP with Oracle 9.2 Home; IIS and Oracle are in the same box. I have tried both Oracle OLEDB Provider and Microsoft ODBC For Oracle, but both not working. For Microsoft...
3
by: Mike Wilson | last post by:
Is there a way to open an OLE DB database from within Access? I would like to use the Access GUI with its table and query explorer to examine a database only available through an OLEDB provider...
3
by: Jerry Spence1 | last post by:
I am starting up a number of threads. Each one specifies a connection to the same database. Sub ReaderThread() Dim cn As New System.Data.OleDb.OleDbConnection cn.ConnectionString =...
4
by: coosa | last post by:
Hi, I was installing SQL Server on my machine and during installation my PC freezed. It happens frequently on my machine. So i tried after restarting to install it again and since then i always...
0
by: fniles | last post by:
I am using VB.Net 2003 and MS Access database. Sometimes when I open the database, I got the error "Unspecified error" The application validate users, when it validates users, it reads from a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.