Link to home
Start Free TrialLog in
Avatar of tangteng78
tangteng78Flag for Malaysia

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.OdbcException: 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(connectionString)
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.


Avatar of vora_bhaumik
vora_bhaumik
Flag of India image

Actually, you defined Dsn=MYODBC, you need to check your ODBC as your report datasource would rely on that.. you could also use to

report.reportsource = stringconnectionhere
You can also go through below link.
http://forums.asp.net/t/1040141.aspx
ASKER CERTIFIED SOLUTION
Avatar of rajvihari
rajvihari
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tangteng78

ASKER

Below is my connection string. Do i missed out anything?
DSN=cb.pg.mydatabase;PWD=mypassword;
 
Thanks
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi priceatapi,
How do i know what driver to use? In this case the DRIVER={XXXX Driver V XXXX};?
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.NET=True;DSN=cb.pg.aries;PWD=mypassword;"
 

dsn.bmp
good job guys