Thread View: borland.public.cppbuilder.database.dbexpress
2 messages
2 total messages
Started by juanma
Wed, 09 Jul 2008 13:25
MySQL how get names and expresion of index
Author: juanma
Date: Wed, 09 Jul 2008 13:25
Date: Wed, 09 Jul 2008 13:25
33 lines
1749 bytes
1749 bytes
Hi,
I have a program where I can get all schema of a database (msql) through ADO
component, now I'm triying to do that with dbexpres but I can't get de index
names of a table (neither the precission of decimal field).
I tried with a TSQLDataSet like:
// ATb->IndexDefs->Update();
for (int n = 0; n < ATb->IndexDefs->Count; n++) { //lsI->Count
XSTID * xi = new XSTID;
xi->cN = ATb->IndexDefs->Items[n]->Name;
xi->cF = ATb->IndexDefs->Items[n]->FieldExpression;
xi->nP = ATb->IndexDefs->Items[n]->Options.ToInt();
xDB.xT[i]->xI.AddItem(xi);
}
ATb->Close();
....
Also I tried with:
ATb->SetSchemaInfo(stIndexes,(WideString)xDB.xT[i]->cN, (WideString) NULL,
(WideString)"");
ATb->Open();
....
I thought that all this stuff was dummy in dbexpress, because the code work
without error but don't get any information...
do anybody know something about this? any clues?
TIA
Juanma
Re: MySQL how get names and expresion of index
Author: juanma
Date: Thu, 10 Jul 2008 11:27
Date: Thu, 10 Jul 2008 11:27
43 lines
2155 bytes
2155 bytes
At the moment I get all the information in a recordset with 'show index from
<tablename>',
also de precission of decimal with 'show columns from <tablename>'
For now I think this is the way...
"juanma" <juanmmm@cajamar.es> escribi๏ฟฝ en el mensaje
news:4874bc46@newsgroups.borland.com...
> Hi,
>
> I have a program where I can get all schema of a database (msql) through
> ADO component, now I'm triying to do that with dbexpres but I can't get de
> index names of a table (neither the precission of decimal field).
>
> I tried with a TSQLDataSet like:
>
> // ATb->IndexDefs->Update();
> for (int n = 0; n < ATb->IndexDefs->Count; n++) { //lsI->Count
> XSTID * xi = new XSTID;
> xi->cN = ATb->IndexDefs->Items[n]->Name;
> xi->cF = ATb->IndexDefs->Items[n]->FieldExpression;
> xi->nP = ATb->IndexDefs->Items[n]->Options.ToInt();
> xDB.xT[i]->xI.AddItem(xi);
> }
> ATb->Close();
> ....
>
> Also I tried with:
>
> ATb->SetSchemaInfo(stIndexes,(WideString)xDB.xT[i]->cN, (WideString) NULL,
> (WideString)"");
> ATb->Open();
> ....
>
> I thought that all this stuff was dummy in dbexpress, because the code
> work without error but don't get any information...
>
> do anybody know something about this? any clues?
>
> TIA
> Juanma
>
>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads