Solved

NEW GUY NEEDS HELP

Posted on 2006-06-23
3
356 Views
Last Modified: 2008-01-09
Hi,
I am having a bit of a problem.   I don't have much mysql experience and am faced with a problem.  I am using a menu to select a field called 'businessname' in a table called users.   On submit this value is added to a field called 'businessname' in a table called paymaker.   Here is my problem.   I need to also get the field 'ID' from the same record in users and add it the the table paymaker in a field called 'userid' along with the original value 'businessname'.

So what I am trying to say is that I need both fields from the same record that I select in the menu.   I have asked this question before, but was a little confused about the responses due to my limited experience with sql.  

My pages are ASP VBscript and my database is msaccess.   So is there someway that when I pass the businessname record that it automatically brings the ID with it?

Please help me.  And if possible make it simple for me to understand
Regards
0
Comment
Question by:budgilbert67
3 Comments
 
LVL 6

Accepted Solution

by:
T_and_T earned 500 total points
ID: 16973632
Hello

Can you post some code to show what you are trying to do?  If I am understanding you correctly, one way to accomplish what you are trying to do is select multiple fields from a table in the database.  For example, if you have sql statements in your code you can say:

SELECT businessname, ID FROM users;

This will give you the businessname and ID for each entry in the users database.  Then you can set each of those to variables and then you can do an SQL statement to insert the items into another table like the following:

INSERT INTO paymaker (userid, businessname) VALUES ( variable1, variable2);

This will insert variable1 and variable2, which you assigned in the top SQL statement, into the table paymaker under the fields userid and businessname.

Please let me know what you think or if you need any more information.

T_AND_T
0
 

Author Comment

by:budgilbert67
ID: 16973695
This is the page. I am using Dreamweaver MX and NeXTeso Mx

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!-- #include file="../includes/wdg/WDG.asp" -->
<!--#include file="../Connections/accessdsn.asp" -->
<!--#include file="../includes/common/KT_common.asp" -->
<!--#include file="../includes/nxt/KT_back.asp" -->
<!--#include file="../includes/tNG/tNG.inc.asp" -->
<%
'Make a transaction dispatcher instance
Dim tNGs: Set tNGs = new tNG_dispatcher
tNGs.Init "../"
%>
<%
' Start trigger
Dim formValidation: Set formValidation = new tNG_FormValidation
formValidation.Init
formValidation.addField "schedule_date", true, "text", "", "", "", ""
formValidation.addField "userid", true, "text", "", "", "", ""
formValidation.addField "pmbuilder", true, "text", "", "", "", ""
formValidation.addField "pmaddress", true, "text", "", "", "", ""
formValidation.addField "pmcity", true, "text", "", "", "", ""
formValidation.addField "pmtype", true, "text", "", "", "", ""
tNGs.prepareValidation formValidation
' End trigger
%>
<%
Dim Recordset1__varregion
Recordset1__varregion = "1"
If (Session("kt_region") <> "") Then
  Recordset1__varregion = Session("kt_region")
End If
%>
<%
Dim Recordset1__varcompany
Recordset1__varcompany = "3"
If (Session("kt_company") <> "") Then
  Recordset1__varcompany = Session("kt_company")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_accessdsn_STRING
Recordset1.Source = "SELECT*  FROM users  WHERE security = 'contractor' AND region = '" + Replace(Recordset1__varregion, "'", "''") + "' AND company = '" + Replace(Recordset1__varcompany, "'", "''") + "'"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
rspaymaker_numRows = rspaymaker_numRows + Repeat1__numRows
%>
<%
' Make an insert transaction instance
Dim ins_paymaker: Set ins_paymaker = new tNG_multipleInsert
ins_paymaker.init MM_accessdsn_STRING
tNGs.addTransaction ins_paymaker
' Register triggers
ins_paymaker.registerTrigger Array("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1")
ins_paymaker.registerTrigger Array("BEFORE", "Trigger_Default_FormValidation", 10, formValidation)
ins_paymaker.registerTrigger Array("END", "Trigger_Default_Redirect", 99, "../includes/nxt/back.asp")
' Add columns
ins_paymaker.setTable "paymaker"
ins_paymaker.addColumn "schedule_date", "DATE_TYPE", "POST", "schedule_date", ""
ins_paymaker.addColumn "job_status", "STRING_TYPE", "POST", "job_status", "scheduled"
ins_paymaker.addColumn "job_condition", "STRING_TYPE", "POST", "job_condition", "get"
ins_paymaker.addColumn "userid", "STRING_TYPE", "POST", "userid", ""
ins_paymaker.addColumn "pmbuilder", "STRING_TYPE", "POST", "pmbuilder", ""
ins_paymaker.addColumn "pmaddress", "STRING_TYPE", "POST", "pmaddress", ""
ins_paymaker.addColumn "pmcity", "STRING_TYPE", "POST", "pmcity", ""
ins_paymaker.addColumn "pmnote", "STRING_TYPE", "POST", "pmnote", ""
ins_paymaker.addColumn "pmtype", "STRING_TYPE", "POST", "pmtype", ""
ins_paymaker.addColumn "pmcomplete", "STRING_TYPE", "POST", "pmcomplete", "No"
ins_paymaker.addColumn "pmpay", "NUMERIC_TYPE", "POST", "pmpay", ""
ins_paymaker.addColumn "company", "STRING_TYPE", "POST", "company", "{SESSION.kt_company}"
ins_paymaker.addColumn "location", "STRING_TYPE", "POST", "location", "{SESSION.kt_region}"
ins_paymaker.addColumn "record_date", "STRING_TYPE", "VALUE", "", ""
ins_paymaker.addColumn "scheduled_by", "STRING_TYPE", "POST", "scheduled_by", "{SESSION.kt_firstname} {SESSION.kt_lastname}"
ins_paymaker.addColumn "pmdate", "DATE_TYPE", "POST", "pmdate", ""
ins_paymaker.setPrimaryKey "ID", "NUMERIC_TYPE", "", ""
%>
<%
' Make an update transaction instance
Dim upd_paymaker: Set upd_paymaker = new tNG_multipleUpdate
upd_paymaker.init MM_accessdsn_STRING
tNGs.addTransaction upd_paymaker
' Register triggers
upd_paymaker.registerTrigger Array("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Update1")
upd_paymaker.registerTrigger Array("BEFORE", "Trigger_Default_FormValidation", 10, formValidation)
upd_paymaker.registerTrigger Array("END", "Trigger_Default_Redirect", 99, "../includes/nxt/back.asp")
' Add columns
upd_paymaker.setTable "paymaker"
upd_paymaker.addColumn "schedule_date", "DATE_TYPE", "POST", "schedule_date"
upd_paymaker.addColumn "job_status", "STRING_TYPE", "POST", "job_status"
upd_paymaker.addColumn "job_condition", "STRING_TYPE", "POST", "job_condition"
upd_paymaker.addColumn "userid", "STRING_TYPE", "POST", "userid"
upd_paymaker.addColumn "pmbuilder", "STRING_TYPE", "POST", "pmbuilder"
upd_paymaker.addColumn "pmaddress", "STRING_TYPE", "POST", "pmaddress"
upd_paymaker.addColumn "pmcity", "STRING_TYPE", "POST", "pmcity"
upd_paymaker.addColumn "pmnote", "STRING_TYPE", "POST", "pmnote"
upd_paymaker.addColumn "pmtype", "STRING_TYPE", "POST", "pmtype"
upd_paymaker.addColumn "pmcomplete", "STRING_TYPE", "POST", "pmcomplete"
upd_paymaker.addColumn "pmpay", "NUMERIC_TYPE", "POST", "pmpay"
upd_paymaker.addColumn "company", "STRING_TYPE", "POST", "company"
upd_paymaker.addColumn "location", "STRING_TYPE", "POST", "location"
upd_paymaker.addColumn "record_date", "STRING_TYPE", "CURRVAL", ""
upd_paymaker.addColumn "scheduled_by", "STRING_TYPE", "POST", "scheduled_by"
upd_paymaker.addColumn "pmdate", "DATE_TYPE", "POST", "pmdate"
upd_paymaker.setPrimaryKey "ID", "NUMERIC_TYPE", "GET", "ID"
%>
<%
' Make a delete transaction instance
Dim del_paymaker: Set del_paymaker = new tNG_multipleDelete
del_paymaker.init MM_accessdsn_STRING
tNGs.addTransaction del_paymaker
' Register triggers
del_paymaker.registerTrigger Array("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Delete1")
del_paymaker.registerTrigger Array("END", "Trigger_Default_Redirect", 99, "../includes/nxt/back.asp")
' Add columns
del_paymaker.setTable "paymaker"
del_paymaker.setPrimaryKey "ID", "NUMERIC_TYPE", "GET", "ID"
%>
<%
'Execute all the registered transactions
tNGs.executeTransactions
%>
<%
'Get the transaction recordset
Dim rspaymaker
Dim rspaymaker_numRows

