[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Microsoft VBScript compilation error '800a0409'

Posted on 2011-10-19
7
Medium Priority
?
849 Views
Last Modified: 2012-08-13
Help,

I'm getting the following error-

Microsoft VBScript compilation error '800a0409'

Unterminated string constant

/includes/Store-Cart-Summary.asp, line 8

WA_fieldValuesStr = "Y" & "|" & "N" & "|" & WA_eCDB_ConvertNumber("" & cStr( Session("USERID") ) & "") & "|" & WA_eCDB_ConvertNumber("0") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_TotalColumn(ShoppingCart, "TotalPrice")) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_GetShipping(ShoppingCart)) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_GetRuleValueByName(ShoppingCart, "Discounts", URLDecode("Non Vatable"))) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_GrandTotal(ShoppingCart)) & "") & "|" & "" & cStr( Request("TGICredit") ) & "" & "|" & "" & cStr( Session("CLUBNAME") ) & "" & "|" & "" & cStr( Session("ADDRESS1") ) & "" & "|" & "" & cStr( Session("ADDRESS2") ) & "" & "|" & "" & cStr( Session("TOWN") ) & "" & "|" & "" & cStr( Session("REGION") ) & "" & "|" & "" & cStr( Session("POSTCODE") ) & "" & "|" & "" & cStr( Session("COUNTRY") ) & "" & "|" & "" & cStr(Session("PHONE")) & "" & "|" & "<%Request(" & Chr(34) & "Notes" & Chr(34) & ")
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^


With the code below-

<%dim tgiCredit
tgiCredit = Request("TGICredit")
if tgiCredit = "" then 
tgiCredit = "N" 
else 
tgiCredit = CStr( tgiCredit )
end if %>
<%
if ("" = "")  then
  WA_connection = MM_GolfConnection_STRING
  WA_table = "dbo.Ordertb"
  WA_redirectURL = ""
  WA_indexField = "OrderID"
  WA_fieldNamesStr = "Direct-Order|Pro-Direct-Order|MemberID|ProID|OrderSubTotal|OrderDeliveryCharge|OrderTaxDiscount|OrderTotal|UseTGICredit|OrderAddressee|OrderAddress1|OrderAddress2|OrderTown|OrderCounty|OrderPostcode|OrderCountry|OrderPhone|OrderComments"
  WA_fieldValuesStr = "Y" & "|" & "N" & "|" & WA_eCDB_ConvertNumber("" & cStr( Session("USERID") ) & "") & "|" & WA_eCDB_ConvertNumber("0") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_TotalColumn(ShoppingCart, "TotalPrice")) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_GetShipping(ShoppingCart)) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_GetRuleValueByName(ShoppingCart, "Discounts", URLDecode("Non Vatable"))) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_GrandTotal(ShoppingCart)) & "") & "|" & "" & tgiCredit & "" & "|" & "" & cStr( Session("CLUBNAME") ) & "" & "|" & "" & cStr( Session("ADDRESS1") ) & "" & "|" & "" & cStr( Session("ADDRESS2") ) & "" & "|" & "" & cStr( Session("TOWN") ) & "" & "|" & "" & cStr( Session("REGION") ) & "" & "|" & "" & cStr( Session("POSTCODE") ) & "" & "|" & "" & cStr( Session("COUNTRY") ) & "" & "|" & "" & cStr(Session("PHONE")) & "" & "|" & "<%Request(" & Chr(34) & "Notes" & Chr(34) & ")%>
"
  WA_columnTypesStr = "',none,''|',none,''|none,none,NULL|none,none,NULL|none,none,NULL|none,none,NULL|none,none,NULL|none,none,NULL|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''"
  WA_sessionName = "ORDERID"
  indexFieldIndex = -1
  WA_fieldValues = Split(WA_fieldValuesStr,"|")
  WA_fieldNames = Split(WA_fieldNamesStr,"|")
  WA_columns = Split(WA_columnTypesStr,"|")
  set WA_editCmd = Server.CreateObject("ADODB.Command")
  updateFieldValue = ""
  WA_editCmd.ActiveConnection = WA_connection
  if (WA_redirectURL <> "" AND Request.QueryString <> "" AND Request.QueryString.Count > 0) then
    if (inStr(WA_redirectURL,"?") > 0)  then
	  WA_redirectURL = WA_redirectURL & "&"
	else
	  WA_redirectURL = WA_redirectURL & "?"
	end if
    WA_redirectURL = WA_redirectURL & Request.QueryString
  end if
  for i = 0 to Ubound(WA_fieldNames)
    if (WA_indexField  = WA_fieldNames(i)) then
      indexFieldIndex = i
      exit for
    end if
  next
  if (indexFieldIndex >= 0) then  updateFieldValue = WA_fieldValues(indexFieldIndex)
  if (updateFieldValue = "") then updateFieldValue = cStr(Session(WA_sessionName))
  updateColType = "none,none,NULL"
  if (indexFieldIndex >= 0)  then
     updateColType = WA_columns(indexFieldIndex)
  end if
  if (updateFieldValue <> "" AND updateFieldValue <> "undefined")  then
      valueForWhere = WA_generateInsertParams(Array(WA_indexField), Array(updateColType), Array(updateFieldValue), -1)
      sqlstr = "select " & WA_indexField & " from " & WA_table & " where " & WA_indexField & " = " & valueForWhere(2) & " order by " & WA_indexField & " DESC"
      set WA_eCartRecordset = Server.CreateObject("ADODB.Recordset")
      WA_eCartRecordset.ActiveConnection = WA_connection
      WA_eCartRecordset.Source = sqlstr
      WA_eCartRecordset.CursorType = 0
      WA_eCartRecordset.CursorLocation = 2
      WA_eCartRecordset.LockType = 1
      WA_eCartRecordset.Open()
	  if (NOT WA_eCartRecordset.EOF)  then  
	    updateFieldValue = cStr(WA_eCartRecordset.Fields.Item(WA_indexField).Value)
	  else
	    updateFieldValue = ""
	  end if
	  WA_eCartRecordset.Close()
  end if
  if (updateFieldValue <> "" AND updateFieldValue <> "undefined")  then
    updateParamsObj = WA_generateInsertParams(WA_fieldNames, WA_columns, WA_fieldValues, indexFieldIndex)
	  valueForWhere = WA_generateInsertParams(Array(WA_indexField), Array(updateColType), Array(updateFieldValue), -1)
	  WA_editCmd.CommandText = "update " & WA_table & " SET " & updateParamsObj(3) & " where " & WA_indexField & " = " & valueForWhere(2)
    WA_editCmd.Execute()
	  WA_editCmd.ActiveConnection.Close()
  else
    updateFieldValue = ""
    insertParamsObj = WA_generateInsertParams(WA_fieldNames, WA_columns, WA_fieldValues, -1)
    WA_editCmd.CommandText = "insert into " & WA_table & " (" & insertParamsObj(1) & ") values (" & insertParamsObj(2) & ")"
    WA_editCmd.Execute()
    WA_editCmd.ActiveConnection.Close()
  end if
  if (indexFieldIndex < 0)  then
	if (updateFieldValue = "")  then
      obj = WA_generateWhereClause(WA_fieldNames, WA_columns, WA_fieldValues, indexFieldIndex)
      sqlstr = "select " & WA_indexField & " from " & WA_table & " where " &  obj & " order by " & WA_indexField & " DESC"
      set WA_eCartRecordset = Server.CreateObject("ADODB.Recordset")
      WA_eCartRecordset.ActiveConnection = WA_connection
      WA_eCartRecordset.Source = sqlstr
      WA_eCartRecordset.CursorType = 0
      WA_eCartRecordset.CursorLocation = 2
      WA_eCartRecordset.LockType = 1
      WA_eCartRecordset.Open()
	  if (NOT WA_eCartRecordset.EOF)  then  Session(WA_sessionName) = WA_eCartRecordset.Fields.Item(WA_indexField).Value
	  WA_eCartRecordset.Close()
	else
	  Session(WA_sessionName) = updateFieldValue
	end if
  else
    Session(WA_sessionName) = WA_fieldValues(indexFieldIndex)
  end if
  if (WA_redirectURL <> "")  then
    Response.Redirect(WA_redirectURL)
  end if
