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 April 9th, 2005, 04:57 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 240
Thanks: 0
Thanked 1 Time in 1 Post
Default need guidance in inserting field ( coding question

All I want to insert is the "new_gemetria" field. Is it necessary to enter all the "p_"s as shown below. Since all the rest of the fields are already inserted.
Code:
    if linkSet.EOF then
        p_new_id = 1
    else
        p_new_id = linkSet("new_id") + 1
    end if

    p_new_id_in = Request.querystring("p_new_id")
    if p_new_id_in <> "" then
        linkSet.Find "new_id = " & p_new_id_in
    end if
    if p_new_id_in = "" or linkSet.EOF then
        p_new_recordType = ""
        p_new_book_spoke = ""
        p_new_chapter_spoke = ""
        p_new_verse_spoke = ""
        p_new_book = ""
        p_new_chapter = ""
        p_new_verse = ""
        p_new_text_data = ""
        p_new_gemetria = ""

    else
        p_new_id = p_new_id_in
        p_new_recordType = linkSet("new_recordType")
        p_new_book_spoke = linkSet("new_book_spoke")
        p_new_chapter_spoke = linkSet("new_chapter_spoke")
        p_new_verse_spoke = linkSet("new_verse_spoke")
        p_new_book = linkSet("new_book")
        p_new_chapter = linkSet("new_chapter")
        p_new_verse = linkSet("new_verse")
        p_new_text_data = linkSet("new_text_data")
        p_new_gemetria = linkSet("new_gemetria")
        p_existing = p_new_id_in
    end if
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 April 10th, 2005, 08:35 AM
Authorized User
 
Join Date: Sep 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Your not making sense as to what you want to do... You say you just want to insert new_gemertia record into the new_gemertia field? if this is correct that you just need to use the RS.AddNew or even better to use sql... INSERT INTO etc.. I would give you a good bit of advice, either buy a good book on ASP or use google to search for what your after.. You should really look at basic ASP programming before you start to post basic questions. Cheers

DJWright
 
Old April 15th, 2005, 05:33 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 240
Thanks: 0
Thanked 1 Time in 1 Post
Default

SQL UPDATE statement problem

How do I insert this VBScript? Please correct me from the 1st response .write to the "next"

In case you're wondering, I am inserting some mathematical result from the formula between the 1st response .write to the "next".

Code:
  TheString = Request.QueryString("new_text_data")
  ArrayTemp = split(TheString, " ")
  NumberOfWords = UBound(ArrayTemp) + 1

    SQL = "UPDATE 2"
    SQL = SQL & "SET new_gemetria = "

   Response.Write "<P><i>Number of words:</i> " & NumberOfWords
   Response.Write "<BR>Total=" & computeValue(TheString)
  For Each Word In ArrayTemp
   Response.Write "<BR>" & word & "="
   Response.write computeValue(word)
  next
    SQL = SQL & "WHERE new_text_data = ''"
And I don't know if this is right but "new_text_data" should be the "new_text_data" of every single record in the table. So I left the '' blank. How should I write that?

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 April 19th, 2005, 06:25 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 240
Thanks: 0
Thanked 1 Time in 1 Post
Default

New method to update but need help
I thought of another method because this seems too complicated. How about including a textarea wherein is the calculation inserted automatically next to each record (therefore a textarea next to each record) and a submit button on top of the "textarea column".

I tried this but it has some problems:
since the page holds 10 records at a time what it's doing is taking the result from the 10 records and updating in one record (is one square called parameter?). So 10 in 1.

Here's the link:
http://k.domaindlx.com/gemetria/pageing2.asp


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
Inserting new field to a table elygp SQL Language 3 March 19th, 2008 12:03 PM
Inserting comma in the field issaq SQL Language 0 February 20th, 2008 08:41 AM
Coding question (New to XSLT) jcrowley XSLT 2 August 26th, 2007 03:42 PM
Inserting worksheet into OLE field Mihai B Access 0 November 24th, 2004 07:39 AM
Coding question aagway Access VBA 1 May 4th, 2004 02:54 PM





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