Djabarov, Robert
Robert.Djabarov at usaa.com
Tue Jul 29 08:41:02 CDT 2003
Dim rs as object clsADO.OpenRS rs, "exec dbo.sp_AdjudicateClaim " & mClaimID, RSReadWrite If clsADO.ADOErrorsFound Then Exit Sub 'Error message is displayed by the class, so no need to do anything else here clsADO.CloseRS rs -----Original Message----- From: paul.hartland at fsmail.net [mailto:paul.hartland at fsmail.net] Sent: Thursday, July 24, 2003 3:13 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: RE: [dba-SQLServer]Auto Supply Connection strings and passwordsto controls on forms(VB6 & SQL) Although, you are making this sound really simple.....could I sse some sample code to get me started etc, I can build the connection string no problem, but whats clsADO and how does it control all data-related activity....?? Paul From: "Djabarov, Robert" <Robert.Djabarov at usaa.com> Date: Wed 23/Jul/2003 16:05 GMT To: <dba-sqlserver at databaseadvisors.com> Subject: RE: [dba-SQLServer]Auto Supply Connection strings and passwords to controls on forms(VB6 & SQL) I resolved it by doing the following: - The app has a logon screen that has UID, PWD, SRV, DB, and Network Library. All values are "memorizable" except for the password (SaveSetting/GetSetting) - If logon successful, - I check for the presence of a specific set of objects in the database that was specified at the logon. If this set is missing or incomplete, - app terminates, otherwise you're in. The ConnectionString gets built based on values mentioned for the logon screen and become part of clsADO class that controls all data-related activity. Once I implemented this very simple "architecture", I never worry about where my back-end lives. All the user needs to do is specify new server and new database (if different) to be able to connect along with their new user ID and new password (again, if different). The next time they logon only the password needs to be retyped. Robert Djabarov * (210) 913-3148 - phone * (210) 753-3148 - pager -----Original Message----- From: paul.hartland at fsmail.net [mailto:paul.hartland at fsmail.net] Sent: Wednesday, July 23, 2003 9:07 AM To: dba-sqlserver at databaseadvisors.com; accessd at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [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-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com ________________________________________________________________________ __ 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