end if
%>

Open in new window


Grateful for any help -

Thank you
0
Comment
Question by:garethtnash
  • 3
  • 2
  • 2
7 Comments
 
LVL 8

Expert Comment

by:jawa29
ID: 36992933
Hi

Looks like your missing a " on the end of line 15 above.

It should end
")"%>

Open in new window

Not
")%>

Open in new window


Jawa29
0
 
LVL 15

Expert Comment

by:pateljitu
ID: 36992975
Try replacing line 15 as in your code above i.e.

WA_fieldValuesStr = "Y" & "|" & "N" & "|" & WA_eCDB_ConvertNumber("" & cStr( Session("USERID") ) & "") & "|" & WA_eCDB_ConvertNumber("0") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_TotalColumn(ShoppingCart, "TotalPrice")) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_GetShipping(ShoppingCart)) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_GetRuleValueByName(ShoppingCart, "Discounts", URLDecode("Non Vatable"))) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_GrandTotal(ShoppingCart)) & "") & "|" & "" & tgiCredit & "" & "|" & "" & cStr( Session("CLUBNAME") ) & "" & "|" & "" & cStr( Session("ADDRESS1") ) & "" & "|" & "" & cStr( Session("ADDRESS2") ) & "" & "|" & "" & cStr( Session("TOWN") ) & "" & "|" & "" & cStr( Session("REGION") ) & "" & "|" & "" & cStr( Session("POSTCODE") ) & "" & "|" & "" & cStr( Session("COUNTRY") ) & "" & "|" & "" & cStr(Session("PHONE")) & "" & "|" & "<%Request(" & Chr(34) & "Notes" & Chr(34) & ")%>
"

with this

WA_fieldValuesStr = "Y | N |" & WA_eCDB_ConvertNumber("" & cStr( Session("USERID") ) & "") & "|" & WA_eCDB_ConvertNumber("0") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_TotalColumn(ShoppingCart, "TotalPrice")) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_GetShipping(ShoppingCart)) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_GetRuleValueByName(ShoppingCart, "Discounts", URLDecode("Non Vatable"))) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_GrandTotal(ShoppingCart)) & "") & "|" & "" & tgiCredit & "" & "|" & "" & cStr( Session("CLUBNAME") ) & "" & "|" & "" & cStr( Session("ADDRESS1") ) & "" & "|" & "" & cStr( Session("ADDRESS2") ) & "" & "|" & "" & cStr( Session("TOWN") ) & "" & "|" & "" & cStr( Session("REGION") ) & "" & "|" & "" & cStr( Session("POSTCODE") ) & "" & "|" & "" & cStr( Session("COUNTRY") ) & "" & "|" & "" & cStr(Session("PHONE")) & "" & "|" & Request("Notes") &""
0
 
LVL 8

Accepted Solution

by:
jawa29 earned 1000 total points
ID: 36992998
Well spotted pateljitu

The whole end of that line is wrong, it should be
" & Request(" & Chr(34) & "Notes" & Chr(34) & ")"

Open in new window

and not
"<%Request(" & Chr(34) & "Notes" & Chr(34) & ")%>

Open in new window


Jawa29
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:garethtnash
ID: 36993044
Thanks guys, but now with the code below -

