I am trying to put together a simple web app for deleting and adding new posts.
I have a form setup on addnew.asp here is the form code
<form name="addnew" method="post" action="addcodage.asp">
addcodage.asp:
here is the ASP code where it breaks.
<%
frm_dbID = Request.Form("ID")
frm_dbDate = Request.Form("DATE")
frm_dbPosition = Request.Form("POSITION")
frm_dbDepartment = Request.Form("DEPARTMENT")
frm_dbDescription = Request.Form("DESCRIPTION")
frm_dbRate = Request.Form("RATE")
frm_dbvisible = Request.Form("VISIBLE")
frm_dbPTFT = Request.Form("PTFT")
frm_dbFile = Request.Form("File")
SQLText = "INSERT INTO Posting (ID, DATE, POSITION, DEPARTMENT, DESCRIPTION, RATE, VISIBLE, PTFT, File) VALUES (" & frm_dbID & "," & frm_dbDate & ",'"& frm_dbPosition & "','" & frm_dbDepartment & "','" & frm_dbDescription & "','" & frm_dbRate & "','" & frm_dbvisible & "','" & frm_dbPTFT & "','" & frm_dbFile & "')"
SQLUser="Provider=SQLOLEDB.1;User ID=****;PASSWORD=****;Initial Catalog=Employment;Data Source=DCABSQL01c"
set recordset = server.createobject("adodb.recordset") <--------BREAKS ON THIS LINE
recordset.open SQLText, SQLUser, 3, 3
Response.write(SQLTEXT)
Response.write("<P> Post Successfully Added")
'Do while not Recordset.Eof
'Set Recordset = Nothing
%>
i know i'm doing something simple wrong, if i comment out set recordset and recordset.open everything works but it obviously doesn't insert it into the database. any suggestions?
set conn=Server.CreateObject("
SQLUser="Provider=SQLOLEDB
conn.Open SQLUser
set rs=Server.CreateObject("AD
rs.Open SQLText, SQLUser
%>