ASP Rendering Error.

Results 1 to 2 of 2

Thread: ASP Rendering Error.

  1. #1
    Join Date
    Dec 1969

    Default ASP Rendering Error.

    Okay...It doesn&#039;t even give me the error, I think perhaps b/c I am on a LAN, it just gives me a Novell Border error. But if anyone can see where I messed up in this script I&#039;d appreciate it:<BR>&#060;%<BR>Dim adoConn<BR>Dim rsToday<BR>Dim strSQL<BR>Dim parsedID<BR><BR>parsedID = Request.Form("ID")<BR>Set adoConn = Server.CreateObject("ADODB.Connection")<BR>adoConn .Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("civilwar.mdb")<BR>Set rsToday = Server.CreateObject("ADODB.Recordset")<BR>strSQL = "SELECT * FROM tblToday WHERE ID=" & parsedID<BR>rsToday.CursorType = 2<BR>rsToday.LockType = 3<BR>rsToday.Open strSQL, adoConn<BR>rsToday.Fields("ID")=Request.Form("ID") <BR>rsToday.Fields("mMonth")=Request.Form("mMonth" )<BR>rsToday.Fields("mDay")=Request.Form("mDay")<B R>rsToday.Fields("mYear")=Request.Form("mYear")<BR >rsToday.Fields("mEvent")=Request.Form("mEvent")<B R>rsToday.Update<BR><BR>rsToday.Close<BR>Set rsToday = Nothing<BR>Set adoConn = Nothing<BR><BR>Response.Redirect "addtdih.asp"<BR>%&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: ASP Rendering Error.

    What are you trying to do?<BR>Update a record<BR>or add a new record?<BR><BR>To add a new record you need to call the addnew first<BR><BR>rsToday.AddNew<BR>rsToday.Fields("ID" )=Request.Form("ID")<BR>rsToday.Fields("mMonth")=R equest.Form("mMonth")<BR>rsToday.Fields("mDay")=Re quest.Form("mDay")<BR>rsToday.Fields("mYear")=Requ est.Form("mYear")<BR>rsToday.Fields("mEvent")=Requ est.Form("mEvent")<BR>rsToday.Update<BR><BR>If you want to update that record then you have to filter it<BR><BR>rsToday.Filter = (ID = SomeValue)<BR>rsToday.Fields("ID")=Request.Form("I D")<BR>rsToday.Fields("mMonth")=Request.Form("mMon th")<BR>rsToday.Fields("mDay")=Request.Form("mDay" )<BR>rsToday.Fields("mYear")=Request.Form("mYear") <BR>rsToday.Fields("mEvent")=Request.Form("mEvent" )<BR>rsToday.Update<BR><BR>Either way is not great on performance.<BR><BR>Read up on Insert and Update methods using sql<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts