OK!!!!!<br>I think i got it! It has taken me almost 14 hours of scouring, but I think i have finally started to see the LIGHT!!!!<br><br>I created a new DSN called "suites" with pervasive...<br><br>in that DSN, I created a Table called PChookup. In that table, i made 6 columns. I called them : <br>firstName<br>lastName<br>IP_addr<br>phone<br>suite<br>PChook_ans <br><br>This is what I have so Far:<br><br>ok, first page, this is the page with the form on it that asks for the input of the suite's information:<br><br><br><br><br><TABLE CELLPADDING=2 CELLSPACING=5 BORDER=0 WIDTH=480 height=250 bgcolor="white"><br><form action=pc_add_list.asp method=post name=PC_addfrm><br><INPUT type=hidden name=Action VALUE=Add><br><INPUT type=hidden name=IP_num value="<%Response.write(Request.ServerVariables("REMOTE_ADDR"

)%>"><br> <br> <TR VALIGN="top"> <br> <br> <br> <td><p><b><font size="+1">First Name:</font></b></p></td><br> <td><input type=text name=first_nameField></td></tr><br> <br> <tr><td><b><font size="+1">Last Name:</font></b></td><br> <td><input type=text name=last_nameField></td></tr><br> <br> <br> <br> <br> <tr><td><p><b><font size="+1"> Suite Number <font size="-1">(eg. W1204, E1204)</font></font></b></td><br> <td> <input type=text name=suiteField size=22></td></tr><br> <br> <br> <tr><td><p><b><font size="+1"> Phone Number </font></b></p></td><br> <td><input type=text name=phoneField size=22 maxlength=10 ></td></tr><br> <br> <br> <tr><br> <td colspan="2"><p> <br> <select name=hook><br> <option selected value="yes"> Yes I would like to connect my PC<br> <option value="no_pc"> No, Thankyou, I don't have a PC<br> <option value="no_way"> No, Thankyou, I prefer to keep my existing provider<br> </select><br> </p></td></tr><br> <br> <tr><td colspan="2"><p><center><input type="reset" value="clear"></center></p></td></tr><br> <tr><td colspan="2"><p><center><input type=button name=btnSubmit value=Submit></center></p></td></tr><br> </FORM><br> <br> </TABLE> <br> <br><br> <br> <script language=vbscript><br>Sub btnSubmit_OnClick()<br> 'The only required fields at this point are<br> 'last name and phone number<br> If Len(PC_addfrm.first_nameField.value) = 0 Then<br> Alert "You must enter your first name"<br> PC_addfrm.first_nameField.focus<br> Exit Sub<br> ElseIf Len(PC_addfrm.last_nameField.value) = 0 Then<br> Alert "You must enter your last name"<br> PC_addfrm.last_nameField.focus<br> Exit Sub<br> ElseIf Len(PC_addfrm.suiteField.value) < 4 Then<br> Alert "You must enter your suite number (ie: E1205"<br> PC_addfrm.suiteField.focus<br> Exit Sub <br> ElseIf Len(PC_addfrm.phoneField.value) < 8 Then<br> Alert "You must enter your full Phone number (ie: 555-1234)"<br> PC_addfrm.phoneField.focus<br> Exit Sub<br> End If<br> <br> 'If we make it this far then submit the form<br> Call PC_addfrm.submit()<br>End Sub<br></script><br><br></BODY><br></HTML><br><br><br><br><br><br><br><br><br><br><br>then my second page comes up... the one that is called from the first one:<br>pc_add_list.asp:<br><br>I only have the begining of this page, because the stupid "underscore" thing is screwing me up!!!! check this out:<br><br><br><br><br><HTML><br><HEAD><br><META NAME="GENERATOR" Content="Microsoft Visual Basic 6.0"><br><TITLE>Chapter 10 - SQL Statements That Modify Data</TITLE><br></HEAD><br><BODY><br>The final page<br><br><br><br><%<br>'Declare variables needed<br>Dim strInsert<br>Dim strValues<br>Dim adCmdText<br><br>'Set required variables<br>adCmdText = 1<br> <br>'***********************************************************<br>'* If an Add was requested, add the new club to the database<br>'***********************************************************<br>If Request.Form("Action"

= "Add" Then<br> <br> 'Start building the SQL strings with the required fields<br> strInsert = "Insert into PChookup (IP_addr,lastName,firstName,phone,suite,pchook_ans)<br> strValues = "Values('" & CStr(Request.Form("IP_num"

) & _<br> "','" & CStr(Request.Form("last_nameField"

) & "'"<br> <br> 'Add meeting date if present<br> If Len(Request.Form("txtMeetingDate"

) > 0 Then<br> 'Add the column name to the insert string<br> strInsert = strInsert & ",ClubAnnualMeeting"<br> 'Add the value to the value string<br> strValues = strValues & ",'" & _<br> Cstr(Request.Form("txtMeetingDate"

) & "'"<br> End If<br> <br> 'Add club dues if present<br> If Len(Request.Form("txtClubDues"

) > 0 Then<br> 'Add the column name to the insert string<br> strInsert = strInsert & ",ClubDues"<br> 'Add the value to the value string<br> strValues = strValues & "," & _<br> CCur(Request.Form("txtClubDues"

)<br> End If<br><br> 'Add web site URL if present<br> If Len(Request.Form("txtWebSite"

) > 0 Then<br> 'Add the column name to the insert string<br> strInsert = strInsert & ",Club
'Add the value to the value string<br> strValues = strValues & ",'" & _<br> Cstr(Request.Form("txtWebSite"

) & "'"<br> End If<br><br> 'Add cranes if cheked<br> If Request.Form("chkCrane"

