View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Single Record Update

Thread began 10/06/2009 12:57 am by gcollins189987 | Last modified 10/06/2009 6:05 pm by gcollins189987 | 628 views | 2 replies

gcollins189987

Single Record Update

My update doesn't seem to be updating my record.

I don't get any errors it just doesn't seem to be updating my column. Before the page is loaded it is supposed to update a single record.

It is using two url parameters for the insert. First one to find the record and the second one is the value I want to insert.

Example:

uniquecode = gcollins
userid = 543351169_31263066234_r



Here is my code:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="WA_DataAssist/WA_AppBuilder_VB.asp" -->
<!--#include file="Connections/conn_Core.asp" -->

<%

If (NOT Session("UserExisting")) Then %>

<%

' WA Application Builder Update
if ("" = "") then
WA_connection = MM_conn_Core_STRING
WA_table = "tbl_Students"
WA_redirectURL = ""
WA_keepQueryString = true
WA_indexField = "StudentUserName"
WA_fieldNamesStr = "StudentKPID"
WA_fieldValuesStr = "Request.QueryString(" & Chr(34) & "userid" & Chr(34) & ")"
WA_columnTypesStr = "',none,''"
WA_comparisonStr = "="
WA_fieldNames = Split(WA_fieldNamesStr,"|")
WA_fieldValues = Split(WA_fieldValuesStr,"|")
WA_columns = Split(WA_columnTypesStr,"|")
WA_comparisions = Split(WA_comparisonStr, "|")

WA_where_fieldValuesStr = "Request.QueryString(" & Chr(34) & "uniquecode" & Chr(34) & ")"
WA_where_columnTypesStr = "',none,''"
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 & ""
MM_editCmd.Execute()
MM_editCmd.ActiveConnection.Close()
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 & "&"
else
WA_redirectURL = WA_redirectURL & "?"
end if
WA_redirectURL = WA_redirectURL & Request.QueryString
end if
Response.Redirect(WA_redirectURL)
end if
end if
%>
<%
Else

Response.Redirect("************")

End If
%>


Any Thoughts?

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

Content

rating

Layout

rating

Ease of use

rating

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