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

CR 8.5 - SetLogonInfo doesn't work

Status
Not open for further replies.

samshiell

Programmer
Mar 12, 2001
26
GB
Hi
Can anyone help with a problem that's doesn't make any sense.

I am running a CR 8.5 report from VB6. The connection is made via an ODBC.

I am setting the location as follows:
--------------------------
Dim crxTable As CRAXDRT.DatabaseTable

For Each crxTable In report.Database.Tables
crxTable.SetLogOnInfo "Moon_DSN","", UID, Pwd
If crxTable.TestConnectivity = False Then
Err.Raise 1, "RunReport", "Failed to connect"
End If
Next
---------------------------
(UID and Pwd are variables passed to the procedure)

But this doesn't work!

In the Locals window you can see that the LogonServerName for the table changes but Location and LogonDatabaseName don't, and it tries to run the report against the ODBC connection that the report was created against.

My customer is creating hell about this so I'd appreciate any (quick!) help anyone can give.

Thanks

Sam
 
Thanks .


I fixed it just before your reply came in.

The problem was that in the report, in the "tables" fieled in the Location form the original database and owner prefix the Proc(usp_rpt_..) value,which is the name of the stored procedure. It was originally LiveMoon.dbo.Proc(usp_rpt_..)

I've removed this extra prefix stuff and it all works.

Thanks anyway

Sam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top