Joost van der Sluis wrote:
Aha!Op dinsdag 02-12-2008 om 20:17 uur [tijdzone +1030], schreef Eric March: It was way back in MySQL50Connection1 where I had the problem. I have set the connection in MySQL50Connection1to SQLTransaction1 As you point out I still can't set the transaction to True, so I leave it False. Now when I set SQLQuery1 to True I get an error ".e...e" is an invalid float I used to use ADO in Delphi 6, and I don't have enough_______________________________________________ Lazarus mailing list [email protected] http://www.lazarus.freepascal.org/mailman/listinfo/lazarus knowledge to follow the help I am being given. Sorry! on 21/11/08 Tom Lisjac said the steps were: 1 Open a new form . Drop a Mysql50 (TMySQL50Connection) on a new form. In the object inspector for this component, enter the hostname (probably localhost), a database (test or mysql as an example or a database you've already created) and the username and password for the database or the "root" you set when installing mysql. At this point, establishing a successful mysql connection is being able to set the Connected property to true without an error. 2. Add Transaction and query The next step is to add TSQLTransaction and TSQLQuery (a TDataset descendent) to your form and point them to TMySQL50Connection. TSQLQuery is used to pass DDL or DML sql statements to the database and return DML result sets. Put your sql statements in the SQL stringlist and use the ExecSQL method to execute DDL statements or the open method to return a DML result set. Adding a TDatasource to the form and pointing it at the TSQLQuery will allow you to use the data aware components to display the query results. 3. Use the ExecSQL method..... I have added the TDatasource with DataSet property = SQLQuery1. I don't know where I use the "ExecSQL" method. Should this be on a button? I am still at step 2 but don't understand step 3. I can see more difficulties looming. Am I following the best path to learn db applications in Lazarus? Thanks Eric March |
_______________________________________________ Lazarus mailing list [email protected] http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
