[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.odbcnet

RE: ODBC.Net works only on release version

(Steven Bras [MS])

3/4/2002 5:55:00 PM

2 Answers

Fredrick Bartlett

3/5/2002 4:24:00 PM

0

I don't have an authentication issue. I *can* connect to SQL Server using
Micsosoft.Data.Odbc and an Odbc Data Source. The problem is using a MySQL
Data Source. I get the following error...

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found
and no default driver specified

Whats more...

I am having this issue with regular ".asp" as well. All ".asp" and ".aspx"
pages using MySQL DSN and DNS-less are raising this error. My drivers are
installed correctly. I can use them successfully from Win Forms and other
applications. I am able to repete this bug on all my my PC's. Here is the
.asp error...

a.. Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default
driver specified
/SupplyOrders/TMP2gv25shfzt.asp, line 232


The above occurs on all PC's that have Visual Studio (Release) only. This is
a repeatable bug/problem. If do a fresh install of *just* the Framework I
don't have this problem. Here is the entire .aspx error...

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:

Line 37: OdbcDataAdapter myCommand = new OdbcDataAdapter(SQL,
myConnection);
Line 38: DataSet ds = new DataSet();
Line 39: myCommand.Fill(ds, "sfcform");
Line 40: this.DataGrid1.DataSource=ds.Tables["sfcform"].DefaultView;
Line 41: this.DataGrid1.DataBind();


Source File: c:\inetpub\wwwroot\forms1\webform1.aspx.cs Line: 39

Stack Trace:

[OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source
name not found and no default driver specified]
Microsoft.Data.Odbc.OdbcConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
ConnectionState& originalState)
System.Data.Common.DbDataAdapter.Fill(Object data, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
Forms1.WebForm1.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\forms1\webform1.aspx.cs:39
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +29
System.Web.UI.Page.ProcessRequestMain() +724

"Steven Bras [MS]" <stevenbr@online.microsoft.com> wrote in message
news:QSS2D25wBHA.2496@cpmsftngxa07...
> This is most likely due to a change in security since beta 2; the
following
> Knowledge Base articles give details on setting up security for ASP pages:
>
> Q315736 HOW TO: Secure an ASP.NET Application by Using Windows Security
> http://support.microsoft.com/default.aspx?scid=kb;EN-...
>
> Q307901 Permissions to Connect to Remote Access Database from ASP.NET
> http://support.microsoft.com/default.aspx?scid=kb;EN-...
>
> Fixing this should be a simple matter of editing the web.config file, and
> adding "<identity impersonate="true" />".
>
> Hope this helps!
>
> Steven Bras, MCSD
> Microsoft Developer Support/Visual Basic WebData
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> Are you secure? For information about the Microsoft Strategic Technology
> Protection Program and to order your FREE Security Tool Kit, please visit
> http://www.microsoft.co....


Khaled Hammouda

3/7/2002 5:20:00 AM

0

I had the same problem while trying to connect to MySQL using MyODBC 3.51
using DSN. The problem disappeared as soon as I changed the DSN from User
DSN to System DSN.

"Fredrick Bartlett" <palmtreefrb@earthlink.net> wrote in message
news:enJIBnFxBHA.1556@tkmsftngp03...
> I don't have an authentication issue. I *can* connect to SQL Server using
> Micsosoft.Data.Odbc and an Odbc Data Source. The problem is using a MySQL
> Data Source. I get the following error...
>
> ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found
> and no default driver specified
>
> Whats more...
>
> I am having this issue with regular ".asp" as well. All ".asp" and ".aspx"
> pages using MySQL DSN and DNS-less are raising this error. My drivers are
> installed correctly. I can use them successfully from Win Forms and other
> applications. I am able to repete this bug on all my my PC's. Here is the
> .asp error...
>
> a.. Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
> [Microsoft][ODBC Driver Manager] Data source name not found and no default
> driver specified
> /SupplyOrders/TMP2gv25shfzt.asp, line 232
>
>
> The above occurs on all PC's that have Visual Studio (Release) only. This
is
> a repeatable bug/problem. If do a fresh install of *just* the Framework I
> don't have this problem. Here is the entire .aspx error...
>
> 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:
>
> Line 37: OdbcDataAdapter myCommand = new OdbcDataAdapter(SQL,
> myConnection);
> Line 38: DataSet ds = new DataSet();
> Line 39: myCommand.Fill(ds, "sfcform");
> Line 40: this.DataGrid1.DataSource=ds.Tables["sfcform"].DefaultView;
> Line 41: this.DataGrid1.DataBind();
>
>
> Source File: c:\inetpub\wwwroot\forms1\webform1.aspx.cs Line: 39
>
> Stack Trace:
>
> [OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source
> name not found and no default driver specified]
> Microsoft.Data.Odbc.OdbcConnection.Open()
> System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
> ConnectionState& originalState)
> System.Data.Common.DbDataAdapter.Fill(Object data, Int32 startRecord,
> Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
> behavior)
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord,
> Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
> behavior)
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
> Forms1.WebForm1.Page_Load(Object sender, EventArgs e) in
> c:\inetpub\wwwroot\forms1\webform1.aspx.cs:39
> System.Web.UI.Control.OnLoad(EventArgs e) +67
> System.Web.UI.Control.LoadRecursive() +29
> System.Web.UI.Page.ProcessRequestMain() +724
>
> "Steven Bras [MS]" <stevenbr@online.microsoft.com> wrote in message
> news:QSS2D25wBHA.2496@cpmsftngxa07...
> > This is most likely due to a change in security since beta 2; the
> following
> > Knowledge Base articles give details on setting up security for ASP
pages:
> >
> > Q315736 HOW TO: Secure an ASP.NET Application by Using Windows Security
> > http://support.microsoft.com/default.aspx?scid=kb;EN-...
> >
> > Q307901 Permissions to Connect to Remote Access Database from ASP.NET
> > http://support.microsoft.com/default.aspx?scid=kb;EN-...
> >
> > Fixing this should be a simple matter of editing the web.config file,
and
> > adding "<identity impersonate="true" />".
> >
> > Hope this helps!
> >
> > Steven Bras, MCSD
> > Microsoft Developer Support/Visual Basic WebData
> >
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> >
> > Are you secure? For information about the Microsoft Strategic Technology
> > Protection Program and to order your FREE Security Tool Kit, please
visit
> > http://www.microsoft.co....
>
>