Hello All,
I have an interesting problem with designing my SQL statements around the data inside. Namely, the text fo a Memo control. If I were to add this data into my database:
Memo1.Text which is:
----- Start -----
This Kevin's line of text
on two "lines".
-----Finish------
I'd probably do this:
ADOCommand1.CommandText := 'INSERT INTO [Memos] ([MemoData])
Values("'+Memo1.Text+'")' ;
ADOCommand1.Execute;
If I try to do that I get all sorts of errors that relate to the use of the " and ' characters (although they don't say that of course)..
What I'd like to know is, is there a list of characters we need to stay away from and or is there a .Trim like function we can call on aMemo stream of text to rip out (normalize) these characters?
Thanks,
Kevin
I have an interesting problem with designing my SQL statements around the data inside. Namely, the text fo a Memo control. If I were to add this data into my database:
Memo1.Text which is:
----- Start -----
This Kevin's line of text
on two "lines".
-----Finish------
I'd probably do this:
ADOCommand1.CommandText := 'INSERT INTO [Memos] ([MemoData])
Values("'+Memo1.Text+'")' ;
ADOCommand1.Execute;
If I try to do that I get all sorts of errors that relate to the use of the " and ' characters (although they don't say that of course)..
What I'd like to know is, is there a list of characters we need to stay away from and or is there a .Trim like function we can call on aMemo stream of text to rip out (normalize) these characters?
Thanks,
Kevin