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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Login Failed for User <userdb> (OLE DB)

Status
Not open for further replies.

RRAnthon

Programmer
Joined
Sep 25, 2005
Messages
24
Location
US
CR9, VB6. Created report in CR9 using OLE DB connection from a SQL stored procedure. Works fine in CR9. Imported into VB6 app, at the line CRViewer.ViewReport, receive Login Failed, MS OLE DB Provider for SQL Server, and the description being the subject line.

Temp work around to verify that the report produces data is to insert line:
report.Database.Tables.Item(1).SetLogOnInfo "ServerName", "DBName", "userid", "pwd"

before the CRViewer.ViewReport line. What's wrong with my report connection? Thanks for any help provided.
 
Your 'workaround' is the solution. Whenever you're connection to a data source that requires authentication, you MUST pass the login credentials for the report. The report stores all of the database information of the last db it was connected to when the report is saved, but it doesn't keep the password.

-dave
 
Thanks Dave, this was an ah-ha! moment because it appeared that the report works in the production environment with the OLE DB set within the report, however, the app uses an ADO connection to bypass the report source. Very obscure, but thanks for reinforcing my suspicion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top