• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 399
  • Last Modified:

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.


0
tangteng78
Asked:
tangteng78
2 Solutions
 
vora_bhaumikCommented:
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
0
 
rajvihariCommented:
I think you are suffering from right provide's selection problem, Here ...
pls. refer this link, which provide all kind of connection string for all data storages.

http://www.connectionstrings.com/
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
tangteng78Author Commented:
Below is my connection string. Do i missed out anything?
DSN=cb.pg.mydatabase;PWD=mypassword;
 
Thanks
0
 
princeatapiCommented:
Try Your connection string like this DRIVER={XXXX Driver V XXXX};Provider=msdaora;DSN=U500.WORLD;Uid=xyz;Pwd=123;SERVER=localhost;"
0
 
tangteng78Author Commented:
Hi priceatapi,
How do i know what driver to use? In this case the DRIVER={XXXX Driver V XXXX};?
0
 
tangteng78Author Commented:
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
0
 
tangteng78Author Commented:
good job guys
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now