Retrieve MySQL Data in Delphi 5

Forum related to MySQL

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
zoombaro
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 25.03.2009, 05:05
Location: Toluca
Contact:

Retrieve MySQL Data in Delphi 5

Post by zoombaro »

Im developing an application, like a wizard in Delphi 5, now with connection I can retrieve all databases and their tables and fields.

So, now I want to retrieve masterkey, index, foreing keys but I dont know how to do it or what component to use.

please help (sorry my english) !!
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Try the TZSQLMetadata component, connected to your connection. Then you can set the MetaDataType property to one of these :mdProcedures, mdProcedureColumns, mdTables, mdSchemas, mdCatalogs, mdTableTypes, mdColumns, mdColumnPrivileges, mdTablePrivileges, mdBestRowIdentifier, mdVersionColumns, mdPrimaryKeys, mdImportedKeys, mdExportedKeys, mdCrossReference, mdTypeInfo, mdIndexInfo, mdSequences, mdUserDefinedTypes.

Mark
Image
zoombaro
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 25.03.2009, 05:05
Location: Toluca
Contact:

Post by zoombaro »

Thank you !! Ok, I will do it right now !!

By the way, I miss chocolates from your country, snif :(
zoombaro
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 25.03.2009, 05:05
Location: Toluca
Contact:

Post by zoombaro »

Just to document it a little:
I was a little curious what this ZSQLMetadata thing just is, so i did some tests.
I created a new test project and i dropped 4 components on the form.
ZConnection (choose protocol and set db parameters. Connected = true)
ZSQLMetadata (choose connection)
Datasource(set Dataset to Metadata component)
DataGrid(set datasource)

Set everything active. Now you should see some datain the grid. (or an empty dataset. Just play with the MetadataType property of the metadata component. (set active to true after changing the type) mdTables shows table information, but there are plenty of options.

That is an answere that you did some day.

Ok, and a sample that can help, is in the ZEOSDBO-6.6.2-rc.zip file ,
directory : ZEOSDBO-6.6.2-rc\examples\controls

Just install the database and test the delphi project !!

I will stay here ...
Post Reply