Change SQL Server at run time??? 
Author Message
 Change SQL Server at run time???

Hi Robert,

Which developping tool do you use? How do you drive the report engine?
API, OCX, ...

You have to set the ODBC- Connection in a way. I my be able to help you
if i'd know more of your developing environment. If you just use Crystal
reports you can change database via the database menu I believe. But i
think this is not you approach.

In VB I use somthing like

With CrystalReport1
    .CopiesToPrinter = CInt(txtReportKopien)
    .Destination = IIf(bPreview, 0, 1)
    .ReportFileName = ReportPath() + sFile
    .Connect = wsMain.Connect()
    .WindowState = 2
    .ProgressDialog = True
End With


Public Function Connect() As String

Connect = "DSN=" + DatenQuelle() + ";UID=" + UserName() + ";PWD=" +
Pwd() + ";DSQ="

End Function

Hope it'll help


>  We are using crw6 and native connection to Oracle 7,3  ...... for
> development and sometimes for training we use a Test server instead of our
> Live server.

> Although I am able at run time to get crystal to log in to the test server I
> cant figure out how to tell the report to use the Test server as it keeps
> saying it cant find the server ( I guess it is still looking for the Live
> server) ...

> Can anyone help and tell me how to switch servers at run time.???

> Rob

Tue, 25 Apr 2000 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Change Server at Run Time

2. Crystal Reports and asp- re: dynamically change servers and databases at run time

3. Repost: changing server name at run-time

4. Changing SQL in a child command at run time

5. Datareport: changing the SQL string at run-time

6. DataEnvironment SQL change at run time

7. DataEnvironment SQL change at run time

8. Datareport: changing the SQL string at run-time

9. Run time error 3622: OpenRecordSet: SQL server table: IDENTITY column

10. Run-time error 20599: Cannot open SQL Server

11. Creating Access database from SQL Server at run time

12. Chaging SQL Server database at run-time within a report in VB


Powered by phpBB® Forum Software