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

.LogOnServer or LogonInfo(0)?

Status
Not open for further replies.

fryguy

Programmer
Nov 26, 2001
2
AR
Hi! can you tell me the diference of using .LogOnServer or LogonInfo(0) with just una database?
I have a simple crystal report with a single formula and a a few VB lines. If I call the report using LogonInfo I get a "cannot find sql server" error (20599) but using LogOnServer everything works fine.
Here es the sub I use to call reports (obviously not the real one). Oh! I'm using SQL 7.0

Private Sub PreviewReport(Base As String, Server as String)
CR.LogOnServer "pdssql.dll", Server, Base, "user", "pass"
'CR.LogonInfo(0) = "DSN=" & server & ";UID=user;PWD=pass;DSQ=" & Base
CR.ReportFileName = App.Path & "\Report.rpt"
CR.Action = 1
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top