Page 1 of 1

Newbe to SQL & MyDac

Posted: Fri 13 Apr 2007 14:21
by Simon180
I need help on how to get a selected item from a database and I allso need help on getting all current IDs from a database

Code: Select all

CREATE TABLE `Users` (                                                                                                          
          `ID` int(5) NOT NULL auto_increment,                                                                                              `Name` varchar(50) NOT NULL default '',                                                                                              
          `Email` varchar(50) NOT NULL default '',                                                                                
`Password` varchar(50) NOT NULL default '',                                                                 
          `TimeStamp` varchar(10) NOT NULL default '',                                                                                              
          PRIMARY KEY  (`ID`)                                                            
        ) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1     
thats my database

this is what am looking to do I want to be able to get all current registerd names and add them to a dropdown list on the sql connection then I want to be able to pull up information on each selected account from drop down can anyone help and supply a working code???

thanks alot

Posted: Fri 13 Apr 2007 15:35
by Antaeus
You can retrieve all records from this table using the TMyTable component. (For the example see the Table demo that is a part of MyDAC general demo. You can find this demo in %MyDAC%\Demos\ directory. %MyDAC% is the MyDAC installation path on your computer.)
After the records are received to the client, you can display them using the standard DB-aware controls like TDBLookupListBox, TDBText, TDBEdit, TDBGrid, etc. For more information read the Delphi Help.