getting.......
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near ''.
/forum/testdatabase.asp, line 17
from this page
<%
Function ChkString(string)
if string = "" then string = " "
ChkString = Replace(string, "'", "''")
End Function
set my_conn= Server.CreateObject("ADODB.Connection")
my_conn.Open "DRIVER={SQL Server};SERVER=lsu-msmc; DATABASE=forums;"
StrSql= "Select * from RecordOfRequest where name = '" & Request("view_name") & "'"
set rs = my_conn.Execute (StrSql)
if rs.BOF or rs.EOF then ' No records found. i.e. New record
StrSql = "INSERT INTO RecordOfRequest (name) values ('" & Request("view_name") & "'"
End If
my_conn.Execute (strSql)
my_Conn.Close
set my_conn = nothing
Response.Redirect ("RecordOfRequest.asp?view_name=" & request("view_name"))
%>
what am i doing wrong?