Search Results

Search found 4 results on 1 pages for 'pr0wl'.

Page 1/1 | 1 

  • Delphi ADO SQL Syntax Error

    - by pr0wl
    Hello. I am getting an Syntax Error when processing the following lines of code. Especially on the AQ_Query.Open; procedure THauptfenster.Button1Click(Sender: TObject); var option: TZahlerArray; begin option := werZahlte; AQ_Query.Close; AQ_Query.SQL.Clear; AQ_Query.SQL.Add('USE wgwgwg;'); AQ_Query.SQL.Add('INSERT INTO abrechnung '); AQ_Query.SQL.Add('(`datum`, `titel`, `betrag`, `waldemar`, `jonas`, `ali`, `ben`)'); AQ_Query.SQL.Add(' VALUES '); AQ_Query.SQL.Add('(:datum, :essen, :betrag, :waldemar, :jonas, :ali, :ben);'); AQ_Query.Parameters.ParamByName('datum').Value := DateToStr(mcDatum.Date); AQ_Query.Parameters.ParamByName('essen').Value := ledTitel.Text; AQ_Query.Parameters.ParamByName('betrag').Value := ledPreis.Text; AQ_Query.Parameters.ParamByName('waldemar').Value := option[0]; AQ_Query.Parameters.ParamByName('jonas').Value := option[1]; AQ_Query.Parameters.ParamByName('ali').Value := option[2]; AQ_Query.Parameters.ParamByName('ben').Value := option[3]; AQ_Query.Open; end; The error: I am using MySQL Delphi 2010.

    Read the article

  • Delphi: Autoscale TEdit based on text length does not work when removing chars

    - by pr0wl
    Hello. I have an input edit field where the user can enter data. I want the box width to be at least 191px (min) and maximum 450px (max). procedure THauptform.edtEingabeChange(Sender: TObject); begin // Scale if Length(edtEingabe.Text) > 8 then begin if Hauptform.Width <= 450 then begin verschiebung := verschiebung + 9; // The initial values like 'oldedtEingabeWidth' are global vars. edtEingabe.Width := oldedtEingabeWidth + verschiebung; buDo.Left := oldbuDoLeft + verschiebung; Hauptform.Width := oldHauptformWidth + verschiebung; end; end; end; This works for ENTERING text. But when I delete one char, it does not scale back accordingly.

    Read the article

  • Delphi: Transporting Objects to remote computers

    - by pr0wl
    Hallo. I am writing a tier2 ordering software for network usage. So we have client and server. On the client I create Objects of TBest in which the Product ID, the amount and the user who orders it are saved. (So this is a item of an Order). An order can have multiple items and those are saved in an array to later send the created order to the server. The class that holds the array is called TBestellung. So i created both TBest.toString: string; and TBest.fromString(source: string): TBest; Now, I send the toString result to the server via socket and on the server I create the object using fromString (its parsing the attributes received). This works as intended. Question: Is there a better and more elegant way to do that? Serialisation is a keyword, yes, but isn't that awful / difficult when you serialize an object (TBestellung in this case) that contains an Array of other Objects (TBest in this case)? //Small amendment: Before it gets asked. Yes I should create an extra (static) class for toString and fromString because otherwise the server needs to create an "empty" TBest in order to be able to use fromString.

    Read the article

1