SQL Statement Help - Invalid chars
- From: Bob Smith <BobSmith@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 17 Sep 2008 10:24:01 -0700
Does anyone have a VBScript function that will help escape common SQL
Characters.
An example would be something like inserting this SQL command with this string
string = "smith, jacob's"
SQL = "INSERT INTO MyTable (DisplayName) Values ('" & String & "')"
conn.Execute(SQL)
This would return an error. Other common charactors may include include \ '
% OR and other items. There may also be multiple entries of one or more of
these chars in the same string. any help would be appriciated. The source of
data is unpredictable.
Thanks
.
- Follow-Ups:
- Re: SQL Statement Help - Invalid chars
- From: Bob Barrows [MVP]
- Re: SQL Statement Help - Invalid chars
- Prev by Date: Re: VBScript function in a .htm page
- Next by Date: Re: SQL Statement Help - Invalid chars
- Previous by thread: Scanning Local Drives and Local folders
- Next by thread: Re: SQL Statement Help - Invalid chars
- Index(es):
Relevant Pages
|