Ask a Question related to ASP Database, Design and Development.
-
Michael S #1
ODBC access through ASP .NET page
I have an application where I'm using ODBC connection to query a
database via C#.
I'm sure my connection string and dsn information are correct because
the application works fine when
1) I run it from Visual Studio
2) I create a C# console application and give the .exe full trust using
the .NET configuration wizard.
If I create an ASP .NET web application using C# and the exact same
connection code I get the following error:
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not
found and no default driver specified
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: Microsoft.Data.Odbc.OdbcException: ERROR [IM002]
[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified
Source Error:
An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
Stack Trace:
[OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data
source name not found and no default driver specified]
Microsoft.Data.Odbc.OdbcConnection.Open() +646
Overdue_Items.WebForm1.btnRunOverdueItemsReport_Cl ick(Object sender,
EventArgs e) in c:\inetpub\wwwroot\overdue_items\webform1.aspx.cs: 101
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.Rai
sePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
+33
System.Web.UI.Page.ProcessRequestMain() +1277
I'm assuming that it's a security issue since the console application
works fine but I can't figure out where I have to make the appropriate
security changes for the ASP .NET page to run.
I'm running on Windows Server 2003 with IIS 6.0.
Any advice?
Thanks,
Michael
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Michael S Guest
-
DBI and DBD::ODBC and MS Access
Using Perl and DBI:ODBC with an MS Access database on Windows XP running IIS (Just a getting started guide) Creating the access database: a..... -
ODBC access from aix to a informix db V7.12
Hello! is there anybody who works with a odbc-connection from a aiy maschine to a informix db? because we plan to initiate a... -
[PHP] ODBC for MS Access
I use Linux box + PHP installed on it and want to connect/access MS Access database installed on Windows box. Below are my Questions: 1 What... -
ODBC for MS Access
Dear All, I use Linux box + PHP installed on it and want to connect/access MS Access database installed on Windows box. Below are my Questions:... -
IIS 5.1 and anonymouse access (php & odbc)
Can anyone explain the pros and cons of running IIS 5.1 with Anonymous access turned off ? I am writing a php script which connects to an Access... -
Bob Barrows [MVP] #2
Re: ODBC access through ASP .NET page
Michael S wrote:
This is a classic asp newsgroup. While you may be lucky enough to find a> I have an application where I'm using ODBC connection to query a
> database via C#.
dotnet-savvy person here who can answer your question, you can eliminate the
luck factor by posting your question to an appropriate group. I suggest
microsoft.public.dotnet.framework.adonet.
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Bob Barrows [MVP] Guest



Reply With Quote

