AW: Delphi TmysqlQuery
how can i convert dateformate from 05.09.2013 to 2013.09.05 17:00:00 using following query
Code:
but i want
query1.parambyname('newdate') := newdate //here is the 05.09.2013 17:00:00
Code:
query1.parambyname('newdate') := newdate /this formate i want 2013.09.05 17:00:00
|
AW: Delphi TmysqlQuery
What type is newdate of?
|
AW: Delphi TmysqlQuery
sorry, i forgot to mention it is DateTime formate
Code:
query1.parambyname('newdate').AsDateTime := newdate /this formate i want 2013.09.05 17:00:00
|
AW: Delphi TmysqlQuery
A Windows/Delphi DateTime isn't formated ( it's a Double!). The machnism behind the Komponents should convert the Value into the coresponding fomat. ( Unfortunately mysql unlike other dbms stores string values in the format YYYY-MM-DD HH:MM:SS instead of the use of an independant format).
But as written before, your problem seems be different of this! |
AW: Delphi TmysqlQuery
hi, finally i have found the problem, i DB there is one field as a Blob filed, i have read it as a string
forexample: 'lateId' is Blob field
Code:
Query1.ParamByName('lateID').(what to write here) := Query2.FieldByName('lateID').As(?)
|
AW: Delphi TmysqlQuery
Something like this
Delphi-Quellcode:
ms: TMemoryStream;
... try ms := TMemoryStream.Create; (Query2.FieldByName('lateID') as TBlobField).SaveToStream( ms); (Query1.ParamByName('lateID') as TBlobField).LoadFromStream( ms); finally ms.Free; end; |
AW: Delphi TmysqlQuery
can i also do the following
Code:
QueryA.ParamByName('lateId').AsString := QueryB.FieldByName('lateID').AsString
//Actually i need to do the work with fieldbyname and parambyname how to that for blobfield with parambyname and fieldbyname |
AW: Delphi TmysqlQuery
As far as can I see Markus uses both FieldByName and ParamByName.
|
AW: Delphi TmysqlQuery
Hi,
i have still this problem concerning Blob field, i have treid many ways, actually before (when the SQL manager 2010 installed in German language) i have worked with blob field and it was working fine and then i have reinstalled SQL Manager 2010 in English language after that it blob data types are not working, do you think -it can be becaause of the language of SQL Manager? |
AW: Delphi TmysqlQuery
Hi,
Code:
is it also possible to do the same for blob field similar to string/integer field?
//here 'name' is string field and i can write in the following way
QueryA.ParamByName('Name').AsString := QueryB.FieldByName('Name').AsString;
Code:
need your suggestion
//here NewID is Blob field
QueryA.ParamByName('NewID ').??? :=QueryB.FieldByName('NewID').???; //here how to define the datatype for Blob , i have tried with As TblobField but it does not work |
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:59 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz