Click to See Complete Forum and Search --> : SQL Help


simplysimple
06-30-2006, 04:29 PM
im making a sticky note program in visual basic 6.0....

i have a problem regarding databases...

i didnt use the SQL command "insert" and other commands like that...

coz i know there would be an error when you input a " ' " in the textbox.

so instead.. i used a class and then i put all the recordset commands in the

class.. but there seems to be a probem.

i dont know of any other way to make a command that would mean like

"insert into table1........bla bla bla.... where title= 'omg crap'

i dont know how to insert cquery with conditions like that....

can someone pls teach me ?



btw... my sql is 2005

russell
06-30-2006, 09:16 PM
you escape single quotes by doubling them up

if you want to insert the value It's hot today then you insert statement looks like this

INSERT Table1 VALUES('It''s hot today')

notice that is 2 single quotes, not one double quote

simplysimple
07-03-2006, 08:14 PM
wow thnx a lot !!! :) it really worked....

now i have another problem...

im making some sort of "STICKY NOTE" .

the command should be .....

when i right-click on windows desktop, or any application like for example: MS word or MS excel... my sticky note command "ADD NOTE" should appear together with the menu that appears when you press right-click...

is there any wayt i can do that with visual basic?