Delphi-PRAXiS
Seite 3 von 3     123   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Datenbanken (https://www.delphipraxis.net/15-datenbanken/)
-   -   Delphi Sql - Ado - Values (https://www.delphipraxis.net/99167-sql-ado-values.html)

poterp 9. Sep 2007 12:55

Re: Sql - Ado - Values
 
ja

poterp 9. Sep 2007 12:59

Re: Sql - Ado - Values
 
ich habe folgendes:
Delphi-Quellcode:
ID_Name : Autowert (Key)
paul: Text
...
maurice: Text
....
Jahr:Datum/Uhrzeit (Format: Datum/Kurz)

DeddyH 9. Sep 2007 13:02

Re: Sql - Ado - Values
 
Und wenn Du den Datentyp auf ftDateTime änderst?

DeddyH 9. Sep 2007 13:07

Re: Sql - Ado - Values
 
Moment mal, hast Du auch das trunc eingefügt?

grenzgaenger 9. Sep 2007 13:08

Re: Sql - Ado - Values
 
dann sollte das doch klappen

Delphi-Quellcode:
 with adoquery1 do
  begin
        SQL.Text := STMT;
        dt:= Datetimepicker1.Date;

    Parameters.ParamByName('paul').Value := Edit1.Text;

    Parameters.ParamByName('Jahr').value.asDateTime:= dt;
oder
    Parameters.ParamByName('Jahr').value.asDateTime := Datetimepicker1.Date;
oder
    Parameters.ParamByName('Jahr').value := floattostr(Datetimepicker1.Date);

    Parameters.ParamByName('Jahr').Value := trunc(dt);
    // ...
    ExecSQL;
  end;
end;

poterp 9. Sep 2007 13:09

Re: Sql - Ado - Values
 
geht auch nicht

DeddyH 9. Sep 2007 13:10

Re: Sql - Ado - Values
 
Zeig nochmal den aktuellen Source.

grenzgaenger 9. Sep 2007 13:13

Re: Sql - Ado - Values
 
du kannst natürlich, statt der parameter spielerei, auch ein ordentliches SQL Statement aufbauen ... :roll: :angel:

poterp 9. Sep 2007 13:47

Re: Sql - Ado - Values
 
irgendwie klappt es nicht. ich probiere weiter und gebe bescheid

grenzgaenger 9. Sep 2007 19:38

Re: Sql - Ado - Values
 
probier es doch mal so ...

Delphi-Quellcode:
sql.Text:= 'Insert Into Tab_Fb_Ziel(paul, simon, alex, jean, rene, alain, simon, dominique, '
           'Raymond, Sylax, jeanne, Yvonne, Claire, Nina, Pierre, Janson, Louis, Lila,'
           'maurice, jahr )Values (' + quotedstr(edit1.text) + ', ' + 
                                 quotedstr(edit2.text) + ', ' + 
                                 quotedstr(edit3.text) + ', ' + 
                                 quotedstr(edit4.text) + ', ' + 
                                 quotedstr(edit5.text) + ', ' + 
                                 quotedstr(edit6.text) + ', ' + 
                                 quotedstr(edit7.text) + ', ' + 
                                 quotedstr(edit8.text) + ', ' + 
                                 quotedstr(edit9.text) + ', ' + 
                                 quotedstr(edit10.text) + ', ' + 
                                 quotedstr(edit11.text) + ', ' + 
                                 quotedstr(edit12.text) + ', ' + 
                                 quotedstr(edit13.text) + ', ' + 
                                 quotedstr(edit14.text) + ', ' + 
                                 quotedstr(edit15.text) + ', ' + 
                                 quotedstr(edit16.text) + ', ' + 
                                 quotedstr(edit17.text) + ', ' + 
                                 quotedstr(edit18.text) + ', ' + 
                                 floattostr(dateof(Datetimepicker1.Date)) + ');';
PS: welche datenbank verwendest du eigentlich?


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:04 Uhr.
Seite 3 von 3     123   

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