Set rspaymaker = tNGs.getRecordset("paymaker")
rspaymaker_numRows = 0
%>
<%
Dim rspaymaker_total
rspaymaker_total = KT_getNumberOfRows(rspaymaker)
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wdg="http://www.interaktonline.com/MXWidgets">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Schedule Detail Page</title>
<style type="text/css">
<!--
body {
      margin-left: 0px;
      margin-top: 0px;
      margin-right: 0px;
}
.style1 {font-family: Arial, Helvetica, sans-serif}
-->
</style>
<link href="../includes/skins/mxkollection3.css" rel="stylesheet" type="text/css" media="all" />
<script src="../includes/common/js/base.js" type="text/javascript"></script>
<script src="../includes/common/js/utility.js" type="text/javascript"></script>
<script src="../includes/skins/style.js" type="text/javascript"></script>
<% Response.Write tNGs.displayValidationRules()%>
<script src="../includes/nxt/scripts/form.js" type="text/javascript"></script>
<script src="../includes/nxt/scripts/form.js.asp" type="text/javascript"></script>
<script type="text/javascript">
$NXT_FORM_SETTINGS = {
  duplicate_buttons: true,
  show_as_grid: false,
  merge_down_value: false
}
</script>
<script type="text/javascript" src="../includes/common/js/sigslot_core.js"></script>
<script type="text/javascript" src="../includes/wdg/classes/MXWidgets.js"></script>
<script type="text/javascript" src="../includes/wdg/classes/MXWidgets.js.asp"></script>
<script type="text/javascript" src="../includes/wdg/classes/Calendar.js"></script>
<script type="text/javascript" src="../includes/wdg/classes/SmartDate.js"></script>
<script type="text/javascript" src="../includes/wdg/calendar/calendar_stripped.js"></script>
<script type="text/javascript" src="../includes/wdg/calendar/calendar-setup_stripped.js"></script>
<script src="../includes/resources/calendar.js"></script>
<script type="text/javascript" src="../includes/wdg/classes/JSRecordset.js"></script>
<script type="text/javascript" src="../includes/wdg/classes/DependentDropdown.js"></script>
<%
'begin JSRecordset
Dim jsObject_Recordset6: Set jsObject_Recordset6 = new WDG_JsRecordset
      jsObject_Recordset6.Init "Recordset6"
Response.write jsObject_Recordset6.getOutput()
'end JSRecordset
%>
</head>

<body>
<table width="100%" border="0" cellpadding="0" bgcolor="#CCCCCC">
  <tr>
    <td>&nbsp;</td>
    <td><div align="center"><strong><span class="style1">SCHEDULE DETAIL PAGE </span></strong></div></td>
    <td>&nbsp;</td>
  </tr>
</table>
<p>&nbsp;</p>
<table width="62%" border="0" align="center" cellpadding="0">
  <tr>
    <td><div align="center">
      <%
      Response.Write tNGs.getErrorMsg()
%>
      <div class="KT_tng">
        <h1>
          <%
' Show IF Conditional region1
  If Request.QueryString("ID") = "" Then
%>
            <%=NXT_getResource("Insert_FH")%>
            <%
' else Conditional region1
  Else %>
            <%=NXT_getResource("Update_FH")%>
            <%
  End If
' End Conditional region1
%>
          Paymaker </h1>
        <div class="KT_tngform">
          <form method="post" id="form1" action="<%= KT_escapeAttribute(KT_getFullUri()) %>">
            <% cnt1 = 0 %>
            <%
While ((Repeat1__numRows <> 0) AND (NOT rspaymaker.EOF))
%>
              <% cnt1 = cnt1 + 1 %>
              <% tNGs.SetCounter cnt1 %>
              <%
' Show IF Conditional region1
  If rspaymaker_total > 1 Then
