Article View: borland.public.cppbuilder.database.ado
Article #2485MySQL & BCB loginproblem
From: Mattias Nilsson
Date: Thu, 29 May 2003 19:54
Date: Thu, 29 May 2003 19:54
47 lines
2588 bytes
2588 bytes
Hi i did these steps to get MySQL work with BCB 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. So far so good but even tho i checked loginprompt false etc it asks me to enter my login details everytime i start my application, i tried the store password option etc but nothing seems to work, am i doing something wrong here(?).
Technical Details
Message-ID:
<3ed6657c@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,85a68c9ce7feb4,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-05-29 13:10:19 PST From: "Mattias Nilsson" <moonbase@telia.com> Newsgroups: borland.public.cppbuilder.database.ado Subject: MySQL & BCB loginproblem Date: Thu, 29 May 2003 21:54:42 +0200 Lines: 49 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2727.1300 NNTP-Posting-Host: 193.13.72.90 Message-ID: <3ed6657c@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1054238076 193.13.72.90 (29 May 2003 12:54:36 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail