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

Accessing extra connection in DataEnvironment

Status
Not open for further replies.

Ralph8

IS-IT--Management
Mar 15, 2003
168
US
I am generating a Report using MS Report designer.

I get a message box stating "Login failed for Database XXX".

When I select the cancel choice in the box, the report goes ahead and generates properly.

I have a Data Environment with three connections. The subject Report uses a Table under connection 3.

The "Database XXX" referred to in the message is under connection 1.

Nothing refers to Database XXX or any thing else under connection 1 at Report generation time.

By using breakpoints, I find that the code for connection 1 is being executed just before execution of the code for connection 3, even though nothing under connection 1 is addressed.

Nothing is harmed by what is happening and the Report generates accurately, but I cannot release such an irritant to my users.

Any one encountered some thing like this before? If so, is there a fix?

Thanks

Ralpjh

TIA

Ralph D. Meredith
 
Additional item of info on this:

It only happens on the FIRST report generated during a session. Any/all reports attempted after the first attempt to access the wrong database, generate just fine without further attempt to access the wrong database.

Odd.

Ralph

TIA

Ralph D. Meredith
 
Had EXACTLY the same problem a few years back, and I can't recall exactly how I fixed it, but I do have some misty memories of the cause.

Turns out that VB was accessing some of the Database properties before the report generation behind the scenes. Have you set a username/password in the connection properties. I think you can enter "Admin" and a blank password.

As I said, it was a while back, but it may set you down the right path...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top