Warning the addnew method is NOT scalable. And with Access it could
really hurt ability of several to connect if you ue a non scalable
technique.

Use Insert Into see
http://www.learnasp.com/learn/debug2.asp
because it uses less resources (no recordsets) and will scale much better.


On Fri, 14 Jan 2005 18:07:27 -0000, Craig <[EMAIL PROTECTED]> wrote:
>  
>  That page does have pretty much what I want to do with it.  There are
>  a total of 115 variables that will be entered into the db over a
>  series of 7 pages.  I'm guessing that running the script directly as
>  was on the page would get cumbersome.  So I'm just going to simply
>  track the subject number, query and post to the DB as I go along for
>  the answers to the questions.     
>  
>  I have the subject number being generated, posting to the processing
>  page and then being written into the db.  I tried to add the request
>  form and hidden field into the processing page and I must have done
>  something wrong because it isn't working quite right.  The second set
>  of questions is being entered into the database into a new row NOT
>  based on the subject number.  I must have done something wrong in
>  requesting and then posting to the hidden field.  Here is a copy of a
>  processing page.
>  
>  
>  <[EMAIL PROTECTED]"VBSCRIPT"%>
>  <!--#include file="Connections/morriedb.asp" -->
>  
>  <% Const adOpenForwardOnly = 0
>  Const adLockOptimistic = 3
>  Const adCmdText = &H0001
>  Const adCmdTable = &H0002 %>
>  <% Server.ScriptTimeout = 360 %>
>  
>  <form name="form1" method="post" action="">
>  <input type="hidden" name="subnum" value="<%=subnum%>">
>  </form>
>  
>  <%
>  
>  set objConn = server.createobject("ADODB.Connection")
>  objConn.Open MM_morriedb_STRING
>  set rs = Server.CreateObject("ADODB.Recordset")
>  strSQL = "SELECT * FROM answers WHERE subnum = '"&
>  request.form("subnum") & "'"
>  rs.Open strSQL, objConn, adOpenForwardOnly, adLockOptimistic, adCmdText
>  rs.Addnew
>  
>  rs("subnum") = request.form("subnum")
>  rs("mpt01") = request.form("mpt01")
>  rs("mpr01") = request.form("mpr01")
>  
>  rs("mpt02") = request.form("mpt02")
>  rs("mpr02") = request.form("mpr02")
>  
>  rs("mpt03") = request.form("mpt03")
>  rs("mpr03") = request.form("mpr03")
>  
>  rs("mpt04") = request.form("mpt04")
>  rs("mpr04") = request.form("mpr04")
>  
>  rs("mpt05") = request.form("mpt05")
>  rs("mpr05") = request.form("mpr05")
>  
>  rs("mpt06") = request.form("mpt06")
>  rs("mpr06") = request.form("mpr06")
>  
>  rs("mpt07") = request.form("mpt07")
>  rs("mpr07") = request.form("mpr07")
>  
>  rs("mpt08") = request.form("mpt08")
>  rs("mpr08") = request.form("mpr08")
>  
>  rs("mpt09") = request.form("mpt09")
>  rs("mpr09") = request.form("mpr09")
>  
>  rs("mpt10") = request.form("mpt10")
>  rs("mpr10") = request.form("mpr10")
>  
>  rs("mpt11") = request.form("mpt11")
>  rs("mpr11") = request.form("mpr11")
>  
>  rs("mpt12") = request.form("mpt12")
>  rs("mpr12") = request.form("mpr12")
>  rs.Update
>  rs.Close
>  Set rs = Nothing
>  
>  objConn.Close
>  Set objConn = Nothing
>  
>  response.redirect "generalemploymentpractices.asp"
>  
>  %>
>  <%
>  Recordset1.Close()
>  Set Recordset1 = Nothing
>  %>
>  
>  
>  
>  
>  
>  ________________________________
>  Yahoo! Groups Links
>  
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
>   
> To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
>   
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to