LBound Who?

C

Coz

Hi All,
I have been 'trying' to put together a database update page in Dreamweaver
Ultradev but I'm having all sorts of problems. My first problem is when
using the built in server behaviours the code seems to get all split up with
the code lines all confused!! I 'think' I've managed to fix that but the
second problem....Grrrr... Is that I get this error when running the page -

Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'LBound'

Pointing to this line with the ** at it's start, from this code - (no the
*'s are not in my real code:)

If (CStr(Request("MM_update")) <> "" And CStr(Request("MM_recordId")) <> "")
Then

MM_editConnection = MM_PropertyDatabaseConnection_STRING
MM_editTable = "PropertiesTable"
MM_editColumn = "PropertyRef"
MM_recordId = "'" + Request.Form("MM_recordId") + "'"
MM_editRedirectUrl = "/CPEditPropertyOK.asp"
MM_fieldsStr =
"textfield|value|textfield2|value|textfield3|value|textfield4|value|textfiel
d5|value|select|value|select2|value|textfield6|value|textfield7|value|textfi
eld8|value|select3|value|select4|value|select5|value|textfield9|value|textfi
eld10|value|select6|value|textfield11|value|textfield13|value|textfield14|va
lue|textfield15|value|textfield16|value|textfield17|value|textfield18|value"
MM_columnsStr =
"PropertyRef|',none,''|AddressLine1|',none,''|AddressLine2|',none,''|Address
Line3|',none,''|AddressPostCode|',none,''|AddressLocalArea|',none,''|Address
WideArea|',none,''|SoldDate|',none,''|ClosingDate|',none,''|SoldDate|',none,
''|SaleLet|',none,''|Status|',none,''|PriceType|',none,''|Price|none,none,NU
LL|NoBedrooms|none,none,NULL|Garage|none,none,NULL|Description|',none,''|Ext
raInfo|',none,''|Pic1|',none,''|Pic2|',none,''|Pic3|',none,''|Pic4|',none,''
|OnlineShedule|',none,''"
' create the MM_fields and MM_columns arrays MM_fields = Split(MM_fieldsStr,
"|")
MM_columns = Split(MM_columnsStr, "|") ' set the form values
**For i = LBound(MM_fields)To UBound(MM_fields) Step 2
MM_fields(i+1) = CStr(Request.Form(MM_fields(i)))
Next ' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And
Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
End If %>o

Any Ideas what's up? Or who/what is LBound and come to that
Ubound?.....Please.....

Cheers all
Coz.
 
M

Manohar Kamath [MVP]

Probably because you have commented the line that created MM_Fields array:

' create the MM_fields and MM_columns arrays MM_fields = Split(MM_fieldsStr,
"|")

See what happens when you uncomment the code

MM_fields = Split(MM_fieldsStr, "|")
 
C

Coz

"Manohar Kamath [MVP]" wrote
Probably because you have commented the line that created MM_Fields array:

' create the MM_fields and MM_columns arrays MM_fields = Split(MM_fieldsStr,
"|")

See what happens when you uncomment the code

MM_fields = Split(MM_fieldsStr, "|")

<SNIP

Cheers mate,
Problem solved, you were spot-on removed the comments and all works fine:)

Thanks again
Coz.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,192
Latest member
KalaReid2

Latest Threads

Top