Replcae the single quote with two single quotes:
sSQL = Replace(sSQL, "'", "''")
The best thing to do is wrap this up in a function that does this for you,
so you call that function with the strings you want to include in your sql
statement instead of using Replace all the time.
At 03:39 PM 12/27/2000 -0800, you wrote:
>my sql statement is as foll:
>INSERT INTO WowWhisper(HeadLine) VALUES('" & varHeadline & "')
>varHeadline contains the foll string:
>'Balaji: will provide another 'kyunki' for Sony; more positives'
>gives me the foll error:
>Line 1: Incorrect syntax near 'kyunki'.
>(because of the single quote)
>how do i solve this problem.
>thanks in advance
>To unsubscribe send a blank email to leave-sql_language-$subst('Recip.MemberIDChar')@p2p.wrox.com
You are currently subscribed to sql_language as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-sql_language-$subst('Recip.MemberIDChar')@p2p.wrox.com