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!

accessing a crystal report via MSDE (log on infos)

Status
Not open for further replies.

crisedefoie

Programmer
Feb 19, 2003
39
CA
Hello,
First I apologize for my english. I hope I'll be clear anyway.

I have to call a crystal report trough a MSDE connection.
When I call the same report with SQL Server my connection code works fine but I really don't know how to do with MSDE connection. I trie many different ways but they didn't works

This is my code (I simplified it for best reading)

With ConnectInfo
If ConnectType = MSDE Then
.ServerName = psServeurDadhri
.UserID = "login" ' Windows login
.Password = "password" 'Windows password
.DatabaseName = "Path" & DatabaseName
Else
.ServerName = psServeurDadhri
.UserID = login SQL Server
.Password = password SQL Server
.DatabaseName = "Path" & databaseName
End If
End with
tbCurrent.ApplyLogOnInfo(tliCurrent)
tbCurrent.Location() = Report.Database.Tables.Item(i).Name

Does someone know how to make it works?

Thanks in advance

Helie



 
Yes, I see I'm not very clear.

My report is linked to a SQL Server database which connection properties are SQL Server informations (login and password of SQL Server Database) but I have to call this report through a MSDE which connection properties are Windows informations (Windows login et password) but it doesn't work.

I'm looking for a way to define the type of security login information (SQL Server or Windows).

Maybe it's simple but I really can't see what property to use.
 
What you're asking is not directly related to MSDE, rather it has to do with trusted connection or id/password connection. You may be able to gain trusted connection by simply setting password and id to "" (empty string). Otherwise make the password and ID empty and add "TRUSTED_CONNECTION=True" to your connection string. The whole point of trusted connection means you don't need to know the user's id or password, the OS takes care of all that. Hence ID = "" and password = "" for your login.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top