<%dim tgiCredit
tgiCredit = Request("TGICredit")
if tgiCredit = "" then 
tgiCredit = "N" 
else 
tgiCredit = CStr( tgiCredit )
end if %>
<%
if ("" = "")  then
  WA_connection = MM_GolfConnection_STRING
  WA_table = "dbo.Ordertb"
  WA_redirectURL = ""
  WA_indexField = "OrderID"
  WA_fieldNamesStr = "Direct-Order|Pro-Direct-Order|MemberID|ProID|OrderSubTotal|OrderDeliveryCharge|OrderTaxDiscount|OrderTotal|UseTGICredit|OrderAddressee|OrderAddress1|OrderAddress2|OrderTown|OrderCounty|OrderPostcode|OrderCountry|OrderPhone|OrderComments"
  WA_fieldValuesStr = "Y | N |" & WA_eCDB_ConvertNumber("" & cStr( Session("USERID") ) & "") & "|" & WA_eCDB_ConvertNumber("0") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_TotalColumn(ShoppingCart, "TotalPrice")) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_GetShipping(ShoppingCart)) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_GetRuleValueByName(ShoppingCart, "Discounts", URLDecode("Non Vatable"))) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_GrandTotal(ShoppingCart)) & "") & "|" & "" & tgiCredit & "" & "|" & "" & cStr( Session("CLUBNAME") ) & "" & "|" & "" & cStr( Session("ADDRESS1") ) & "" & "|" & "" & cStr( Session("ADDRESS2") ) & "" & "|" & "" & cStr( Session("TOWN") ) & "" & "|" & "" & cStr( Session("REGION") ) & "" & "|" & "" & cStr( Session("POSTCODE") ) & "" & "|" & "" & cStr( Session("COUNTRY") ) & "" & "|" & "" & cStr(Session("PHONE")) & "" & "|" & Request("Notes") &""
  WA_columnTypesStr = "',none,''|',none,''|none,none,NULL|none,none,NULL|none,none,NULL|none,none,NULL|none,none,NULL|none,none,NULL|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''"
  WA_sessionName = "ORDERID"
  indexFieldIndex = -1
  WA_fieldValues = Split(WA_fieldValuesStr,"|")
  WA_fieldNames = Split(WA_fieldNamesStr,"|")
  WA_columns = Split(WA_columnTypesStr,"|")
  set WA_editCmd = Server.CreateObject("ADODB.Command")
  updateFieldValue = ""
  WA_editCmd.ActiveConnection = WA_connection
  if (WA_redirectURL <> "" AND Request.QueryString <> "" AND Request.QueryString.Count > 0) then
    if (inStr(WA_redirectURL,"?") > 0)  then
	  WA_redirectURL = WA_redirectURL & "&"
	else
	  WA_redirectURL = WA_redirectURL & "?"
	end if
    WA_redirectURL = WA_redirectURL & Request.QueryString
  end if
  for i = 0 to Ubound(WA_fieldNames)
    if (WA_indexField  = WA_fieldNames(i)) then
      indexFieldIndex = i
      exit for
    end if
  next
  if (indexFieldIndex >= 0) then  updateFieldValue = WA_fieldValues(indexFieldIndex)
  if (updateFieldValue = "") then updateFieldValue = cStr(Session(WA_sessionName))
  updateColType = "none,none,NULL"
  if (indexFieldIndex >= 0)  then
     updateColType = WA_columns(indexFieldIndex)
  end if
  if (updateFieldValue <> "" AND updateFieldValue <> "undefined")  then
      valueForWhere = WA_generateInsertParams(Array(WA_indexField), Array(updateColType), Array(updateFieldValue), -1)
      sqlstr = "select " & WA_indexField & " from " & WA_table & " where " & WA_indexField & " = " & valueForWhere(2) & " order by " & WA_indexField & " DESC"
      set WA_eCartRecordset = Server.CreateObject("ADODB.Recordset")
      WA_eCartRecordset.ActiveConnection = WA_connection
      WA_eCartRecordset.Source = sqlstr
      WA_eCartRecordset.CursorType = 0
      WA_eCartRecordset.CursorLocation = 2
      WA_eCartRecordset.LockType = 1
      WA_eCartRecordset.Open()
	  if (NOT WA_eCartRecordset.EOF)  then  
	    updateFieldValue = cStr(WA_eCartRecordset.Fields.Item(WA_indexField).Value)
	  else
	    updateFieldValue = ""
	  end if
	  WA_eCartRecordset.Close()
  end if
  if (updateFieldValue <> "" AND updateFieldValue <> "undefined")  then
    updateParamsObj = WA_generateInsertParams(WA_fieldNames, WA_columns, WA_fieldValues, indexFieldIndex)
	  valueForWhere = WA_generateInsertParams(Array(WA_indexField), Array(updateColType), Array(updateFieldValue), -1)
	  WA_editCmd.CommandText = "update " & WA_table & " SET " & updateParamsObj(3) & " where " & WA_indexField & " = " & valueForWhere(2)
    WA_editCmd.Execute()
	  WA_editCmd.ActiveConnection.Close()
  else
    updateFieldValue = ""
    insertParamsObj = WA_generateInsertParams(WA_fieldNames, WA_columns, WA_fieldValues, -1)
    WA_editCmd.CommandText = "insert into " & WA_table & " (" & insertParamsObj(1) & ") values (" & insertParamsObj(2) & ")"
    WA_editCmd.Execute()
    WA_editCmd.ActiveConnection.Close()
  end if
  if (indexFieldIndex < 0)  then
	if (updateFieldValue = "")  then
      obj = WA_generateWhereClause(WA_fieldNames, WA_columns, WA_fieldValues, indexFieldIndex)
      sqlstr = "select " & WA_indexField & " from " & WA_table & " where " &  obj & " order by " & WA_indexField & " DESC"
      set WA_eCartRecordset = Server.CreateObject("ADODB.Recordset")
      WA_eCartRecordset.ActiveConnection = WA_connection
      WA_eCartRecordset.Source = sqlstr
      WA_eCartRecordset.CursorType = 0
      WA_eCartRecordset.CursorLocation = 2
      WA_eCartRecordset.LockType = 1
      WA_eCartRecordset.Open()
	  if (NOT WA_eCartRecordset.EOF)  then  Session(WA_sessionName) = WA_eCartRecordset.Fields.Item(WA_indexField).Value
	  WA_eCartRecordset.Close()
	else
	  Session(WA_sessionName) = updateFieldValue
	end if
  else
    Session(WA_sessionName) = WA_fieldValues(indexFieldIndex)
  end if
  if (WA_redirectURL <> "")  then
    Response.Redirect(WA_redirectURL)
  end if
