|
|
|
|
|
| | |
|
PowerASP active server pages asp.net microsoft .net framework sdk learn asp what is asp tutorial learn asp.net CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Re: How to remove single quote ? |
From: |
Paul Simpson |
Date: |
4/9/1999 3:14:01 AM |
IP: |
216.140.174.143 |
When I'm having trouble with a SQL statement in an ASP page I like to have the code print it out in HTML as a debugging tool. Then I can see if there are missing spaces, extra punctuation,etc...
Try putting it into a variable and printing it out before you actually go to the database with it:
<% dim strSQL
strSQL = "INSERT INTO datafile" _
& "( name, email)"_
& "VALUES (" _
& "'" & name & "', " _
& "'" & email & "')"
Response.Write strSQL
%>
The Wrox book, "Beginning Active Server Pages", is a great resource for giving you different ways to connect to a datasource and work with a recordset, some of which are easier to work with and debug than a SQL statement.
As the saying goes: "Give a man a fish and he will eat for a day. Teach him how to fish and he will eat for a lifetime". |
Previous Message
Follow Up - Thanks. - Lisa 4/9/1999 1:42:02 PM
|
|
|
|
|
|
|
|
|
|
|
|