%>
                <h2><%=NXT_getResource("Record_FH")%> <%=cnt1%></h2>
                <%
  End If
' End Conditional region1
%>
              <table cellpadding="2" cellspacing="0" class="KT_tngtable">
                <tr>
                  <td class="KT_th"><label for="schedule_date_<%= cnt1 %>">Schedule Date:</label></td>
                  <td><div align="left">
                    <input name="schedule_date_<%= cnt1 %>" id="schedule_date_<%= cnt1 %>" value="<%= KT_formatDate((rspaymaker.Fields.Item("schedule_date").Value))%>" size="13" maxlength="50" wdg:subtype="Calendar" wdg:mask="<%= KT_screen_date_format %>" wdg:type="widget" wdg:mondayfirst="false" wdg:singleclick="true" wdg:restricttomask="no" />
                    <%=(tNGs.displayFieldHint("schedule_date"))%> <%=(tNGs.displayFieldError("paymaker", "schedule_date"))%> </div></td>
                </tr>
                <tr>
                  <td class="KT_th">&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td class="KT_th"><label for="userid_<%= cnt1 %>">Contractor:</label></td>
                  <td><div align="left">
                    <select name="userid_<%= cnt1 %>" id="userid_<%= cnt1 %>">
                      <option value=""><%=NXT_getResource("Select one...")%></option>
                      <%
While (NOT Recordset1.EOF)
%>
                      <option value="<%=(Recordset1.Fields.Item("ID").Value)%>" <%If (Not isNull((rspaymaker.Fields.Item("userid").Value))) Then If (CStr(Recordset1.Fields.Item("ID").Value) = CStr((rspaymaker.Fields.Item("userid").Value))) Then Response.Write("SELECTED") : Response.Write("")%> ><%=(KT_escapeAttribute(Recordset1.Fields.Item("businessname").Value))%></option>
                      <%
  Recordset1.MoveNext()
Wend
If (Recordset1.CursorType > 0) Then
  Recordset1.MoveFirst
Else
  Recordset1.Requery
