Article View: borland.public.cppbuilder.database.ado
Article #2479Autologin problem with MySQL & ADO
From: Mattias
Date: Wed, 28 May 2003 23:38
Date: Wed, 28 May 2003 23:38
58 lines
2541 bytes
2541 bytes
Hi I followed these steps made by Vassiliev. Native OLEDB provider for MySQL is at http://www.mysql.com/Downloads/Win32/MyOLEDB.exe http://www.mysql.com/Downloads/Win32/MyOLEDB.chm 1. Create new project. 2. Drop TADOConnection on main form. 3. Press "ConnectionString button" (...). 4. Press "Build". 5. Choose "MySQL.OLEDB Provider". Press "Next" 6. Set Data Source to "test". 7. Press Check Connection - it should be successfull. 8. Press OK. 9. Set LoginPrompt property to False; 10. Set Connected property to True. 11. Drop TADOTable on the form and set its Connection property to ADOConnection1. 12. Set TableName to "sample2". 13. Set Active property to True. 14. Add TDataSource and TDBGrid on the form, connect them to ADOTable1 as usual. Now you should see data from sample2 table from test database (this database goes with MySQL). Look ConnectionString property of ADOConnection1 in IDE for details. Connection string in my case is Provider=MySqlProv.2.5;Data Source=test;Integrated Security="";Password="";User ID="";Location="";Extended Properties="" but Provider=MySqlProv.2.5;Data Source=test; works too. You can do all this from source code. P.S. If in Connection String dialog you will choose "MySQL.OLEDB Provider" and press "Check connection" without setting Data Source, you will see a dialog where you can enter properties, such as Host IP etc. Regards, Vassiliev V.V. http://www.oledbdirect.com The only problem is that my settings are not stored (the host, database, login and password), i have to enter it everytime i launch my application, i tried the option store password etc but it doesn't seem to work :/ Maybe i am doing something wrong(?)
Technical Details
Message-ID:
<66d04e18.0305281538.5233bc8e@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,484284c27441b040,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-05-28 16:38:45 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail From: moonbase@telia.com (Mattias) Newsgroups: borland.public.cppbuilder.database.ado Subject: Autologin problem with MySQL & ADO Date: 28 May 2003 16:38:45 -0700 Organization: http://groups.google.com/ Lines: 58 Message-ID: <66d04e18.0305281538.5233bc8e@posting.google.com> NNTP-Posting-Host: 193.13.72.90 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1054165125 6784 127.0.0.1 (28 May 2003 23:38:45 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 28 May 2003 23:38:45 GMT