
Error:SQL server not Found?
Paul,
Thank you for your response! I actually found that the following syntax in
the connect string worked for me!
Provider=SQLOLEDB.1;Password=PWD;Persist Security Info=True;User
ID=UID;Initial Catalog=DATABASE NAME;Data Source=SERVER NAME.
I am almost sure it has to be through ODBC and not Active X control.
However, I know there is a way to set a new DSN in ODBC through visual
basic code. So when I am ready to deploy my system, the registration of the
DSN is invisible and automatic to the user.
I will respond to the Newsgroup with our infomation to help other.
Thanks Again!
Linda Gowen
Quantum Research Corporation
Quote:
-----Original Message-----
Sent: Friday, November 13, 1998 5:34 PM
To: Linda Gowen
Subject: Re: Error:SQL server not Found?
Linda,
I changed my connect statement before I set the action = 1 for the
report.
For SQL server you have to set the DSN= to the server and a DSQ= database
name. I don't have the exact syntax here, it's at work and I'm at home but
it
is basicaly this:
crystalobject.connect =
"DSN=servername;PWD=password;UID=userid;DSQ=databasename;"
This fixed my problem, hope it helps.
Paul
>Hi,
> I am trying to make an OLE call to a crystal report object within a
>VBA piece of code. The crystal report is set up to access a SQL server
>database. This worked fine when I developed the report, but when I try
>to access the report in the VBA code I get an error that states that the
>SQL Server can't be found. I've been over the ODBC DSN several times
>and it looks to be correct. I duplicated the SQL Server database in
>Access and created the same crystal report accessing the Access
>database. When I ran the VBA code using the Access database it worked
>fine.
>Any help on how to access a crystal report object from VBA would be
>greatly appreciated. I've tried everything that I can think of.
>Thanks in advance.
> Paul McDonald
>--
>Whats wrong with extending my probe?
>The president did the same thing.Kenneth Starr