|
-
May 18th, 2001, 07:09 AM
#1
Thread Starter
New Member
Need help with single quotes ( ' ) in VB and SQL
Hi there,
I have a anoying problem.
I've been working on a program tha accesses a SQL database.
When executing a select statement and in the WHERE clause a single quote (') appears in a string I always get an error.
Is there a way around ?
example:
I want to retrieve all records where the name = Nick's place
this would give
"SELECT * FROM table WHERE name = 'Nick's place'"
When passing this statement to SQL this causes an error after the second qoute
In SQL the correct statement is
SELECT * FROM table WHERE name = "Nick's place"
Has anyone any suggestion ?
Thanx
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|