Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC Connection failures

Status
Not open for further replies.

Bubsa

MIS
Mar 16, 2010
14
0
0
GB
I have visual studio 2008 professional with the inbuilt crystal reports version 10 I think. I create everything from my laptop and IIS runs from my laptop as well.
I have created the most basic report to try and figure out a problem I have anyways the report contains one database field which I connect to by ODBC. I then create a web form add the crystal report viewer to the report and the crystal report source run the web page and loads the data from the field as I would expect.
I have several ODBC connections setup on my machine one using integrated security the other using SQL authentication both are system DSNs. Now when I publish my application and access it from IIS and not the localhost I can access everything from my application ok except when I go to form that has the crystal reports I get this error (ODBC used here is the sa account)
Logon failed. Details: IM002:[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified Error in File.
If I use the other ODBC that uses Windows authentication I get this error message
Logon failed. Details: 42000:[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database requested by the login. The login failed..
In crystal if I change the datasource to OLE DB (ADO) I get this message
Logon failed. Details: ADO Error Code: 0x Source: Microsoft OLE DB Provider for ODBC Drivers Description: [Microsoft][ODBC SQL Server Driver][SQL Server] .
Now surely there must be an easy way to connect to the SQL Data from Crystal as my web application connects to data and uses stored procedures etc so I know its not permissions. Please help this has been driving me mad for days now.
 
The IIS host has to have the ODBC on it. After you publish it, it is no longer looking at your local data sources. I have an intranet website with apps on it for the users to run apps on and the data sources (ODBC) has to be on that location. I hope that this made sense!

Cathy
 
Hey MzKitty thanks for your reply. I am hoping you could expand on exactly what to do here. My Laptop is currently the development machine as well as the IIS host therefore the ODBC settings have been done on the laptop is this where you are suggesting I do this ? Or from the IIS configuration menu ?
 
It all depends on what account your IIS is running under. Make sure your ODBC is a System DSN as that is visible to all accounts and processes running on your machine. A User DSN is only visible to that user.

Editor and Publisher of Crystal Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top