>>when i want to make an insert in my city table, my sqltext is like that :insert into table city(id,cityname) values (1,'vald'or'). how can i do it ??? thanks !
>
>INSERT INTO TABLE city (id,cityname) VALUES(1,"vald'or")
>
I assume you're talking SQL server here - and it's two ways. Either you prepare each value to be passed (which in case of strings means doubling each apostrophe, in case of datetimes certain formatting as strings etc etc), or you could let VFP do that:
lnId=1
lcCityName="vald'or"
sqlexec(h, "INSERT INTO TABLE city (id,cityname) VALUES(?lnId, ?lcCityName)")
VFP will then take care of converting your values into properly formatted strings.