Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ODBC has error but no error message displayed

Reply
Thread Tools

ODBC has error but no error message displayed

 
 
Robert Brown
Guest
Posts: n/a
 
      07-02-2003
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?
 
Reply With Quote
 
 
 
 
Robert Brown
Guest
Posts: n/a
 
      07-03-2003
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



http://www.velocityreviews.com/forums/(E-Mail Removed) (Robert Brown) wrote in message news:<(E-Mail Removed) 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?

 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      07-03-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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
>
>
>
> (E-Mail Removed) (Robert Brown) wrote in message

news:<(E-Mail Removed) 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?



 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Japanese Text not displayed on Image Generated by Servlet on winXP, Linux but displayed on Win2000 boney Java 1 12-15-2006 02:24 PM
Re: The ODBC resource DLL is a different version than the ODBC driver manager tenkbabe@yahoo.com Computer Support 0 10-16-2006 01:11 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xffc Thread 0x228 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 0 03-30-2006 03:16 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 1 03-24-2006 04:20 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 0 03-24-2006 02:22 PM



Advertisments