= 1 Then<br> 'Add the column name to the insert string<br> strInsert = strInsert & ",ClubHasCranes"<br> 'Add True to the value string<br> strValues = strValues & ",True" <br> End If<br><br> 'Add club membership number if present<br> If Len(Request.Form("txtMembers"

) > 0 Then<br> 'Add the column name to the insert string<br> strInsert = strInsert & ",ClubMembership"<br> 'Add the value to the value string<br> strValues = strValues & "," & _<br> CLng(Request.Form("txtMembers"

)<br> End If<br><br> 'Add notes if present<br> If Len(Request.Form("txtNotes"

) > 0 Then<br> 'Add the column name to the insert string<br> strInsert = strInsert & ",ClubNote"<br> 'Add the value to the value string<br> strValues = strValues & ",'" & _<br> Cstr(Request.Form("txtNotes"

) & "'"<br> End If<br><br> 'Create and open the database object<br> Set objConn = Server.CreateObject("ADODB.Connection"

<br> objConn.Open "DSN=Sailors"<br><br> 'Create the command object<br> Set objCmd = Server.CreateObject("ADODB.Command"

<br><br> 'Set the command object properties<br> Set objCmd.ActiveConnection = objConn<br> objCmd.CommandText = strInsert & "

" & strValues & "

"<br> objCmd.CommandType = adCmdText<br><br> 'Execute the command<br> objCmd.Execute<br> <br> 'Display the insert string<br> Response.Write "The following insert string was executed and " & _<br> "the values inserted into the Clubs table.<P>"<br> Response.Write strInsert & "

" & strValues & "

"<br> <br>End If<br><br>'Close and dereference database objects<br>Set objCmd = Nothing<br>objConn.Close<br>Set objConn = Nothing<br>%><br><br></BODY><br></HTML><br><br><br><br><br><br>Ok, obviously I am half way into modifying a pre-existing tutorial page.... but what is screwing me up is that damned UNDERSCORE!!!<br><br>strInsert = "Insert into PChookup (IP_addr,lastName,firstName,phone,suite,pchook_ans)<br> strValues = "Values('" & CStr(Request.Form("IP_num"

) & _<br> "','" & CStr(Request.Form("last_nameField"

) & "'"<br><br><br><br><br><br>The ^strValues^ section says:<br><br>strValues = "Values(" & CStr(Request.Form)"IP_num"

) & _<br><br>What is with that underscore?????? I can't figure out how to finish the whole statement. I don't need all the "IF "variable=0" statements, I just need to have a :<br><br>strInsert = "Insert into PChookup (IP_addr,lastName,firstName,phone,suite,pchook_ans)<br>strValues = "Values('" & CStr(Request.Form("IP_num"

) & _<br> "','" & CStr(Request.Form("last_nameField"

) & "'"<br><br>etc and so on... but I can't re-write the code without knowing what that damn underscore is supposed to be there for. I don't requre any "if's" all of my variables are required, so the final page should only need two lines for the SQL. One for the strInsert, and one for the strValues. But that underscore is really confusing me!<br><br>all of my columns in my table are of the "char" type, <br><br>god ... i felt so GREAT about four hours ago... thought I had IT!<br>now I am lost again.<br><br>thanx in advance.<br>