Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 15th, 2003, 11:54 AM
Registered User
 
Join Date: Jul 2003
Location: , , .
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

Reply With Quote
  #2 (permalink)  
Old July 19th, 2003, 01:50 PM
Registered User
 
Join Date: Jul 2003
Location: , , .
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

Reply With Quote
  #3 (permalink)  
Old July 24th, 2003, 04:15 PM
Authorized User
 
Join Date: Jun 2003
Location: Crowland, Lincs, United Kingdom.
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

Reply With Quote
  #4 (permalink)  
Old May 26th, 2004, 07:35 AM
Registered User
 
Join Date: May 2004
Location: , , .
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

Reply With Quote
  #5 (permalink)  
Old May 26th, 2004, 09:28 AM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,102
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
Reply With Quote
  #6 (permalink)  
Old November 4th, 2004, 05:48 PM
Registered User
 
Join Date: Nov 2004
Location: , , .
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

Reply With Quote
  #7 (permalink)  
Old October 5th, 2005, 01:50 AM
Registered User
 
Join Date: Oct 2005
Location: , , .
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 10:10 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.