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