Best way to create a DSN connection at runtime?

  • Help! I need to change a system DSN at runtime.  Here's the scenario:

    We have a bunch of Crystal 9 reports reporting off a SQL Server database using a system DSN.  Soon we'll be migrating to a new production server and really don't want to change all the reports by hand to point to the new database.  Therefore, we'd like to be able to set the system DSN on the fly from our VB front end.

    There are a couple of problems:

    1) Our users don't have administrative rights to their machines, which is necessary when setting a system DSN

    2) We can't use a file DSN because they don't work with SQL Server

    If anyone has any wisdom to share, please send it along! Thanks ...

    Dana



    Dana
    Connecticut, USA
    Dana

  • A bit of extra information:  we're running SQL 2000 on Windows 2000 and will be migrating to Windows 2003.



    Dana
    Connecticut, USA
    Dana

  • Set a DSNless connection to a full qualified domain name. Like mydsn.sqlservercentral.com as the server name. Then change the name in DNS when you migrate.

  • Thanks, Steve, but could you give a bit more detail?  Where am I setting this DSN-less connection?  And how?  As I said before, we don't want to manually redirect hundreds of reports to a different data source.



    Dana
    Connecticut, USA
    Dana

  • When you are ready to go live change the system DSN all your crystal reports use to point to the right server. The crystal reports are set to the DSN name. As long as files/fields did not change all you have to do is modify the system DSN the reports use to point to the new server connection.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply