Login | |
|
 |
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
|
|
| |
|
|
|
|
|