Am I dumb ? - WideString to SQL Insert
Posted: Fri 22 Oct 2010 12:01
Hi - my brain is like birds - since hours I try to put some Data to Server but always error.
The Field in DB is a text field
I will Insert a widestring like with the code below...
but the windestring is always cut - and then error.
(when I execute the insert quers direct on server - all is ok)
procedure TForm1.Button1Click(Sender: TObject);
var xxx : WideString;
begin
xxx := 'ökjdfgh ökasj dfkjöhg ösdkjfhg öskdjfhg öksjdfhg öskdjfg dsöjkfgh ';
xxx := xxx + xxx + xxx + xxx+ xxx+ xxx+ xxx+ xxx+ xxx+ xxx+ xxx+ xxx+ xxx;
Myquery1.Sql.Text := 'INSERT INTO products_description '+
' (products_id, language_id, products_name, products_description) VALUES ' +
'(88889, 2, "ewewewewewewewe",'+xxx+'")';
myquery1.Execute;
end;
The Field in DB is a text field
I will Insert a widestring like with the code below...
but the windestring is always cut - and then error.
(when I execute the insert quers direct on server - all is ok)
procedure TForm1.Button1Click(Sender: TObject);
var xxx : WideString;
begin
xxx := 'ökjdfgh ökasj dfkjöhg ösdkjfhg öskdjfhg öksjdfhg öskdjfg dsöjkfgh ';
xxx := xxx + xxx + xxx + xxx+ xxx+ xxx+ xxx+ xxx+ xxx+ xxx+ xxx+ xxx+ xxx;
Myquery1.Sql.Text := 'INSERT INTO products_description '+
' (products_id, language_id, products_name, products_description) VALUES ' +
'(88889, 2, "ewewewewewewewe",'+xxx+'")';
myquery1.Execute;
end;