I hope someone can help me decide what is happening with this. It recognizes and carries out the select statement, will redirect to the proper place if entry is valid/invalid, but will not insert anything into the database. I first wanted an timestamp but am trying to troubleshoot backwards and simply enter text. Still no go. (Here is the code. First post. Hope I do this right)

<%
Dim conn,rs,strsql,sql_insert
set conn = server.CreateObject("ADODB.Connection")
set rs = server.CreateObject("ADODB.Recordset")

'DSN less connection
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=d:\shared\Casework.mdb"

strsql = "Select SSN From CWCT07 where SSN = '" & _ 
Request.Form("SSN") & "'"
set rs = conn.Execute (strsql)

    
    If (not rs.BOF) and (not rs.EOF) then
    sql_insert = "insert into CWCT07 (cps) values ('Yes')"
    'response.Write(sql_Insert)
    set sql_insert = conn.Execute (sql_insert)
   Response.Redirect "http://cwpsalem.pdx.edu/staff/Index.html" 
else
   Response.Redirect "http://cwpsalem.pdx.edu"
end if

response.write strsql

'close the recordset
rs.close
set rs = nothing

'close the connection
conn.close
set conn = nothing
%>
</script>

Thanks for any help.

hi there
it seems u r new to asp
here is ur mistake
instead of this
set sql_insert = conn.Execute (sql_insert)
use this
conn.Execute (sql_insert)

it will work

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.