End If
%>
                      </select>
                    <%=(tNGs.displayFieldError("paymaker", "userid"))%> </div></td>
                </tr>
                <tr>
                  <td class="KT_th"><label for="pmbuilder_<%= cnt1 %>">Builder/Customer:</label></td>
                  <td><div align="left">
                    <input type="text" name="pmbuilder_<%= cnt1 %>" id="pmbuilder_<%= cnt1 %>" value="<%=(KT_escapeAttribute(rspaymaker.Fields.Item("pmbuilder").Value))%>" size="50" maxlength="50" />
                    <%=(tNGs.displayFieldHint("pmbuilder"))%> <%=(tNGs.displayFieldError("paymaker", "pmbuilder"))%> </div></td>
                </tr>
                <tr>
                  <td class="KT_th"><label for="pmaddress_<%= cnt1 %>">Address:</label></td>
                  <td><div align="left">
                    <input type="text" name="pmaddress_<%= cnt1 %>" id="pmaddress_<%= cnt1 %>" value="<%=(KT_escapeAttribute(rspaymaker.Fields.Item("pmaddress").Value))%>" size="50" maxlength="50" />
                    <%=(tNGs.displayFieldHint("pmaddress"))%> <%=(tNGs.displayFieldError("paymaker", "pmaddress"))%> </div></td>
                </tr>
                <tr>
                  <td class="KT_th"><label for="pmcity_<%= cnt1 %>">City:</label></td>
                  <td><div align="left">
                    <input type="text" name="pmcity_<%= cnt1 %>" id="pmcity_<%= cnt1 %>" value="<%=(KT_escapeAttribute(rspaymaker.Fields.Item("pmcity").Value))%>" size="32" maxlength="50" />
                    <%=(tNGs.displayFieldHint("pmcity"))%> <%=(tNGs.displayFieldError("paymaker", "pmcity"))%> </div></td>
                </tr>
                <tr>
                  <td class="KT_th"><label for="pmnote_<%= cnt1 %>">Note:</label></td>
                  <td><div align="left">
                    <textarea name="pmnote_<%= cnt1 %>" id="pmnote_<%= cnt1 %>" cols="50" rows="5"><%=(KT_escapeAttribute(rspaymaker.Fields.Item("pmnote").Value))%></textarea>
                    <%=(tNGs.displayFieldHint("pmnote"))%> <%=(tNGs.displayFieldError("paymaker", "pmnote"))%> </div></td>
                </tr>
                <tr>
                  <td class="KT_th"><label for="pmtype_<%= cnt1 %>">Type:</label></td>
                  <td><div align="left">
                    <select name="pmtype_<%= cnt1 %>" id="pmtype_<%= cnt1 %>">
                      <option value="Install" <%If (Not isNull((KT_escapeAttribute(rspaymaker.Fields.Item("pmtype").Value)))) Then If ("Install" = CStr((KT_escapeAttribute(rspaymaker.Fields.Item("pmtype").Value)))) Then Response.Write("SELECTED") : Response.Write("")%>>Install</option>
                      <option value="Service" <%If (Not isNull((KT_escapeAttribute(rspaymaker.Fields.Item("pmtype").Value)))) Then If ("Service" = CStr((KT_escapeAttribute(rspaymaker.Fields.Item("pmtype").Value)))) Then Response.Write("SELECTED") : Response.Write("")%>>Service</option>
                      <option value="Punch Out" <%If (Not isNull((KT_escapeAttribute(rspaymaker.Fields.Item("pmtype").Value)))) Then If ("Punch Out" = CStr((KT_escapeAttribute(rspaymaker.Fields.Item("pmtype").Value)))) Then Response.Write("SELECTED") : Response.Write("")%>>Punch Out</option>
                      <option value="Trip Charge" <%If (Not isNull((KT_escapeAttribute(rspaymaker.Fields.Item("pmtype").Value)))) Then If ("Trip Charge" = CStr((KT_escapeAttribute(rspaymaker.Fields.Item("pmtype").Value)))) Then Response.Write("SELECTED") : Response.Write("")%>>Trip Charge</option>
                      <option value="Other" <%If (Not isNull((KT_escapeAttribute(rspaymaker.Fields.Item("pmtype").Value)))) Then If ("Other" = CStr((KT_escapeAttribute(rspaymaker.Fields.Item("pmtype").Value)))) Then Response.Write("SELECTED") : Response.Write("")%>>Other</option>
                      </select>
                    <%=(tNGs.displayFieldError("paymaker", "pmtype"))%> </div></td>
                </tr>
                <tr>
                  <td class="KT_th"><label for="pmcomplete_<%= cnt1 %>">Complete:</label></td>
                  <td><div align="left">
                    <select name="pmcomplete_<%= cnt1 %>" id="pmcomplete_<%= cnt1 %>">
                        <option value="Yes" <%If (Not isNull((KT_escapeAttribute(rspaymaker.Fields.Item("pmcomplete").Value)))) Then If ("Yes" = CStr((KT_escapeAttribute(rspaymaker.Fields.Item("pmcomplete").Value)))) Then Response.Write("selected=""selected""") : Response.Write("")%>>Yes</option>
                        <option value="No" <%If (Not isNull((KT_escapeAttribute(rspaymaker.Fields.Item("pmcomplete").Value)))) Then If ("No" = CStr((KT_escapeAttribute(rspaymaker.Fields.Item("pmcomplete").Value)))) Then Response.Write("selected=""selected""") : Response.Write("")%>>No</option>
                      </select>
                    <%=(tNGs.displayFieldError("paymaker", "pmcomplete"))%> </div></td>
                </tr>
                <tr>
                  <td class="KT_th"><label for="pmpay_<%= cnt1 %>">Pay:</label></td>
                  <td><div align="left">
                    <input type="text" name="pmpay_<%= cnt1 %>" id="pmpay_<%= cnt1 %>" value="<%=(KT_escapeAttribute(rspaymaker.Fields.Item("pmpay").Value))%>" size="7" />
                    <%=(tNGs.displayFieldHint("pmpay"))%> <%=(tNGs.displayFieldError("paymaker", "pmpay"))%> </div></td>
                </tr>
                <tr>
                  <td class="KT_th"><label for="record_date_<%= cnt1 %>">Date Recorded :</label></td>
                  <td><div align="left"><%=(KT_escapeAttribute(rspaymaker.Fields.Item("record_date").Value))%></div></td>
                </tr>
                <tr>
                  <td class="KT_th"><label for="scheduled_by_<%= cnt1 %>">Scheduled by:</label></td>
                  <td><div align="left">
                    <input type="text" name="scheduled_by_<%= cnt1 %>" id="scheduled_by_<%= cnt1 %>" value="<%=(KT_escapeAttribute(rspaymaker.Fields.Item("scheduled_by").Value))%>" size="32" maxlength="50" />
                    <%=(tNGs.displayFieldHint("scheduled_by"))%> <%=(tNGs.displayFieldError("paymaker", "scheduled_by"))%> </div></td>
                </tr>
                <tr>
                  <td nowrap="nowrap" class="KT_th"><label for="pmdate_<%= cnt1 %>">Completion Date:</label></td>
                  <td><div align="left">
                    <input name="pmdate_<%= cnt1 %>" id="pmdate_<%= cnt1 %>" value="<%= KT_formatDate((rspaymaker.Fields.Item("pmdate").Value))%>" size="13" wdg:subtype="Calendar" wdg:mask="<%= KT_screen_date_format %>" wdg:type="widget" wdg:mondayfirst="false" wdg:singleclick="true" wdg:restricttomask="no" />
                    <%=(tNGs.displayFieldHint("pmdate"))%> <%=(tNGs.displayFieldError("paymaker", "pmdate"))%> </div></td>
                </tr>
              </table>
              <input type="hidden" name="kt_pk_paymaker_<%=cnt1%>" class="id_field" value="<%=(KT_escapeAttribute(rspaymaker.Fields.Item("kt_pk_paymaker").Value))%>" />
              <input type="hidden" name="job_status_<%= cnt1 %>" id="job_status_<%= cnt1 %>" value="<%=(KT_escapeAttribute(rspaymaker.Fields.Item("job_status").Value))%>" />
              <input type="hidden" name="job_condition_<%= cnt1 %>" id="job_condition_<%= cnt1 %>" value="<%=(KT_escapeAttribute(rspaymaker.Fields.Item("job_condition").Value))%>" />
              <input type="hidden" name="company_<%= cnt1 %>" id="company_<%= cnt1 %>" value="<%=(KT_escapeAttribute(rspaymaker.Fields.Item("company").Value))%>" />
              <input type="hidden" name="location_<%= cnt1 %>" id="location_<%= cnt1 %>" value="<%=(KT_escapeAttribute(rspaymaker.Fields.Item("location").Value))%>" />
              <%
              Repeat1__index=Repeat1__index+1
              Repeat1__numRows=Repeat1__numRows-1
              rspaymaker.MoveNext()
            Wend
            %>
            <div class="KT_bottombuttons">
              <div>
                <%
            ' Show IF Conditional region1
              If Request.QueryString("ID") = "" Then
            %>
                  <input type="submit" name="KT_Insert1" id="KT_Insert1" value="<%=NXT_getResource("Insert_FB")%>" />
                  <%
            ' else Conditional region1
              Else %>
                  <div class="KT_operations">
                    <input type="submit" name="KT_Insert1" value="<%=NXT_getResource("Insert as new_FB")%>" onClick="nxt_form_insertasnew(this, 'ID')" />
                  </div>
                  <input type="submit" name="KT_Update1" value="<%=NXT_getResource("Update_FB")%>" />
                  <input type="submit" name="KT_Delete1" value="<%=NXT_getResource("Delete_FB")%>" onClick="return confirm('<%=NXT_getResource("Are you sure?")%>');" />
                  <%
                    End If
                  ' End Conditional region1
                  %>
                <input type="button" name="KT_Cancel1" value="<%=NXT_getResource("Cancel_FB")%>" onClick="return UNI_navigateCancel(event, '../includes/nxt/back.asp')" />
              </div>
            </div>
          </form>
       
                   
                    </div>
        <br class="clearfixplain" />
      </div>
      <p>&nbsp;</p>
    </div></td>
  </tr>
</table>
<p align="center">&nbsp;</p>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
0
 

Expert Comment

by:booaazz
ID: 16975063
Hi,

If I understood correctly you want to insert two values businessname and id into the DB based on a selection from the drop list.

Your problem is that you don't have this id value on the web page available to use.

I would suggest you to send over only the id of the businessman back to the server and then perform another query on the server-side page:

x ' this value is from the select box on the client side

SELECT businessname, ID FROM users where ID=" & x

then you can perform the insert based on the values you have from this select you have performed

hope I have been of assitance...

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now