Error:SQL server not Found? 
Author Message
 Error:SQL server not Found?

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



Mon, 23 Apr 2001 03:00:00 GMT  
 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



Fri, 04 May 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Can not find SQL Server (I'm not using SQL Server)

2. Crystal 6 with Oracle - Error 599 SQL SERVER NOT FOUND

3. Specified SQL server not found (ERROR)

4. Specified SQL Server not found error

5. Error #-2146824582 ADO could not find the specified provider Using SQL SERVER CE

6. Specified SQL server not found.

7. SQL-Server not found

8. Another Physical DB not found (but with SQL server)

9. SQL Server Not Found

10. Can not find SQL Server

11. SQL Server not found

12. Crystal can not find the SQL server

 

 
Powered by phpBB® Forum Software