Arthur Fuller
artful at rogers.com
Thu Jul 24 10:48:04 CDT 2003
Although retrofitting it might be a little work, why don't you define the connection string as a constant? Then you could find and replace all the literal occurrences "Those who would sacrifice liberty for security deserve neither." -- Benjamin Franklin -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: July 23, 2003 10:07 AM To: dba-sqlserver at databaseadvisors.com; accessd at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [dba-VB] [dba-SQLServer]Auto Supply Connection strings and passwords to controls on forms(VB6 & SQL) To all, I have a VB6 application which looks at a SQL Server 7 database (which is on a development server), and I am using a mixture of DataEnvironment and ADO Controls for the application. However when it's finshed It will be moved to the live server so that everyone can gain access to it. The problem being that when I move to the live server I will have to remember to change all the ADO controls and the DataEnvironment connection manually (I don't want to have to do this if I can help it). What I thought of doing is have a table consisting of the ConnectionString, Username & Password and then a table of all the form names and ADO Controls, and somehow looping through the tables and setting the connections automatically. This is where I am stuck, I have created the tables and entered the connection strings etc, and I can do the loop which will loop through the records, but I don;t know how to set the connection strings, using the form names and ADO Controls from the tables. Am I being stupid in doing it this way ? Is there a better way to do this ? Can anyone help on this, as the application is almost finished.....? Thanks for any help in advance.... Paul Hartland __________________________________________________________________________ Join Freeserve http://www.freeserve.com/time/ Winner of the 2003 Internet Service Providers' Association awards for Best Unmetered ISP and Best Consumer Application. _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com