473,325 Members | 2,480 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,325 software developers and data experts.

ODBC has error but no error message displayed

Hi All..

This is a strange one that I hope someone has come across.

I have an asp.net application that needs to access a flat file databse
via ODBC.

I have setup the OBDC DSN and tested it via EXCEL. It works perfect. I
have setup a Windows 2000 server with the application and DSn and it
works perfect.

The problem is if I try and run the same scenario under Windows XP,
EXCEL can get to the ODBC datasource without a problem, but when you
call up the ASP.NET application, the system plays the CHIME sound and
the web page goes into limbo.

Here is some code. I have tracked it down to the line in code
"myodbc.open()":

DIM ODBCConn As String = "DSN=MOB;"
Dim myodbc As OdbcConnection = New OdbcConnection(ODBCConn)
myodbc.open() <---- here
Dim myobSC As odbcCommand = New odbcCommand(myobSQL, myODBC)
Dim myobDR As odbcDataReader =
myobSC.ExecuteReaderCommandBehavior.CloseConnectio n)
As mentioned it works on all test beds except XP, and yes I have
installed each server components identical (MS ODBC for .NET, MDAC2.7)
etc..

I thought it might have something to do with the Registry Permissions
on the ODBC DNS entry, changed to allow ALL access (as on one test
server, I was getting an error message) but that hasn't seem to do
anything..

Also, as mentioned, Excel can connect to the Datasource on the XP
without a problem, so i know the DSN is setup correctly, and since
this is the same code that works on W2K test servers, the code works..

Can anyone Help?
Nov 17 '05 #1
2 2741
Dont all jump at once...

I have found the problem..

I knew it had to do with a rights issue but where???

What I did was to change the username in the MACHINE.CONFIG file for
the framework from "machine" to "SYSTEM", restarted IIS and from then
on it worked like a charm..

The only thing I would love to find out, is why wasn't any error
shown.

Anyway, there you have it..

Regards,
Robert

rb****@edium.com (Robert Brown) wrote in message news:<bd*************************@posting.google.c om>...
Hi All..

This is a strange one that I hope someone has come across.

I have an asp.net application that needs to access a flat file databse
via ODBC.

I have setup the OBDC DSN and tested it via EXCEL. It works perfect. I
have setup a Windows 2000 server with the application and DSn and it
works perfect.

The problem is if I try and run the same scenario under Windows XP,
EXCEL can get to the ODBC datasource without a problem, but when you
call up the ASP.NET application, the system plays the CHIME sound and
the web page goes into limbo.

Here is some code. I have tracked it down to the line in code
"myodbc.open()":

DIM ODBCConn As String = "DSN=MOB;"
Dim myodbc As OdbcConnection = New OdbcConnection(ODBCConn)
myodbc.open() <---- here
Dim myobSC As odbcCommand = New odbcCommand(myobSQL, myODBC)
Dim myobDR As odbcDataReader =
myobSC.ExecuteReaderCommandBehavior.CloseConnectio n)
As mentioned it works on all test beds except XP, and yes I have
installed each server components identical (MS ODBC for .NET, MDAC2.7)
etc..

I thought it might have something to do with the Registry Permissions
on the ODBC DNS entry, changed to allow ALL access (as on one test
server, I was getting an error message) but that hasn't seem to do
anything..

Also, as mentioned, Excel can connect to the Datasource on the XP
without a problem, so i know the DSN is setup correctly, and since
this is the same code that works on W2K test servers, the code works..

Can anyone Help?

Nov 17 '05 #2
Probably a registry permission sissue. System DSNs are stored in the System
registry.

HTH,

Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
http://www.takempis.com
Big things are made up of
lots of Little things.

"Robert Brown" <rb****@edium.com> wrote in message
news:bd*************************@posting.google.co m...
Dont all jump at once...

I have found the problem..

I knew it had to do with a rights issue but where???

What I did was to change the username in the MACHINE.CONFIG file for
the framework from "machine" to "SYSTEM", restarted IIS and from then
on it worked like a charm..

The only thing I would love to find out, is why wasn't any error
shown.

Anyway, there you have it..

Regards,
Robert

rb****@edium.com (Robert Brown) wrote in message

news:<bd*************************@posting.google.c om>...
Hi All..

This is a strange one that I hope someone has come across.

I have an asp.net application that needs to access a flat file databse
via ODBC.

I have setup the OBDC DSN and tested it via EXCEL. It works perfect. I
have setup a Windows 2000 server with the application and DSn and it
works perfect.

The problem is if I try and run the same scenario under Windows XP,
EXCEL can get to the ODBC datasource without a problem, but when you
call up the ASP.NET application, the system plays the CHIME sound and
the web page goes into limbo.

Here is some code. I have tracked it down to the line in code
"myodbc.open()":

DIM ODBCConn As String = "DSN=MOB;"
Dim myodbc As OdbcConnection = New OdbcConnection(ODBCConn)
myodbc.open() <---- here
Dim myobSC As odbcCommand = New odbcCommand(myobSQL, myODBC)
Dim myobDR As odbcDataReader =
myobSC.ExecuteReaderCommandBehavior.CloseConnectio n)
As mentioned it works on all test beds except XP, and yes I have
installed each server components identical (MS ODBC for .NET, MDAC2.7)
etc..

I thought it might have something to do with the Registry Permissions
on the ODBC DNS entry, changed to allow ALL access (as on one test
server, I was getting an error message) but that hasn't seem to do
anything..

Also, as mentioned, Excel can connect to the Datasource on the XP
without a problem, so i know the DSN is setup correctly, and since
this is the same code that works on W2K test servers, the code works..

Can anyone Help?

Nov 17 '05 #3

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

Similar topics

3
by: Ian | last post by:
We are currently experiencing problems with our Access XP database. We are using access as the front-end and are connecting to Oracle 7.3 via ODBC. Our users are running Win 98 and Win Xp. We are...
3
by: Travis | last post by:
I am trying to display a query like this in my windows form: SELECT workordernumber, date, firstname, lastname FROM customer_db; I am using a rich text box to display the data but it only...
1
by: Jordi | last post by:
Hi, I have a problem when accesing data with and ODBC provider under asp.Net applications. The question is that if I run the application in the same server where data is stored then data is...
1
by: m23 | last post by:
Hi, I have an access application that has been working fine for the past few years.Access 2000 is used for the user interface and Oracle the database. Recently the application was moved to a...
5
by: Jesse Albert | last post by:
Hiyo, I'm trying to import a CSV file into a datatable using either ODBC or OLEDB. One of the columns contains an IP Address. For some reason, the IP address will not display correctly. All of...
2
by: csgraham74 | last post by:
Hello, im using MS Access as a front end to link to MYSQL. although this is possibly an Access issue i thought someone would be able to help me. the error message "ODBC--insert on a linked table...
2
by: teddysnips | last post by:
One of our clients has reported a problem. Everything was working fine on Monday, but since Tuesday all is going wrong. The sysadmin assures me that there have been no changes to the network, or...
7
by: Salad | last post by:
I am converting an application from A97 to A2003. I have 2 tables created by another application as a Foxpro.dbf. The table has no index. The connect string in A97 is FoxPro...
1
by: Roger Trask | last post by:
Web Server: IIS6 PHP Version: 5.2.5 Database: MS SQLEXPRESS 2005 Loaded PDO Drivers: MSSQL, MySQL, ODBC When executing the following script ($dbName, $username, $pw, $myDSN have been changed in...
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
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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.