tangteng78
asked on
Data source name not found
Hi,
I encountered this error when running my website on the
http://localhost/myapps/default.aspx
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: System.Data.Odbc.OdbcExcep tion: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Source Error:
Line 280: Using connection As New OdbcConnection(connectionS tring)
Line 281: command.Connection = connection
Line 282: connection.Open()
Line 283: 'command.ExecuteNonQuery()
However, running it on http://localhost:1301/myapps/Default.aspx (clicking 'start' from web developer), there is NO such problem
Any help is greatly appreciated.
I encountered this error when running my website on the
http://localhost/myapps/default.aspx
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: System.Data.Odbc.OdbcExcep
Source Error:
Line 280: Using connection As New OdbcConnection(connectionS
Line 281: command.Connection = connection
Line 282: connection.Open()
Line 283: 'command.ExecuteNonQuery()
However, running it on http://localhost:1301/myapps/Default.aspx (clicking 'start' from web developer), there is NO such problem
Any help is greatly appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Below is my connection string. Do i missed out anything?
DSN=cb.pg.mydatabase;PWD=m ypassword;
Thanks
DSN=cb.pg.mydatabase;PWD=m
Thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi priceatapi,
How do i know what driver to use? In this case the DRIVER={XXXX Driver V XXXX};?
How do i know what driver to use? In this case the DRIVER={XXXX Driver V XXXX};?
ASKER
This is how i setup my dsn. I'm out of ideas how to put in the connection string.
'My current connection string..still seeing same error on production server
Dim connectionString As String = "Provider=OraOLEDB.Oracle; Data Source=MyOracleDB;OLEDB.NE T=True;DSN =cb.pg.ari es;PWD=myp assword;"
dsn.bmp
'My current connection string..still seeing same error on production server
Dim connectionString As String = "Provider=OraOLEDB.Oracle;
dsn.bmp
ASKER
good job guys
report.reportsource = stringconnectionhere
You can also go through below link.
http://forums.asp.net/t/1040141.aspx