Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 11th, 2005, 10:18 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 240
Thanks: 0
Thanked 1 Time in 1 Post
Default how to update this database table

I need some guidance. I have:
Code:
<td><%=rs("id")%></br>
<input type="hidden" name="id_<%=intRec%>"
 value="<%=rs.Fields("id").Value%>">

<textarea name="gemetria_<%=intRec%>"
id="gemetria_<%=intRec%>">
</textarea>

           <select name="insert" id="insert" size="1" style="width:150;">
           <option value="passages">passages</option>
           <option value="projective link">projective link</option>
           <option value="book number linked to book number">book number linked to book number</option>
           <option value="book number linked to chapter number">book number linked to chapter number</option>
           <option value="book number linked to verse number">book number linked to verse number</option>
           <option value="book number linked to number in text">book number linked to number in text</option>
           <option value="chapter number linked to book number">chapter number linked to book number </option>
           <option value="chapter number linked to book number">chapter number linked to book number</option>
           <option value="chapter number linked to chapter number">chapter number linked to chapter number</option>
           <option value="verse number linked to verse number">verse number linked to verse number</option>
           <option value="book number linked to number in text">book number linked to number in text</option>
           <option value="number linked to book">number linked to book</option>
           <option value="number linked to chapter">number linked to chapter</option>
           <option value="number linked to verse">number linked to verse</option>
           <option value="number linked to number">number linked to number</option>
           <option value="alphanumeric word">alphanumeric word</option>
           <option value="non-alphanumeric word">non-alphanumeric word</option>
           <option value="spoke of number in text">spoke of number in text</option>
           <option value="word gemetrial passage">word gemetrial passage</option>
           </select>
</td>
To each record I have assigned a textarea, a hidden and a select option dropdown. Within the table where updating is made I already have ID numbered. It has to update where the ID = <%=intRec%>.

I have difficulty setting up the response page. This was a model code where changes should be made:

Code:
Dim connStr, ans, i, rs, SQL, objConn
  Dim TheString, ArrayTemp, NumberOfWords, Word

Dim insert
Dim passages
Dim intRec


insert = Request.Querystring("insert")
gemetria = Request.Querystring("gemetria")

connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("Kjv.mdb")
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open connStr
Set rs = objConn.Execute("SELECT * FROM insertanswer")

If Not rs.EOF Then
    Dim gemetria
    Dim iCounter
    iCounter = 0
    Do Until rs.EOF

SQL = "UPDATE insertanswer "
SQL = SQL & "SET passages = '" & gemetria & "'"
SQL = SQL & " WHERE id = id_" & intRec
        objConn.Execute(SQL)
I get:
Quote:
quote:Microsoft JET Database Engine error '80040e10'

No value given for one or more required parameters
Martial Law 9/11 Rise of the Police State is now available! Visit our Martial Law movie section for complete info (click here), or order now by clicking the button below or by calling 888-253-3139
http://www.infowars.com/martial_law_911.htm
 
Old September 12th, 2005, 10:50 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 240
Thanks: 0
Thanked 1 Time in 1 Post
Default

I have:
Code:
        SQL = "UPDATE insertanswer "
        SQL = SQL & "SET "

        SQL = SQL & "passages = """ & request.querystring("Keyword_" & rs.Fields("id").value ) & """"

        SQL = SQL & " WHERE [id] = " & request.querystring("id_") & rs.Fields("id").value & ";"
but because of a loop it goes on and on. I only want to update the textareas where there are things written therein.

How should I do it?

Martial Law 9/11 Rise of the Police State is now available! Visit our Martial Law movie section for complete info (click here), or order now by clicking the button below or by calling 888-253-3139
http://www.infowars.com/martial_law_911.htm





Similar Threads
Thread Thread Starter Forum Replies Last Post
update table from another db table timbal25 SQL Server 2005 3 January 19th, 2008 06:47 AM
Update one table to another table using DTS in SQL Printmaker SQL Language 0 July 24th, 2007 07:17 AM
How to Update one table with other table data? ramk_1978 SQL Language 2 May 26th, 2006 12:51 AM
update table with an ID Num from different table scoobie PHP How-To 12 January 25th, 2005 12:28 PM
Update parent table with the sum of child table gbrown SQL Language 2 November 9th, 2004 07:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.