close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Multiple Update of SOME records

Thread began 2/03/2011 6:28 pm by ccooper309155 | Last modified 2/08/2011 9:40 am by ccooper309155 | 1096 views | 5 replies


The Code

Here is the code from the Insert Multiple Records behavior.

Let me know if you need the whole page as I'll need to remove some sensitve info from it first.



' WA DataAssist Multiple Updates
if (cStr(Request.Form("btnUpdate")) <> "") then
WA_loopedIDField = Array("WADA_RepeatID_DetailOrderID")
WA_connection = MM_conn_dmw_orders_STRING
WA_table = "OrderDetails"
WA_redirectURL = "babyback2.asp"
WA_keepQueryString = false
WA_indexField = "DetailOrderID"
WA_fieldNamesStr = "DetailStatus"
WA_columnTypesStr = "',none,''"
WA_fieldNames = Split(WA_fieldNamesStr,"|")
WA_columns = Split(WA_columnTypesStr,"|")
WA_multipleUpdateCounter = 0
while (WA_AB_checkLoopedFieldsNotBlank(WA_loopedIDField, WA_multipleUpdateCounter))
WA_fieldValuesStr = "" & cStr( Request.Form("SomeStatusNeue") ) & ""
WA_fieldValues = Split(WA_fieldValuesStr,"|")
WA_where_fieldValuesStr = WA_AB_getLoopedFieldValue(cStr(WA_loopedIDField(0)), WA_multipleUpdateCounter)
WA_where_columnTypesStr = "none,none,NULL"
WA_where_comparisonStr = "="
WA_where_fieldNames = Split(WA_indexField,"|")
WA_where_fieldValues = Split(WA_where_fieldValuesStr,"|")
WA_where_columns = Split(WA_where_columnTypesStr,"|")
WA_where_comparisions = Split(WA_where_comparisonStr, "|")
updateParamsObj = WA_AB_generateInsertParams(WA_fieldNames, WA_columns, WA_fieldValues, -1)
WhereObj = WA_AB_generateWhereClause(WA_where_fieldNames, WA_where_columns, WA_where_fieldValues, WA_where_comparisions)
set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = WA_connection
MM_editCmd.CommandText = "UPDATE " & WA_table & " SET " & updateParamsObj(3) & " WHERE " & WhereObj & ""
WA_multipleUpdateCounter = WA_multipleUpdateCounter + 1
if (WA_redirectURL <> "") then
if (WA_keepQueryString AND Request.QueryString <> "" AND Request.QueryString.Count > 0) then
if (inStr(WA_redirectURL,"?") > 0) then
WA_redirectURL = WA_redirectURL & "&"
WA_redirectURL = WA_redirectURL & "?"
end if
WA_redirectURL = WA_redirectURL & Request.QueryString
end if
end if
end if

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...