Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 15th, 2003, 11:54 AM
Registered User
 
Join Date: Jul 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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

 
Old July 19th, 2003, 01:50 PM
Registered User
 
Join Date: Jul 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

when I do following

 Console.WriteLine("hello\hello");
I see just hellohello
but I do Like this
 Console.WriteLine("hello\\hello");
I see what I was going to , there is another way to do the
same but I never use it(and could be wrong)
Console.WriteLine(@"hello\hello")
 ___________________
P.S. Check Your Connection_String

 
Old July 24th, 2003, 04:15 PM
Authorized User
 
Join Date: Jun 2003
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I believe your connection string is not correct, the one you have is the OLE connection NOT ODBC, try this,
string connectionstring=@"Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\InetPub\wwwroot\IS_Italy_2003\IS.m db";
If you have the ODBC.Net online help avail type on index for "connectionstring"

Good luck
Kasie

 
Old May 26th, 2004, 07:35 AM
Registered User
 
Join Date: May 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had the same exactly problem and today I didn't found a solution.
Do you had found a solution?
Thanks,
Roberto

Quote:
quote:Originally posted by gdelia1
 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

 
Old May 26th, 2004, 09:28 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Roberto,

I suggest you post your question- in detail- and see if someone can help you.

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old November 4th, 2004, 05:48 PM
Registered User
 
Join Date: Nov 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by r.cicca
 I had the same exactly problem and today I didn't find a solution.
Did you had find a solution?
Thanks,
Abhishek

Quote:
quote:Originally posted by gdelia1
 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

 
Old October 5th, 2005, 01:50 AM
Registered User
 
Join Date: Oct 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have been trying to find this error for couple hours and finally I figured it out!

--->> check your form you may have 2 duplicate input

~Den





Similar Threads
Thread Thread Starter Forum Replies Last Post
MSJet.OLEDB.4.0 reported an error in ASP.NET mdrafi ADO.NET 0 September 12th, 2004 11:09 PM
MSJet.OLEDB.4.0 reported an error in ASP.NET mdrafi Visual Studio 2005 0 September 12th, 2004 11:07 PM
OleDb.Net vs. ODBC.Net for Connecting to Oracle cjo ASP.NET 1.0 and 1.1 Professional 3 January 13th, 2004 07:18 PM
OleDb.Net vs. ODBC.Net for Connecting to Oracle cjo ASP.NET 1.0 and 1.1 Basics 1 December 23rd, 2003 10:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.