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

connection from VB to crystal report

Status
Not open for further replies.

Paulvtis

MIS
Aug 1, 2002
36
PH
I have the following connection string in VB 6 to be able to link my VB to crystal report 8. There is no problem with this.

cryPO.connect = "DSN=TST;UID=sa;PWD=grr;DATABASE=DAT1;"

but then, I want to 'not' include the user and password since in the ODBC we have already specified the DSN=TST with the appropriate password.

I want to use:

cryPO.connect = "DSN=TST;DATABASE=DAT1;"

Error occurs "can't connect to sql server".

This syntax, without the user, works with my sql database connection but when used to create crystal reports by linking VB to crystal error exists.

My purpose is not to let some programmers see the password that is why I remove the user and password part because it was already specified in the odbc.

How can I establish the connection properly?

tnx
 
Does tha windows user that you are logged in as have the necessary rights on the SQL Server database in question?

Take Care,

zemp

"Show me someone with both feet on the ground and I will show you someone who can't put their pants on."
 
One other Question, is the DSN set to use a trusted connection?

Take Care,

zemp

"Show me someone with both feet on the ground and I will show you someone who can't put their pants on."
 
yes i used admin user. no not trusted connection. i used 'sa' user in sql server to connect.

tnx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top