end if
%>

Open in new window


I get

Microsoft OLE DB Provider for SQL Server error '80040e14'

Incorrect syntax near '-'.

/confirmation2.asp, line 79


Where line 79 is     WA_editCmd.Execute()
0
 
LVL 15

Assisted Solution

by:pateljitu
pateljitu earned 1000 total points
ID: 36993167
Can you please try Response.Write for this line:

Nor sure if code is for Update or Insert, so please try on both lines:

WA_editCmd.CommandText = "update " & WA_table & " SET " & updateParamsObj(3) & " where " & WA_indexField & " = " & valueForWhere(2)
Response.Write("update " & WA_table & " SET " & updateParamsObj(3) & " where " & WA_indexField & " = " & valueForWhere(2))
Response.end
WA_editCmd.Execute()

AND

WA_editCmd.Execute()
Response.Write("insert into " & WA_table & " (" & insertParamsObj(1) & ") values (" & insertParamsObj(2) & ")")
Response.end
WA_editCmd.Execute()
0
 

Author Comment

by:garethtnash
ID: 36993241
Hi Guys, thanks I found the issue, some of my columns are named with - hypens and I hadn't surrounded these [] however...

The saga continues, having got the first part completed,

the next part is failing ---

Microsoft VBScript runtime error '800a0009'
Subscript out of range: 'indexFieldIndex'
/includes/Store-Cart-Detail.asp, line 31

my code is --

