TFieldType problem
TFieldType problem
I'm trying to clone a database into a TVirtualTable. Im using 3 methods from the TmyQuery:
(1) GetFieldNames (works fine)
(2) GetDataType (works randomly)
(3) GetFieldPrecision (works randomly)
The later 2 methods don't seem to work, are they implemented in Mydac? If not i guess i have to extract them myself from Mysql using paramtext....
(1) GetFieldNames (works fine)
(2) GetDataType (works randomly)
(3) GetFieldPrecision (works randomly)
The later 2 methods don't seem to work, are they implemented in Mydac? If not i guess i have to extract them myself from Mysql using paramtext....
What i am looking for is the maximum precision as the database was defined in mysql. If i have a column created as VARCHAR(60) i want to retrieve the 60.Dimon wrote:The Precision property defines the total number of digits stored in numeric fields. To get the length of string field you should use the TFieldDef.Size property.
use this: . Works for me.
Code: Select all
virtualtable.Assign(MyQuery)Thanx, i missed that procedure. ... Spending a week wrinting my own assign...jkuiper wrote:use this:. Works for me.Code: Select all
virtualtable.Assign(MyQuery)
Is there any way to add another MyQuery? I need to add mutiple assigns to my virtualtable.
Do you mean adding another Myquery with the same structure after assigned the first dataset? I don't think so. Then its better to use TBatchmove.
If you want to use Myquery with another structure with the same virtualtable, it's possible.
The best thing to do that
The stranges thing is that dimon could no the answere, because he could find it here http://devart.com/forums/viewtopic.php?t=107
I'm glad I could help you

If you want to use Myquery with another structure with the same virtualtable, it's possible.
The best thing to do that
Code: Select all
VirtualTable.DeleteFields;
Virtualtable.Assign(Myquery);
I'm glad I could help you