Delphi-PRAXiS
Seite 2 von 4     12 34      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   Delphi TmysqlQuery (https://www.delphipraxis.net/176416-delphi-tmysqlquery.html)

DeddyH 4. Sep 2013 09:37

AW: Delphi TmysqlQuery
 
You have to fill the parameters with values before you execute your statement. Didn' t you do this?

baumina 4. Sep 2013 09:43

AW: Delphi TmysqlQuery
 
Please check while debugging Tmysqlquery.Text. This is the SQL statement passed to MySQL.

question 4. Sep 2013 15:03

AW: Delphi TmysqlQuery
 
Hi,
i have debug the application and i have found that, the system date format is: 2013-09-04(yy-mm-dd) but the database query dateformat shows the: 04-09-2013(dd-mm-yy)
how to make it similar formate?

DeddyH 4. Sep 2013 15:14

AW: Delphi TmysqlQuery
 
You can try using FormatDateTime.

question 4. Sep 2013 15:23

AW: Delphi TmysqlQuery
 
i have tried the follwoing ,but still have the same problem
Code:
QueryAdd1.ParamByName('DateNew').AsString:= FormatDateTim('yyyy-mm-dd', DateNew);

mkinzler 4. Sep 2013 15:28

AW: Delphi TmysqlQuery
 
Why not
Delphi-Quellcode:
QueryAdd1.ParamByName('DateNew').Value := DateNew;
or
Delphi-Quellcode:
QueryAdd1.ParamByName('DateNew').AsDate := DateNew;
What type has the field in the DB?

question 4. Sep 2013 15:32

AW: Delphi TmysqlQuery
 
in DB it is DateTime field

mkinzler 4. Sep 2013 15:35

AW: Delphi TmysqlQuery
 
Then use .Value

question 4. Sep 2013 16:02

AW: Delphi TmysqlQuery
 
i have used .value but its the same :(

baumina 5. Sep 2013 06:16

AW: Delphi TmysqlQuery
 
Is your error still ? :
Zitat:

Zitat von question (Beitrag 1227068)
"you have an error in your sql syntax near 'OC2000000A000000201' EmySqldatabase error"

The string 'OC2000000A000000201' dont looks like a dateformat-problem.


Alle Zeitangaben in WEZ +1. Es ist jetzt 17:04 Uhr.
Seite 2 von 4     12 34      

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