Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


need guidance inserting/updating field (question)

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,2630
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> need guidance inserting/updating field (question)
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 need guidance inserting/updating field (question) - 4/9/2005 9:59:54 AM   
  gilgalbiblewheel

 

Posts: 14
Score: 0
Joined: 4/6/2005
From:
Status: offline
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.

      
 
 
Post #: 1
 
 Re: need guidance inserting/updating field (question) - 4/9/2005 10:09:06 AM   
  VBS

 

Posts: 110
Score: 0
Joined: 3/2/2005
From: Lebanon
Status: offline
Dear gilgalbiblewheel,
inserting the "p_"s depends on the textbox name in the form.
Take my advice and never call a data from a field in the database this way:


      

instead:


      

this way is much more error free

Hope this Helps

Firas S Assaad

(in reply to gilgalbiblewheel)
 
 
Post #: 2
 
 Re: need guidance inserting/updating field (question) - 4/15/2005 10:38:41 AM   
  gilgalbiblewheel

 

Posts: 14
Score: 0
Joined: 4/6/2005
From:
Status: offline
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".


      

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?

(in reply to gilgalbiblewheel)
 
 
Post #: 3
 
 Re: need guidance inserting/updating field (question) - 4/16/2005 6:03:09 AM   
  VBS

 

Posts: 110
Score: 0
Joined: 3/2/2005
From: Lebanon
Status: offline
Dear gilgalbiblewheel,

Your problem is very simple, just put a space between the SQL Statment:
(Your code)

SQL = "UPDATE 2"
SQL = SQL & "SET new_gemetria = "
'The rest of the code

SQL = SQL & "WHERE new_text_data = ''"

(Updated Code)

SQL = "UPDATE 2"
SQL = SQL & " SET new_gemetria = "
'The rest of the code

SQL = SQL & " WHERE new_text_data = ''"


Hope this helps

Best Regards
Firas S Assaad

(in reply to gilgalbiblewheel)
 
 
Post #: 4
 
 Re: need guidance inserting/updating field (question) - 4/17/2005 11:15:36 AM   
  gilgalbiblewheel

 

Posts: 14
Score: 0
Joined: 4/6/2005
From:
Status: offline
[CODE]
<% Option Explicit

' ADO constants used in this page
Const adOpenForwardOnly = 0
Const adLockReadOnly = 1
Const adCmdTableDirect = &H0200
Const adUseClient = 3
%>
<html>
<head>
<style>
body { font-family : Verdana; font-size : 8pt; }
a { font-family : Verdana; font-size : 8pt; text-decoration : none; }
</style>
</head>

<body>
<%
Dim connStr
connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("hebrewbible.mdb")

Dim ans
Dim i
Dim rs
Dim SQL
Dim TheString, ArrayTemp, NumberOfWords, Word

function getKeyValue_h(chr)
//A select statement is more efficient for this
select case chr
case "a"
getKeyValue_h = 1
case "b"
getKeyValue_h = 2
case "g"
getKeyValue_h = 3
case "d"
getKeyValue_h = 4
case "h"
getKeyValue_h = 5
case "w"
getKeyValue_h = 6
case "z"
getKeyValue_h = 7
case "x"
getKeyValue_h = 8
case "j"
getKeyValue_h = 9
case "y"
getKeyValue_h = 10
case "k","$"
getKeyValue_h = 20
case "l"
getKeyValue_h = 30
case "m","~"
getKeyValue_h = 40
case "n","!"
getKeyValue_h = 50
case "s"
getKeyValue_h = 60
case "["
getKeyValue_h = 70
case "p","@"
getKeyValue_h = 80
case "c","#"
getKeyValue_h = 90
case "q"
getKeyValue_h = 100
case "r"
getKeyValue_h = 200
case "f","v"
getKeyValue_h = 300
case "t"
getKeyValue_h = 400
case else
getKeyValue_h = 0
end select
end function

function computeValue(str)
ans = 0
for i = 0 to len(str)
ans = ans + getKeyValue_h(mid(str,i+1,1))
next
computeValue = ans
end function



Set rs = Server.CreateObject("ADODB.Recordset")

rs.PageSize = 10
rs.CacheSize = 5

(in reply to gilgalbiblewheel)
 
 
Post #: 5
 
 Re: need guidance inserting/updating field (question) - 4/17/2005 10:46:56 PM   
  VBS

 

Posts: 110
Score: 0
Joined: 3/2/2005
From: Lebanon
Status: offline
Dear gilgalbiblewheel,

I am sorry I can't (wont) help you...


(in reply to gilgalbiblewheel)
 
 
Post #: 6
 
 Re: need guidance inserting/updating field (question) - 4/19/2005 11:30:31 AM   
  gilgalbiblewheel

 

Posts: 14
Score: 0
Joined: 4/6/2005
From:
Status: offline
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:
[URL=http://k.domaindlx.com/gemetria/pageing2.asp]http://k.domaindlx.com/gemetria/pageing2.asp[/URL]

(in reply to gilgalbiblewheel)
 
 
Post #: 7
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> need guidance inserting/updating field (question) Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts