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 insert not inserting any records

Thread began 6/25/2010 1:28 pm by kmccoll304905 | Last modified 7/01/2010 9:02 am by kmccoll304905 | 774 views | 2 replies |


Multiple insert not inserting any records

I have spend several hours trying to get the multiple insert in dataassist to work, and it never inserts records, does not even redirect to redirect page, just reloads the insert form. I have followed the video and the pdf that provides instructions.
I have also tested with a regular insert of one record, which does work.

Here is the code. Please tell me if there is something here that is making it fail.

<!--#include file="WA_DataAssist/WA_AppBuilder_VB.asp" -->
<!--#include file="Connections/connNFDT.asp" -->
<% Session("TA_SoNo")="12345678"
Session("TA_RideId")=35 %>
Dim rsQuestions__mmSo
rsQuestions__mmSo = "-1"
If (Session("TA_SoNo") <> "") Then
rsQuestions__mmSo = Session("TA_SoNo")
End If
Dim rsQuestions__mmRideId
rsQuestions__mmRideId = "-1"
If (Session("TA_RideId") <> "") Then
rsQuestions__mmRideId = Session("TA_RideId")
End If
Dim rsQuestions
Dim rsQuestions_cmd
Dim rsQuestions_numRows

Set rsQuestions_cmd = Server.CreateObject ("ADODB.Command")
rsQuestions_cmd.ActiveConnection = MM_connNFDT_STRING
rsQuestions_cmd.CommandText = "SELECT TA_QId, TA_Question, TA_BusMetricDescript, TA_RideId, TA_SO, TA_BusMetricName FROM dbo.View_GetQuestions WHERE TA_SO=? AND TA_RideId=?"
rsQuestions_cmd.Prepared = true
rsQuestions_cmd.Parameters.Append rsQuestions_cmd.CreateParameter("param1", 200, 1, 255, rsQuestions__mmSo) ' adVarChar
rsQuestions_cmd.Parameters.Append rsQuestions_cmd.CreateParameter("param2", 5, 1, -1, rsQuestions__mmRideId) ' adDouble

Set rsQuestions = rsQuestions_cmd.Execute
rsQuestions_numRows = 0
' WA DataAssist Multiple Inserts
if (cStr(Request.Form("btnSubmit")) <> "") then
WA_loopedFields = Array("hRideId", "hSO", "hQId")
WA_connection = MM_connNFDT_STRING
WA_table = "dbo.TA_EvalDetails"
WA_redirectURL = "success.asp"
WA_keepQueryString = true
WA_fieldNamesStr = "TA_RideId|TA_SO|TA_QId"
WA_columnTypesStr = "none,none,NULL|',none,''|none,none,NULL"
WA_insertIfNotBlank = ""
WA_fieldNames = Split(WA_fieldNamesStr,"|")
WA_columns = Split(WA_columnTypesStr,"|")
WA_multipleInsertCounter = 0
while (WA_AB_checkMultiInsertLoopedFieldsExist(WA_loopedFields, WA_multipleInsertCounter))
if (WA_insertIfNotBlank = "" OR WA_AB_checkLoopedFieldsNotBlank(Array(cStr(WA_insertIfNotBlank)), WA_multipleInsertCounter)) then
WA_fieldValuesStr = "" & cStr(WA_AB_getLoopedFieldValue("hRideId", WA_multipleInsertCounter)) & "" & "|" & "" & cStr(WA_AB_getLoopedFieldValue("hSO", WA_multipleInsertCounter)) & "" & "|" & "" & cStr(WA_AB_getLoopedFieldValue("hQId", WA_multipleInsertCounter)) & ""
WA_fieldValues = Split(WA_fieldValuesStr,"|")
insertParamsObj = WA_AB_generateInsertParams(WA_fieldNames, WA_columns, WA_fieldValues, -1)
set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = WA_connection
MM_editCmd.CommandText = "INSERT INTO " & WA_table & " (" & insertParamsObj(1) & ") VALUES (" & insertParamsObj(2) & ")"
end if
WA_multipleInsertCounter = WA_multipleInsertCounter + 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

' RepeatSelectionCounter_1 Initialization
Dim RepeatSelectionCounter_1 : RepeatSelectionCounter_1 = 0
Dim RepeatSelectionCounter_1_Iterations : RepeatSelectionCounter_1_Iterations = "25"
Dim RepeatSelectionCounterBasedLooping_1: RepeatSelectionCounterBasedLooping_1 = false
Dim RepeatSelectionCounter_1_IterationsRemaining
If (Not RepeatSelectionCounterBasedLooping_1 AND false) Then
If None__numRows >= 1 Then
If (CInt(None__numRows/RepeatSelectionCounter_1_Iterations) = None__numRows/RepeatSelectionCounter_1_Iterations) Then
None__numRows = CInt(None__numRows/RepeatSelectionCounter_1_Iterations)
None__numRows = CInt(None__numRows/RepeatSelectionCounter_1_Iterations)+1
End If
End If
End IF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<body><form name="frmBehaviors">
<p>Question Selection*for Service Order {Session.TA_SoNo} </p>
' RepeatSelectionCounter_1 Begin Loop
RepeatSelectionCounter_1_IterationsRemaining = RepeatSelectionCounter_1_Iterations
RepeatSelectionCounter_1_IterationsRemaining = RepeatSelectionCounter_1_IterationsRemaining-1
If(RepeatSelectionCounterBasedLooping_1 OR (Not rsQuestions.EOF AND true) ) Then
<table width="80%" border="1">
<td width="30%"><input type="hidden" name="hRideId_mihidden_<%=RepeatSelectionCounter_1%>" id="hRideId_mihidden_<%=RepeatSelectionCounter_1%>" value="1" />
<input name="hQId_<%=RepeatSelectionCounter_1%>" type="hidden" id="hQId_<%=RepeatSelectionCounter_1%>" value="<%=(rsQuestions.Fields.Item("TA_QId").Value)%>" />
<input name="hRideId_<%=RepeatSelectionCounter_1%>" type="hidden" id="hRideId_<%=RepeatSelectionCounter_1%>" value="<%=(rsQuestions.Fields.Item("TA_RideId").Value)%>" />
<input name="hSO_<%=RepeatSelectionCounter_1%>" type="hidden" id="hSO_<%=RepeatSelectionCounter_1%>" value="<%=(rsQuestions.Fields.Item("TA_SO").Value)%>" />
<%=(rsQuestions.Fields.Item("TA_SO").Value)%> -<%=(rsQuestions.Fields.Item("TA_RideId").Value)%></td>
<td width="70%"><p><%=(rsQuestions.Fields.Item("TA_Question").Value)%></p></td>
' RepeatSelectionCounter_1 Begin Alternate Content
' RepeatSelectionCounter_1 End Alternate Content
End If
If(Not RepeatSelectionCounterBasedLooping_1 AND RepeatSelectionCounter_1_IterationsRemaining <> 0 ) Then
If(Not rsQuestions.EOF AND true ) Then rsQuestions.MoveNext
If(rsQuestions.EOF AND CInt(RepeatSelectionCounter_1_Iterations) = -1) THEN RepeatSelectionCounter_1_IterationsRemaining = 0
If(false) Then None__index = None__index+1
End If
RepeatSelectionCounter_1 = RepeatSelectionCounter_1+1
Wend ' RepeatSelectionCounter_1 End Loop
<table width="80%">
<td align="center"><label>
<input type="submit" name="btnSubmit" id="btnSubmit" value="Begin Service Evaluation" />
Set rsQuestions = Nothing

Sign in to reply to this post

Jason ByrnesWebAssist

please add the page to a zip archive and attach the zip file to your post so I can examine the code in context.

Sign in to reply to this post


Temp fix

I resolved this using a temporary fix someone shared of changing certain names of the function used and replacing them with another. It works now, but should not webassist have fixed this issue already? bummer.

Sign in to reply to this post

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