<%' WA eCart Store Cart Details in Db
if ("" = "") then
  WA_connection = MM_GolfConnection_STRING
  WA_table = "dbo.OrderDetail"
  WA_redirectURL = ""
  WA_indexField = "ID"
  WA_fieldNamesStr = "OrderID|ProductID|ProductName|ProductSKU|Price|Quantity|TotalPrice"
  WA_fieldValuesStr = WA_eCDB_ConvertNumber("" & cStr( Session("ORDERID") ) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_DisplayInfo(ShoppingCart, "ID")) & "") & "|" & "" & cStr(WA_eCart_DisplayInfo(ShoppingCart, "Name")) & "" & "|" & "" & cStr(WA_eCart_DisplayInfo(ShoppingCart, "SKU")) & "" & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_DisplayInfo(ShoppingCart, "Price")) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_DisplayInfo(ShoppingCart, "Quantity")) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_DisplayInfo(ShoppingCart, "TotalPrice")) & "")
  WA_columnTypesStr = "none,none,NULL|none,none,NULL|',none,''|',none,''|none,none,NULL|none,none,NULL|none,none,NULL"
  indexFieldIndex = -1
  WA_fieldValues = Split(WA_fieldValuesStr,"|")
  if (WA_redirectURL <> "" AND Request.QueryString <> "" AND Request.QueryString.Count > 0) then
    if (inStr(WA_redirectURL,"?") > 0)  then
	  WA_redirectURL = WA_redirectURL & "&"
	else
	  WA_redirectURL = WA_redirectURL & "?"
	end if
    WA_redirectURL = WA_redirectURL & Request.QueryString
  end if
  WA_cmdObjString = "ADODB.Command"
  set WA_editCmd = Server.CreateObject(WA_cmdObjString)
  WA_editCmd.ActiveConnection = WA_connection
  WA_fieldNames = Split(WA_fieldNamesStr,"|")
  WA_columns = Split(WA_columnTypesStr,"|")
  for i = 0 to Ubound(WA_fieldNames)
    if (WA_indexField  = WA_fieldNames(i)) then
      indexFieldIndex = i
      exit for
    end if
  next
  deleteFieldValue = cStr(WA_fieldValues(indexFieldIndex))
  if (deleteFieldValue <> "" AND deleteFieldValue <> "undefined") then
    deleteParamsObj = WA_generateInsertParams(Array(WA_indexField), Array(WA_columns(indexFieldIndex)), Array(deleteFieldValue), -1)
    WA_editCmd.CommandText = "Delete from " & WA_table & " where " & WA_indexField & " = " & deleteParamsObj(2)
    WA_editCmd.Execute()
  end if
  set ShoppingCart = WA_eCart_MoveFirst(ShoppingCart)
  while (NOT WA_eCart_EOF(ShoppingCart))
    WA_fieldValuesStr = WA_eCDB_ConvertNumber("" & cStr( Session("ORDERID") ) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_DisplayInfo(ShoppingCart, "ID")) & "") & "|" & "" & cStr(WA_eCart_DisplayInfo(ShoppingCart, "Name")) & "" & "|" & "" & cStr(WA_eCart_DisplayInfo(ShoppingCart, "SKU")) & "" & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_DisplayInfo(ShoppingCart, "Price")) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_DisplayInfo(ShoppingCart, "Quantity")) & "") & "|" & WA_eCDB_ConvertNumber("" & cStr(WA_eCart_DisplayInfo(ShoppingCart, "TotalPrice")) & "")
    WA_fieldValues = Split(WA_fieldValuesStr,"|")
    insertParamsObj = WA_generateInsertParams(WA_fieldNames, WA_columns, WA_fieldValues, -1)
    WA_editCmd.CommandText = "insert into " & WA_table & " (" & insertParamsObj(1) & ") values (" & insertParamsObj(2) & ")"
    WA_editCmd.Execute()
    set ShoppingCart = WA_eCart_MoveNext(ShoppingCart)
  wend
  set ShoppingCart = WA_eCart_MoveFirst(ShoppingCart)
  WA_editCmd.ActiveConnection.Close()
  if (WA_redirectURL <> "")  then
    Response.Redirect(WA_redirectURL)
  end if
end if
%>

Open in new window


Thank you
0
 

Author Closing Comment

by:garethtnash
ID: 36993352
All sorted thanks Chaps
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

868 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question