Salut tout le monde voila, une petite question qui à déjà était traiter, mais pour laquelle je n'ai pas trouver de solution.
Tout d abord je voudrais sauvegardé un fichier formaté qui sort d'un Richedit dans un champ Text.
Le problème c'est que quand j'execute il me mais une erreur dans ma requete.
Voila ma requete:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 procedure TForm1.Button1Click(Sender: TObject); var Astream : TStringStream; S1,S2 :string; begin Astream := TStringStream.Create( S1); Astream.Seek( 0 , sofromBeginning ); richeedit1.Lines.SaveToStream( Astream ); Astream.Seek( 0 , sofromBeginning ); S2 := Astream.ReadString( Astream.Size ); Astream.Free; if mysql_query(form_pp.mySQLConnection,pchar('insert into Table (recette) values ('''+s2+''') where champ=''1'''))<>0 then begin errormsg:=mysql_error(form_pp.mysqlconnection); MessageDlg(errormsg, mtError, [mbOK], 0); end; end;






Répondre avec citation


Partager