Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > HELP! ASP and SQL problem.

Reply
Thread Tools

HELP! ASP and SQL problem.

 
 
Munzilla
Guest
Posts: n/a
 
      10-06-2004
Ok, I have an ASP page that I use to add several pieces of information
to a database and also display that information in an edit mode. The
problem is, when I use the page for edit, not all of the info is drawn
out of the database. Some of the information is drawn out and
displayed properly, but other information is not. The strangest part
is if I do a response.write to display the objRS() from the database
of a field that isn't coming up, it works. Here is the code to show
you what I'm talking about.
This is really weird, and any help would be GREATLY appreciated.
Thanks!

<html>
<head>
<title>~Data Entry~</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<body>
<%
Dim edit
Dim id
DIM objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString =
"dsn=firms;uid=ssl_firms_admin;pwd=stacibeth;netwo rk=dbmssocn"
objConn.Open
DIM objRS
Set objRS = Server.CreateObject("ADODB.Recordset")

DIM mySQL
DIM company, address1, address2, city, state1, zip, county, site,
contact, contactlast, title, phone, email, premium, desc
edit=Request.QueryString("edit")
id=Request.QueryString("id")
if edit="1" then
mySQL= "SELECT * FROM agencies WHERE agency_id=" & id & ""
objRS.Open mySQL, objConn
response.write(objRS("phone_number"))
response.write("foo" & objRS("email_address"))
company = objRS("company_name")
address1 = objRS("street_address_1")
address2 = objRS("street_address_2")
city = objRS("city")
county = objRS("county")
state1 = objRS("state")
desc = objRS("description")
site = objRS("website_link")
contact = objRS("contact_person")
contactlast = objRS("contact_person_last")
title = objRS("contact_person_title")
phone = objRS("phone_number")

email = objRS("email_address")

premium = objRS("premium")
zip = objRS("zip")
end if
DIM objSelectedClassifications
Set objSelectedClassifications = CreateObject("Scripting.Dictionary")
if edit="1" then
DIM existingQuery
existingQuery = "SELECT * FROM agency_classification_rel WHERE
agency_id = " & id
DIM objExistingRS
SET objExistingRS = Server.CreateObject("ADODB.Recordset")
objExistingRS.Open existingQuery, objConn
Do While Not objExistingRS.EOF
objSelectedClassifications.Add
CSTR(objExistingRS("classification_id")), ""
objExistingRS.MoveNext
Loop
Set objExistingRS = Nothing
end if
DIM categoryQuery, countyQuery
categoryQuery = "SELECT category_id, category_name FROM
agency_categories ORDER BY category_sort"
countyQuery = "SELECT county_id, county_name FROM counties ORDER BY
county_name"
DIM objCategoryRS, objSubcategoryRS, objClassificationRS, objCountyRS
SET objCategoryRS = Server.CreateObject("ADODB.Recordset")
SET objSubcategoryRS = Server.CreateObject("ADODB.Recordset")
SET objClassificationRS = Server.CreateObject("ADODB.Recordset")
SET objCountyRS = Server.CreateObject("ADODB.Recordset")
objCountyRS.Open countyQuery, objConn
Dim countyOptions
countyOptions = "<option value=""0"">None</option>"
Do While Not objCountyRS.EOF
countyOptions = countyOptions & "<option value=""" &
objCountyRS("county_id") & """"
if CSTR(objCountyRS("county_id")) = CSTR(county) then
countyOptions = countyOptions & " selected"
end if
countyOptions = countyOptions & ">" & objCountyRS("county_name") &
"</option>"
objCountyRS.MoveNext
Loop
Set objCountyRS = Nothing
%>
<form name="companyform" method="post" action="companysubmit.asp">
<table border="0" cellspacing="0" cellpadding="4">
<tr>
<td>Company Name: &nbsp;
<input name="company" type="text" id="company" <% if company <>
"" then %>value="<%=company%>" <%end if%>size="75"></td>
</tr>
<tr>
<td>Street Address 1: &nbsp;
<input name="address1" type="text" id="address1" <% if address1
<> "" then %>value="<%=address1%>" <%end if%>size="75"></td>
</tr>
<tr>
<td>Street Address 2:&nbsp;&nbsp;
<input name="address2" type="text" id="address2" <% if address2
<> "" then %>value="<%=address2%>" <%end if%>size="75"></td>
</tr>
<tr>
<td>City: &nbsp;
<input name="city" type="text" id="city" <% if city <> "" then
%>value="<%=city%>" <%end if%>>
&nbsp;&nbsp;&nbsp;State: &nbsp;
<input name="state" type="text" id="state" <% if state1 <> "" then
%>value="<%=state1%>" <%end if%> size="4" maxlength="2">
&nbsp;&nbsp;Zip: &nbsp;
<input name="zip" type="text" id="zip" size="10" <% if zip <> ""
then %>value="<%=zip%>" <%end if%> maxlength="5">
&nbsp;&nbsp;</td>
</tr>
<tr>
<td>County: &nbsp;
<select name="county">
<%=countyOptions%>
</select></td>
</tr>
<tr><td>
<table border="0" cellspacing="0" cellpadding="2"><tr>
<%
objCategoryRS.Open categoryQuery, objConn
Do While Not objCategoryRS.EOF%>
<td>
<strong><%=objCategoryRS("category_name")%>:</strong><br>
<select name="classifications" size="15" multiple>
<%
DIM subCategoryQuery
subCategoryQuery = "SELECT subcategory_id, subcategory_name FROM
agency_subcategories WHERE category_id = " &
objCategoryRS("category_id") & " ORDER BY subcategory_sort"
objSubCategoryRS.Open subCategoryQuery, objConn
Do While Not objSubCategoryRS.EOF%>
<option value="" style="background-color:CC3333"
disabled>-=<%=objSubCategoryRS("subcategory_name")%>=-</option>
<%
DIM classQuery
classQuery = "SELECT classification_id, classification_name from
agency_classifications WHERE subcategory_id = " &
objSubCategoryRS("subcategory_id") & " ORDER BY classification_sort"
objClassificationRS.Open classQuery, objConn
Do While Not objClassificationRS.EOF
Response.write("<option value=""" &
objClassificationRS("classification_id") & """")
if objSelectedClassifications.Exists(CSTR(objClassifi cationRS("classification_id")))
then Response.write(" selected") end if
Response.write(">" & objClassificationRS("classification_name") &
"</option>")
objClassificationRS.MoveNext
Loop
objClassificationRS.Close
objSubCategoryRS.MoveNext
Loop
objSubCategoryRS.Close%>
</select>
</td>
<%
objCategoryRS.MoveNext
Loop
Set objCategoryRS = Nothing
Set objSubCategoryRS = Nothing
Set objClassificationRS = Nothing
%>
</tr></table>
</td></tr>
<tr>
<td>Web Site: &nbsp;
<input name="site" type="text" id="site" <% if site <> "" then
%>value="<%=site%>" <%end if%> size="60"></td>
</tr>
<tr>
<td>Contact Person First Name: &nbsp;
<input name="contact" type="text" id="contact" <% if contact <> ""
then %>value="<%=contact%>" <%end if%>>
&nbsp;&nbsp;&nbsp;Last Name:
<input type="text" name="contactlast" id="contactlast" <% if
contactlast <> "" then %>value="<%=contactlast%>" <%end if%>></td>
</tr>
<tr>
<td>Contact Person Title: &nbsp;
<input name="title" type="text" <% if title <> "" then
%>value="<%=title%>" <%end if%> id="title"></td>
</tr>
<tr>
<td>Phone Number: &nbsp;
<input name="phone" type="text" id="phone" <% if phone <> "" then
%>value="<%=phone%>" <%end if%>>
&nbsp;&nbsp;&nbsp;Email:&nbsp;&nbsp;
<input name="email" type="text" id="email" size="40" <% if email
<> "" then %>value="<%=email%>" <%end if%>></td>
</tr>
<tr>
<td>Premium Member: &nbsp;
<input name="premium" type="checkbox" id="premium" value="yes" <%
if premium <> "" then %>checked<%end if%>></td>
</tr>
<tr>
<td>Description of Services:<br>
<textarea name="description" cols="90" rows="10"
id="description"><% if desc <> "" then %><%=desc%><%end
if%></textarea></td>
</tr>
<tr>
<td><input type="submit" name="Submit" value="Submit"></td>
</tr>
</table>
<input type="hidden" value="<%=edit%>" name="edit">
<input type="hidden" value="<%=id%>" name="id">
</form>
</html>
<%
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      10-06-2004
PLEASE read this. http://www.aspfaq.com/show.asp?id=2081 And also please
understand that I am directing you to this page so that you can enable us to
help you, not to criticize or attack you or anything like that.

Ray at work

"Munzilla" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Ok, I have an ASP page that I use to add several pieces of information
> to a database and also display that information in an edit mode. The
> problem is, when I use the page for edit, not all of the info is drawn
> out of the database. Some of the information is drawn out and
> displayed properly, but other information is not. The strangest part



 
Reply With Quote
 
 
 
 
Mark Schupp
Guest
Posts: n/a
 
      10-06-2004
use

value="<%=server.htmlencode(data variable here)%>

in your input statements.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com


"Munzilla" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Ok, I have an ASP page that I use to add several pieces of information
> to a database and also display that information in an edit mode. The
> problem is, when I use the page for edit, not all of the info is drawn
> out of the database. Some of the information is drawn out and
> displayed properly, but other information is not. The strangest part
> is if I do a response.write to display the objRS() from the database
> of a field that isn't coming up, it works. Here is the code to show
> you what I'm talking about.
> This is really weird, and any help would be GREATLY appreciated.
> Thanks!
>
> <html>
> <head>
> <title>~Data Entry~</title>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1">
> </head>
> <body>
> <%
> Dim edit
> Dim id
> DIM objConn
> Set objConn = Server.CreateObject("ADODB.Connection")
> objConn.ConnectionString =
> "dsn=firms;uid=ssl_firms_admin;pwd=stacibeth;netwo rk=dbmssocn"
> objConn.Open
> DIM objRS
> Set objRS = Server.CreateObject("ADODB.Recordset")
>
> DIM mySQL
> DIM company, address1, address2, city, state1, zip, county, site,
> contact, contactlast, title, phone, email, premium, desc
> edit=Request.QueryString("edit")
> id=Request.QueryString("id")
> if edit="1" then
> mySQL= "SELECT * FROM agencies WHERE agency_id=" & id & ""
> objRS.Open mySQL, objConn
> response.write(objRS("phone_number"))
> response.write("foo" & objRS("email_address"))
> company = objRS("company_name")
> address1 = objRS("street_address_1")
> address2 = objRS("street_address_2")
> city = objRS("city")
> county = objRS("county")
> state1 = objRS("state")
> desc = objRS("description")
> site = objRS("website_link")
> contact = objRS("contact_person")
> contactlast = objRS("contact_person_last")
> title = objRS("contact_person_title")
> phone = objRS("phone_number")
>
> email = objRS("email_address")
>
> premium = objRS("premium")
> zip = objRS("zip")
> end if
> DIM objSelectedClassifications
> Set objSelectedClassifications = CreateObject("Scripting.Dictionary")
> if edit="1" then
> DIM existingQuery
> existingQuery = "SELECT * FROM agency_classification_rel WHERE
> agency_id = " & id
> DIM objExistingRS
> SET objExistingRS = Server.CreateObject("ADODB.Recordset")
> objExistingRS.Open existingQuery, objConn
> Do While Not objExistingRS.EOF
> objSelectedClassifications.Add
> CSTR(objExistingRS("classification_id")), ""
> objExistingRS.MoveNext
> Loop
> Set objExistingRS = Nothing
> end if
> DIM categoryQuery, countyQuery
> categoryQuery = "SELECT category_id, category_name FROM
> agency_categories ORDER BY category_sort"
> countyQuery = "SELECT county_id, county_name FROM counties ORDER BY
> county_name"
> DIM objCategoryRS, objSubcategoryRS, objClassificationRS, objCountyRS
> SET objCategoryRS = Server.CreateObject("ADODB.Recordset")
> SET objSubcategoryRS = Server.CreateObject("ADODB.Recordset")
> SET objClassificationRS = Server.CreateObject("ADODB.Recordset")
> SET objCountyRS = Server.CreateObject("ADODB.Recordset")
> objCountyRS.Open countyQuery, objConn
> Dim countyOptions
> countyOptions = "<option value=""0"">None</option>"
> Do While Not objCountyRS.EOF
> countyOptions = countyOptions & "<option value=""" &
> objCountyRS("county_id") & """"
> if CSTR(objCountyRS("county_id")) = CSTR(county) then
> countyOptions = countyOptions & " selected"
> end if
> countyOptions = countyOptions & ">" & objCountyRS("county_name") &
> "</option>"
> objCountyRS.MoveNext
> Loop
> Set objCountyRS = Nothing
> %>
> <form name="companyform" method="post" action="companysubmit.asp">
> <table border="0" cellspacing="0" cellpadding="4">
> <tr>
> <td>Company Name: &nbsp;
> <input name="company" type="text" id="company" <% if company <>
> "" then %>value="<%=company%>" <%end if%>size="75"></td>
> </tr>
> <tr>
> <td>Street Address 1: &nbsp;
> <input name="address1" type="text" id="address1" <% if address1
> <> "" then %>value="<%=address1%>" <%end if%>size="75"></td>
> </tr>
> <tr>
> <td>Street Address 2:&nbsp;&nbsp;
> <input name="address2" type="text" id="address2" <% if address2
> <> "" then %>value="<%=address2%>" <%end if%>size="75"></td>
> </tr>
> <tr>
> <td>City: &nbsp;
> <input name="city" type="text" id="city" <% if city <> "" then
> %>value="<%=city%>" <%end if%>>
> &nbsp;&nbsp;&nbsp;State: &nbsp;
> <input name="state" type="text" id="state" <% if state1 <> "" then
> %>value="<%=state1%>" <%end if%> size="4" maxlength="2">
> &nbsp;&nbsp;Zip: &nbsp;
> <input name="zip" type="text" id="zip" size="10" <% if zip <> ""
> then %>value="<%=zip%>" <%end if%> maxlength="5">
> &nbsp;&nbsp;</td>
> </tr>
> <tr>
> <td>County: &nbsp;
> <select name="county">
> <%=countyOptions%>
> </select></td>
> </tr>
> <tr><td>
> <table border="0" cellspacing="0" cellpadding="2"><tr>
> <%
> objCategoryRS.Open categoryQuery, objConn
> Do While Not objCategoryRS.EOF%>
> <td>
> <strong><%=objCategoryRS("category_name")%>:</strong><br>
> <select name="classifications" size="15" multiple>
> <%
> DIM subCategoryQuery
> subCategoryQuery = "SELECT subcategory_id, subcategory_name FROM
> agency_subcategories WHERE category_id = " &
> objCategoryRS("category_id") & " ORDER BY subcategory_sort"
> objSubCategoryRS.Open subCategoryQuery, objConn
> Do While Not objSubCategoryRS.EOF%>
> <option value="" style="background-color:CC3333"
> disabled>-=<%=objSubCategoryRS("subcategory_name")%>=-</option>
> <%
> DIM classQuery
> classQuery = "SELECT classification_id, classification_name from
> agency_classifications WHERE subcategory_id = " &
> objSubCategoryRS("subcategory_id") & " ORDER BY classification_sort"
> objClassificationRS.Open classQuery, objConn
> Do While Not objClassificationRS.EOF
> Response.write("<option value=""" &
> objClassificationRS("classification_id") & """")
> if

objSelectedClassifications.Exists(CSTR(objClassifi cationRS("classification_i
d")))
> then Response.write(" selected") end if
> Response.write(">" & objClassificationRS("classification_name") &
> "</option>")
> objClassificationRS.MoveNext
> Loop
> objClassificationRS.Close
> objSubCategoryRS.MoveNext
> Loop
> objSubCategoryRS.Close%>
> </select>
> </td>
> <%
> objCategoryRS.MoveNext
> Loop
> Set objCategoryRS = Nothing
> Set objSubCategoryRS = Nothing
> Set objClassificationRS = Nothing
> %>
> </tr></table>
> </td></tr>
> <tr>
> <td>Web Site: &nbsp;
> <input name="site" type="text" id="site" <% if site <> "" then
> %>value="<%=site%>" <%end if%> size="60"></td>
> </tr>
> <tr>
> <td>Contact Person First Name: &nbsp;
> <input name="contact" type="text" id="contact" <% if contact <> ""
> then %>value="<%=contact%>" <%end if%>>
> &nbsp;&nbsp;&nbsp;Last Name:
> <input type="text" name="contactlast" id="contactlast" <% if
> contactlast <> "" then %>value="<%=contactlast%>" <%end if%>></td>
> </tr>
> <tr>
> <td>Contact Person Title: &nbsp;
> <input name="title" type="text" <% if title <> "" then
> %>value="<%=title%>" <%end if%> id="title"></td>
> </tr>
> <tr>
> <td>Phone Number: &nbsp;
> <input name="phone" type="text" id="phone" <% if phone <> "" then
> %>value="<%=phone%>" <%end if%>>
> &nbsp;&nbsp;&nbsp;Email:&nbsp;&nbsp;
> <input name="email" type="text" id="email" size="40" <% if email
> <> "" then %>value="<%=email%>" <%end if%>></td>
> </tr>
> <tr>
> <td>Premium Member: &nbsp;
> <input name="premium" type="checkbox" id="premium" value="yes" <%
> if premium <> "" then %>checked<%end if%>></td>
> </tr>
> <tr>
> <td>Description of Services:<br>
> <textarea name="description" cols="90" rows="10"
> id="description"><% if desc <> "" then %><%=desc%><%end
> if%></textarea></td>
> </tr>
> <tr>
> <td><input type="submit" name="Submit" value="Submit"></td>
> </tr>
> </table>
> <input type="hidden" value="<%=edit%>" name="edit">
> <input type="hidden" value="<%=id%>" name="id">
> </form>
> </html>
> <%
> Set objRS = Nothing
> objConn.Close
> Set objConn = Nothing
> %>



 
Reply With Quote
 
Joker
Guest
Posts: n/a
 
      10-07-2004
Also please read the following links as it looks like you are still
using a DSN/ODBC connection.

http://www.aspfaq.com/show.asp?id=2126

http://msdn.microsoft.com/library/de...components.asp

Munzilla wrote:


> objConn.ConnectionString =
> "dsn=firms;uid=ssl_firms_admin;pwd=stacibeth;netwo rk=dbmssocn"


--
Please do not contact me directly or ask me to contact you directly for
assistance.

If your question is worth asking, it's worth posting.

If itís not worth posting you should have done a search on
http://www.google.com/ http://www.google.com/grphp?hl=en&tab=wg&q= or
http://news.google.com/froogle?hl=en&tab=nf&ned=us&q= before wasting our
time.
 
Reply With Quote
 
Munzilla
Guest
Posts: n/a
 
      10-07-2004
THanks for the help. DO you mean that I should do this for the
initial input statements or for displaying the data that is drawn and
fed into the input statements? Or both?
Thanks.
 
Reply With Quote
 
Munzilla
Guest
Posts: n/a
 
      10-07-2004
Actually, I tried that and it didn't work. The strangest part to me
is that it works if I have a response.write write out the variable's
value early on in the code. When I don't do that, it no longer works.
Why would my writing it out aid the variable in being properly set and
acknowledged?
Thanks.

"Mark Schupp" <(E-Mail Removed)> wrote in message news:<erZSkJ$(E-Mail Removed)>...
> use
>
> value="<%=server.htmlencode(data variable here)%>
>
> in your input statements.
>
> --
> Mark Schupp
> Head of Development
> Integrity eLearning
> www.ielearning.com
>
>
> "Munzilla" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) om...
> > Ok, I have an ASP page that I use to add several pieces of information
> > to a database and also display that information in an edit mode. The
> > problem is, when I use the page for edit, not all of the info is drawn
> > out of the database. Some of the information is drawn out and
> > displayed properly, but other information is not. The strangest part
> > is if I do a response.write to display the objRS() from the database
> > of a field that isn't coming up, it works. Here is the code to show
> > you what I'm talking about.
> > This is really weird, and any help would be GREATLY appreciated.
> > Thanks!
> >
> > <html>
> > <head>
> > <title>~Data Entry~</title>
> > <meta http-equiv="Content-Type" content="text/html;
> > charset=iso-8859-1">
> > </head>
> > <body>
> > <%
> > Dim edit
> > Dim id
> > DIM objConn
> > Set objConn = Server.CreateObject("ADODB.Connection")
> > objConn.ConnectionString =
> > "dsn=firms;uid=ssl_firms_admin;pwd=stacibeth;netwo rk=dbmssocn"
> > objConn.Open
> > DIM objRS
> > Set objRS = Server.CreateObject("ADODB.Recordset")
> >
> > DIM mySQL
> > DIM company, address1, address2, city, state1, zip, county, site,
> > contact, contactlast, title, phone, email, premium, desc
> > edit=Request.QueryString("edit")
> > id=Request.QueryString("id")
> > if edit="1" then
> > mySQL= "SELECT * FROM agencies WHERE agency_id=" & id & ""
> > objRS.Open mySQL, objConn
> > response.write(objRS("phone_number"))
> > response.write("foo" & objRS("email_address"))
> > company = objRS("company_name")
> > address1 = objRS("street_address_1")
> > address2 = objRS("street_address_2")
> > city = objRS("city")
> > county = objRS("county")
> > state1 = objRS("state")
> > desc = objRS("description")
> > site = objRS("website_link")
> > contact = objRS("contact_person")
> > contactlast = objRS("contact_person_last")
> > title = objRS("contact_person_title")
> > phone = objRS("phone_number")
> >
> > email = objRS("email_address")
> >
> > premium = objRS("premium")
> > zip = objRS("zip")
> > end if
> > DIM objSelectedClassifications
> > Set objSelectedClassifications = CreateObject("Scripting.Dictionary")
> > if edit="1" then
> > DIM existingQuery
> > existingQuery = "SELECT * FROM agency_classification_rel WHERE
> > agency_id = " & id
> > DIM objExistingRS
> > SET objExistingRS = Server.CreateObject("ADODB.Recordset")
> > objExistingRS.Open existingQuery, objConn
> > Do While Not objExistingRS.EOF
> > objSelectedClassifications.Add
> > CSTR(objExistingRS("classification_id")), ""
> > objExistingRS.MoveNext
> > Loop
> > Set objExistingRS = Nothing
> > end if
> > DIM categoryQuery, countyQuery
> > categoryQuery = "SELECT category_id, category_name FROM
> > agency_categories ORDER BY category_sort"
> > countyQuery = "SELECT county_id, county_name FROM counties ORDER BY
> > county_name"
> > DIM objCategoryRS, objSubcategoryRS, objClassificationRS, objCountyRS
> > SET objCategoryRS = Server.CreateObject("ADODB.Recordset")
> > SET objSubcategoryRS = Server.CreateObject("ADODB.Recordset")
> > SET objClassificationRS = Server.CreateObject("ADODB.Recordset")
> > SET objCountyRS = Server.CreateObject("ADODB.Recordset")
> > objCountyRS.Open countyQuery, objConn
> > Dim countyOptions
> > countyOptions = "<option value=""0"">None</option>"
> > Do While Not objCountyRS.EOF
> > countyOptions = countyOptions & "<option value=""" &
> > objCountyRS("county_id") & """"
> > if CSTR(objCountyRS("county_id")) = CSTR(county) then
> > countyOptions = countyOptions & " selected"
> > end if
> > countyOptions = countyOptions & ">" & objCountyRS("county_name") &
> > "</option>"
> > objCountyRS.MoveNext
> > Loop
> > Set objCountyRS = Nothing
> > %>
> > <form name="companyform" method="post" action="companysubmit.asp">
> > <table border="0" cellspacing="0" cellpadding="4">
> > <tr>
> > <td>Company Name: &nbsp;
> > <input name="company" type="text" id="company" <% if company <>
> > "" then %>value="<%=company%>" <%end if%>size="75"></td>
> > </tr>
> > <tr>
> > <td>Street Address 1: &nbsp;
> > <input name="address1" type="text" id="address1" <% if address1
> > <> "" then %>value="<%=address1%>" <%end if%>size="75"></td>
> > </tr>
> > <tr>
> > <td>Street Address 2:&nbsp;&nbsp;
> > <input name="address2" type="text" id="address2" <% if address2
> > <> "" then %>value="<%=address2%>" <%end if%>size="75"></td>
> > </tr>
> > <tr>
> > <td>City: &nbsp;
> > <input name="city" type="text" id="city" <% if city <> "" then
> > %>value="<%=city%>" <%end if%>>
> > &nbsp;&nbsp;&nbsp;State: &nbsp;
> > <input name="state" type="text" id="state" <% if state1 <> "" then
> > %>value="<%=state1%>" <%end if%> size="4" maxlength="2">
> > &nbsp;&nbsp;Zip: &nbsp;
> > <input name="zip" type="text" id="zip" size="10" <% if zip <> ""
> > then %>value="<%=zip%>" <%end if%> maxlength="5">
> > &nbsp;&nbsp;</td>
> > </tr>
> > <tr>
> > <td>County: &nbsp;
> > <select name="county">
> > <%=countyOptions%>
> > </select></td>
> > </tr>
> > <tr><td>
> > <table border="0" cellspacing="0" cellpadding="2"><tr>
> > <%
> > objCategoryRS.Open categoryQuery, objConn
> > Do While Not objCategoryRS.EOF%>
> > <td>
> > <strong><%=objCategoryRS("category_name")%>:</strong><br>
> > <select name="classifications" size="15" multiple>
> > <%
> > DIM subCategoryQuery
> > subCategoryQuery = "SELECT subcategory_id, subcategory_name FROM
> > agency_subcategories WHERE category_id = " &
> > objCategoryRS("category_id") & " ORDER BY subcategory_sort"
> > objSubCategoryRS.Open subCategoryQuery, objConn
> > Do While Not objSubCategoryRS.EOF%>
> > <option value="" style="background-color:CC3333"
> > disabled>-=<%=objSubCategoryRS("subcategory_name")%>=-</option>
> > <%
> > DIM classQuery
> > classQuery = "SELECT classification_id, classification_name from
> > agency_classifications WHERE subcategory_id = " &
> > objSubCategoryRS("subcategory_id") & " ORDER BY classification_sort"
> > objClassificationRS.Open classQuery, objConn
> > Do While Not objClassificationRS.EOF
> > Response.write("<option value=""" &
> > objClassificationRS("classification_id") & """")
> > if

> objSelectedClassifications.Exists(CSTR(objClassifi cationRS("classification_i
> d")))
> > then Response.write(" selected") end if
> > Response.write(">" & objClassificationRS("classification_name") &
> > "</option>")
> > objClassificationRS.MoveNext
> > Loop
> > objClassificationRS.Close
> > objSubCategoryRS.MoveNext
> > Loop
> > objSubCategoryRS.Close%>
> > </select>
> > </td>
> > <%
> > objCategoryRS.MoveNext
> > Loop
> > Set objCategoryRS = Nothing
> > Set objSubCategoryRS = Nothing
> > Set objClassificationRS = Nothing
> > %>
> > </tr></table>
> > </td></tr>
> > <tr>
> > <td>Web Site: &nbsp;
> > <input name="site" type="text" id="site" <% if site <> "" then
> > %>value="<%=site%>" <%end if%> size="60"></td>
> > </tr>
> > <tr>
> > <td>Contact Person First Name: &nbsp;
> > <input name="contact" type="text" id="contact" <% if contact <> ""
> > then %>value="<%=contact%>" <%end if%>>
> > &nbsp;&nbsp;&nbsp;Last Name:
> > <input type="text" name="contactlast" id="contactlast" <% if
> > contactlast <> "" then %>value="<%=contactlast%>" <%end if%>></td>
> > </tr>
> > <tr>
> > <td>Contact Person Title: &nbsp;
> > <input name="title" type="text" <% if title <> "" then
> > %>value="<%=title%>" <%end if%> id="title"></td>
> > </tr>
> > <tr>
> > <td>Phone Number: &nbsp;
> > <input name="phone" type="text" id="phone" <% if phone <> "" then
> > %>value="<%=phone%>" <%end if%>>
> > &nbsp;&nbsp;&nbsp;Email:&nbsp;&nbsp;
> > <input name="email" type="text" id="email" size="40" <% if email
> > <> "" then %>value="<%=email%>" <%end if%>></td>
> > </tr>
> > <tr>
> > <td>Premium Member: &nbsp;
> > <input name="premium" type="checkbox" id="premium" value="yes" <%
> > if premium <> "" then %>checked<%end if%>></td>
> > </tr>
> > <tr>
> > <td>Description of Services:<br>
> > <textarea name="description" cols="90" rows="10"
> > id="description"><% if desc <> "" then %><%=desc%><%end
> > if%></textarea></td>
> > </tr>
> > <tr>
> > <td><input type="submit" name="Submit" value="Submit"></td>
> > </tr>
> > </table>
> > <input type="hidden" value="<%=edit%>" name="edit">
> > <input type="hidden" value="<%=id%>" name="id">
> > </form>
> > </html>
> > <%
> > Set objRS = Nothing
> > objConn.Close
> > Set objConn = Nothing
> > %>

 
Reply With Quote
 
Mark Schupp
Guest
Posts: n/a
 
      10-07-2004
If you view source on the rendered page what do you see for one of the input
tags that does not display the data?

What you describe with Response.Write is the opposite of what people usually
report (column data sometimes disappears after the first access for text
columns). Try putting the data into a variable first so that the recordset
column in only accessed once and then writing it out as many times as
needed.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com


"Munzilla" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Actually, I tried that and it didn't work. The strangest part to me
> is that it works if I have a response.write write out the variable's
> value early on in the code. When I don't do that, it no longer works.
> Why would my writing it out aid the variable in being properly set and
> acknowledged?
> Thanks.
>
> "Mark Schupp" <(E-Mail Removed)> wrote in message

news:<erZSkJ$(E-Mail Removed)>...
> > use
> >
> > value="<%=server.htmlencode(data variable here)%>
> >
> > in your input statements.
> >
> > --
> > Mark Schupp
> > Head of Development
> > Integrity eLearning
> > www.ielearning.com
> >
> >
> > "Munzilla" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed) om...
> > > Ok, I have an ASP page that I use to add several pieces of information
> > > to a database and also display that information in an edit mode. The
> > > problem is, when I use the page for edit, not all of the info is drawn
> > > out of the database. Some of the information is drawn out and
> > > displayed properly, but other information is not. The strangest part
> > > is if I do a response.write to display the objRS() from the database
> > > of a field that isn't coming up, it works. Here is the code to show
> > > you what I'm talking about.
> > > This is really weird, and any help would be GREATLY appreciated.
> > > Thanks!
> > >
> > > <html>
> > > <head>
> > > <title>~Data Entry~</title>
> > > <meta http-equiv="Content-Type" content="text/html;
> > > charset=iso-8859-1">
> > > </head>
> > > <body>
> > > <%
> > > Dim edit
> > > Dim id
> > > DIM objConn
> > > Set objConn = Server.CreateObject("ADODB.Connection")
> > > objConn.ConnectionString =
> > > "dsn=firms;uid=ssl_firms_admin;pwd=stacibeth;netwo rk=dbmssocn"
> > > objConn.Open
> > > DIM objRS
> > > Set objRS = Server.CreateObject("ADODB.Recordset")
> > >
> > > DIM mySQL
> > > DIM company, address1, address2, city, state1, zip, county, site,
> > > contact, contactlast, title, phone, email, premium, desc
> > > edit=Request.QueryString("edit")
> > > id=Request.QueryString("id")
> > > if edit="1" then
> > > mySQL= "SELECT * FROM agencies WHERE agency_id=" & id & ""
> > > objRS.Open mySQL, objConn
> > > response.write(objRS("phone_number"))
> > > response.write("foo" & objRS("email_address"))
> > > company = objRS("company_name")
> > > address1 = objRS("street_address_1")
> > > address2 = objRS("street_address_2")
> > > city = objRS("city")
> > > county = objRS("county")
> > > state1 = objRS("state")
> > > desc = objRS("description")
> > > site = objRS("website_link")
> > > contact = objRS("contact_person")
> > > contactlast = objRS("contact_person_last")
> > > title = objRS("contact_person_title")
> > > phone = objRS("phone_number")
> > >
> > > email = objRS("email_address")
> > >
> > > premium = objRS("premium")
> > > zip = objRS("zip")
> > > end if
> > > DIM objSelectedClassifications
> > > Set objSelectedClassifications = CreateObject("Scripting.Dictionary")
> > > if edit="1" then
> > > DIM existingQuery
> > > existingQuery = "SELECT * FROM agency_classification_rel WHERE
> > > agency_id = " & id
> > > DIM objExistingRS
> > > SET objExistingRS = Server.CreateObject("ADODB.Recordset")
> > > objExistingRS.Open existingQuery, objConn
> > > Do While Not objExistingRS.EOF
> > > objSelectedClassifications.Add
> > > CSTR(objExistingRS("classification_id")), ""
> > > objExistingRS.MoveNext
> > > Loop
> > > Set objExistingRS = Nothing
> > > end if
> > > DIM categoryQuery, countyQuery
> > > categoryQuery = "SELECT category_id, category_name FROM
> > > agency_categories ORDER BY category_sort"
> > > countyQuery = "SELECT county_id, county_name FROM counties ORDER BY
> > > county_name"
> > > DIM objCategoryRS, objSubcategoryRS, objClassificationRS, objCountyRS
> > > SET objCategoryRS = Server.CreateObject("ADODB.Recordset")
> > > SET objSubcategoryRS = Server.CreateObject("ADODB.Recordset")
> > > SET objClassificationRS = Server.CreateObject("ADODB.Recordset")
> > > SET objCountyRS = Server.CreateObject("ADODB.Recordset")
> > > objCountyRS.Open countyQuery, objConn
> > > Dim countyOptions
> > > countyOptions = "<option value=""0"">None</option>"
> > > Do While Not objCountyRS.EOF
> > > countyOptions = countyOptions & "<option value=""" &
> > > objCountyRS("county_id") & """"
> > > if CSTR(objCountyRS("county_id")) = CSTR(county) then
> > > countyOptions = countyOptions & " selected"
> > > end if
> > > countyOptions = countyOptions & ">" & objCountyRS("county_name") &
> > > "</option>"
> > > objCountyRS.MoveNext
> > > Loop
> > > Set objCountyRS = Nothing
> > > %>
> > > <form name="companyform" method="post" action="companysubmit.asp">
> > > <table border="0" cellspacing="0" cellpadding="4">
> > > <tr>
> > > <td>Company Name: &nbsp;
> > > <input name="company" type="text" id="company" <% if company <>
> > > "" then %>value="<%=company%>" <%end if%>size="75"></td>
> > > </tr>
> > > <tr>
> > > <td>Street Address 1: &nbsp;
> > > <input name="address1" type="text" id="address1" <% if address1
> > > <> "" then %>value="<%=address1%>" <%end if%>size="75"></td>
> > > </tr>
> > > <tr>
> > > <td>Street Address 2:&nbsp;&nbsp;
> > > <input name="address2" type="text" id="address2" <% if address2
> > > <> "" then %>value="<%=address2%>" <%end if%>size="75"></td>
> > > </tr>
> > > <tr>
> > > <td>City: &nbsp;
> > > <input name="city" type="text" id="city" <% if city <> "" then
> > > %>value="<%=city%>" <%end if%>>
> > > &nbsp;&nbsp;&nbsp;State: &nbsp;
> > > <input name="state" type="text" id="state" <% if state1 <> "" then
> > > %>value="<%=state1%>" <%end if%> size="4" maxlength="2">
> > > &nbsp;&nbsp;Zip: &nbsp;
> > > <input name="zip" type="text" id="zip" size="10" <% if zip <> ""
> > > then %>value="<%=zip%>" <%end if%> maxlength="5">
> > > &nbsp;&nbsp;</td>
> > > </tr>
> > > <tr>
> > > <td>County: &nbsp;
> > > <select name="county">
> > > <%=countyOptions%>
> > > </select></td>
> > > </tr>
> > > <tr><td>
> > > <table border="0" cellspacing="0" cellpadding="2"><tr>
> > > <%
> > > objCategoryRS.Open categoryQuery, objConn
> > > Do While Not objCategoryRS.EOF%>
> > > <td>
> > > <strong><%=objCategoryRS("category_name")%>:</strong><br>
> > > <select name="classifications" size="15" multiple>
> > > <%
> > > DIM subCategoryQuery
> > > subCategoryQuery = "SELECT subcategory_id, subcategory_name FROM
> > > agency_subcategories WHERE category_id = " &
> > > objCategoryRS("category_id") & " ORDER BY subcategory_sort"
> > > objSubCategoryRS.Open subCategoryQuery, objConn
> > > Do While Not objSubCategoryRS.EOF%>
> > > <option value="" style="background-color:CC3333"
> > > disabled>-=<%=objSubCategoryRS("subcategory_name")%>=-</option>
> > > <%
> > > DIM classQuery
> > > classQuery = "SELECT classification_id, classification_name from
> > > agency_classifications WHERE subcategory_id = " &
> > > objSubCategoryRS("subcategory_id") & " ORDER BY classification_sort"
> > > objClassificationRS.Open classQuery, objConn
> > > Do While Not objClassificationRS.EOF
> > > Response.write("<option value=""" &
> > > objClassificationRS("classification_id") & """")
> > > if

> >

objSelectedClassifications.Exists(CSTR(objClassifi cationRS("classification_i
> > d")))
> > > then Response.write(" selected") end if
> > > Response.write(">" & objClassificationRS("classification_name") &
> > > "</option>")
> > > objClassificationRS.MoveNext
> > > Loop
> > > objClassificationRS.Close
> > > objSubCategoryRS.MoveNext
> > > Loop
> > > objSubCategoryRS.Close%>
> > > </select>
> > > </td>
> > > <%
> > > objCategoryRS.MoveNext
> > > Loop
> > > Set objCategoryRS = Nothing
> > > Set objSubCategoryRS = Nothing
> > > Set objClassificationRS = Nothing
> > > %>
> > > </tr></table>
> > > </td></tr>
> > > <tr>
> > > <td>Web Site: &nbsp;
> > > <input name="site" type="text" id="site" <% if site <> "" then
> > > %>value="<%=site%>" <%end if%> size="60"></td>
> > > </tr>
> > > <tr>
> > > <td>Contact Person First Name: &nbsp;
> > > <input name="contact" type="text" id="contact" <% if contact <> ""
> > > then %>value="<%=contact%>" <%end if%>>
> > > &nbsp;&nbsp;&nbsp;Last Name:
> > > <input type="text" name="contactlast" id="contactlast" <% if
> > > contactlast <> "" then %>value="<%=contactlast%>" <%end if%>></td>
> > > </tr>
> > > <tr>
> > > <td>Contact Person Title: &nbsp;
> > > <input name="title" type="text" <% if title <> "" then
> > > %>value="<%=title%>" <%end if%> id="title"></td>
> > > </tr>
> > > <tr>
> > > <td>Phone Number: &nbsp;
> > > <input name="phone" type="text" id="phone" <% if phone <> "" then
> > > %>value="<%=phone%>" <%end if%>>
> > > &nbsp;&nbsp;&nbsp;Email:&nbsp;&nbsp;
> > > <input name="email" type="text" id="email" size="40" <% if email
> > > <> "" then %>value="<%=email%>" <%end if%>></td>
> > > </tr>
> > > <tr>
> > > <td>Premium Member: &nbsp;
> > > <input name="premium" type="checkbox" id="premium" value="yes" <%
> > > if premium <> "" then %>checked<%end if%>></td>
> > > </tr>
> > > <tr>
> > > <td>Description of Services:<br>
> > > <textarea name="description" cols="90" rows="10"
> > > id="description"><% if desc <> "" then %><%=desc%><%end
> > > if%></textarea></td>
> > > </tr>
> > > <tr>
> > > <td><input type="submit" name="Submit" value="Submit"></td>
> > > </tr>
> > > </table>
> > > <input type="hidden" value="<%=edit%>" name="edit">
> > > <input type="hidden" value="<%=id%>" name="id">
> > > </form>
> > > </html>
> > > <%
> > > Set objRS = Nothing
> > > objConn.Close
> > > Set objConn = Nothing
> > > %>



 
Reply With Quote
 
Jeff Cochran
Guest
Posts: n/a
 
      10-07-2004
On 6 Oct 2004 15:05:39 -0700, http://www.velocityreviews.com/forums/(E-Mail Removed) (Munzilla) wrote:

>Ok, I have an ASP page that I use to add several pieces of information
>to a database and also display that information in an edit mode. The
>problem is, when I use the page for edit, not all of the info is drawn
>out of the database. Some of the information is drawn out and
>displayed properly, but other information is not. The strangest part
>is if I do a response.write to display the objRS() from the database
>of a field that isn't coming up, it works. Here is the code to show
>you what I'm talking about.


Actually, it doesn't show us anything.

We'd need to know the input and what ouput you receive versus what
you're looking for. At first guss your input isn't escaping quote
characters.

Jeff


>This is really weird, and any help would be GREATLY appreciated.
>Thanks!
>
><html>
><head>
><title>~Data Entry~</title>
><meta http-equiv="Content-Type" content="text/html;
>charset=iso-8859-1">
></head>
><body>
><%
>Dim edit
>Dim id
>DIM objConn
>Set objConn = Server.CreateObject("ADODB.Connection")
>objConn.ConnectionString =
>"dsn=firms;uid=ssl_firms_admin;pwd=stacibeth;netw ork=dbmssocn"
>objConn.Open
>DIM objRS
>Set objRS = Server.CreateObject("ADODB.Recordset")
>
>DIM mySQL
>DIM company, address1, address2, city, state1, zip, county, site,
>contact, contactlast, title, phone, email, premium, desc
>edit=Request.QueryString("edit")
>id=Request.QueryString("id")
>if edit="1" then
> mySQL= "SELECT * FROM agencies WHERE agency_id=" & id & ""
> objRS.Open mySQL, objConn
>response.write(objRS("phone_number"))
> response.write("foo" & objRS("email_address"))
> company = objRS("company_name")
> address1 = objRS("street_address_1")
> address2 = objRS("street_address_2")
> city = objRS("city")
> county = objRS("county")
> state1 = objRS("state")
> desc = objRS("description")
> site = objRS("website_link")
> contact = objRS("contact_person")
> contactlast = objRS("contact_person_last")
> title = objRS("contact_person_title")
> phone = objRS("phone_number")
>
> email = objRS("email_address")
>
> premium = objRS("premium")
> zip = objRS("zip")
>end if
>DIM objSelectedClassifications
>Set objSelectedClassifications = CreateObject("Scripting.Dictionary")
>if edit="1" then
> DIM existingQuery
> existingQuery = "SELECT * FROM agency_classification_rel WHERE
>agency_id = " & id
> DIM objExistingRS
> SET objExistingRS = Server.CreateObject("ADODB.Recordset")
> objExistingRS.Open existingQuery, objConn
> Do While Not objExistingRS.EOF
> objSelectedClassifications.Add
>CSTR(objExistingRS("classification_id")), ""
> objExistingRS.MoveNext
> Loop
> Set objExistingRS = Nothing
>end if
>DIM categoryQuery, countyQuery
>categoryQuery = "SELECT category_id, category_name FROM
>agency_categories ORDER BY category_sort"
>countyQuery = "SELECT county_id, county_name FROM counties ORDER BY
>county_name"
>DIM objCategoryRS, objSubcategoryRS, objClassificationRS, objCountyRS
>SET objCategoryRS = Server.CreateObject("ADODB.Recordset")
>SET objSubcategoryRS = Server.CreateObject("ADODB.Recordset")
>SET objClassificationRS = Server.CreateObject("ADODB.Recordset")
>SET objCountyRS = Server.CreateObject("ADODB.Recordset")
>objCountyRS.Open countyQuery, objConn
>Dim countyOptions
>countyOptions = "<option value=""0"">None</option>"
>Do While Not objCountyRS.EOF
> countyOptions = countyOptions & "<option value=""" &
>objCountyRS("county_id") & """"
> if CSTR(objCountyRS("county_id")) = CSTR(county) then
> countyOptions = countyOptions & " selected"
> end if
> countyOptions = countyOptions & ">" & objCountyRS("county_name") &
>"</option>"
> objCountyRS.MoveNext
>Loop
>Set objCountyRS = Nothing
>%>
><form name="companyform" method="post" action="companysubmit.asp">
> <table border="0" cellspacing="0" cellpadding="4">
> <tr>
> <td>Company Name: &nbsp;
> <input name="company" type="text" id="company" <% if company <>
>"" then %>value="<%=company%>" <%end if%>size="75"></td>
> </tr>
> <tr>
> <td>Street Address 1: &nbsp;
> <input name="address1" type="text" id="address1" <% if address1
><> "" then %>value="<%=address1%>" <%end if%>size="75"></td>
> </tr>
> <tr>
> <td>Street Address 2:&nbsp;&nbsp;
> <input name="address2" type="text" id="address2" <% if address2
><> "" then %>value="<%=address2%>" <%end if%>size="75"></td>
> </tr>
> <tr>
> <td>City: &nbsp;
> <input name="city" type="text" id="city" <% if city <> "" then
>%>value="<%=city%>" <%end if%>>
> &nbsp;&nbsp;&nbsp;State: &nbsp;
> <input name="state" type="text" id="state" <% if state1 <> "" then
>%>value="<%=state1%>" <%end if%> size="4" maxlength="2">
> &nbsp;&nbsp;Zip: &nbsp;
> <input name="zip" type="text" id="zip" size="10" <% if zip <> ""
>then %>value="<%=zip%>" <%end if%> maxlength="5">
> &nbsp;&nbsp;</td>
> </tr>
> <tr>
> <td>County: &nbsp;
> <select name="county">
> <%=countyOptions%>
> </select></td>
> </tr>
> <tr><td>
> <table border="0" cellspacing="0" cellpadding="2"><tr>
> <%
> objCategoryRS.Open categoryQuery, objConn
> Do While Not objCategoryRS.EOF%>
> <td>
> <strong><%=objCategoryRS("category_name")%>:</strong><br>
> <select name="classifications" size="15" multiple>
> <%
> DIM subCategoryQuery
> subCategoryQuery = "SELECT subcategory_id, subcategory_name FROM
>agency_subcategories WHERE category_id = " &
>objCategoryRS("category_id") & " ORDER BY subcategory_sort"
> objSubCategoryRS.Open subCategoryQuery, objConn
> Do While Not objSubCategoryRS.EOF%>
> <option value="" style="background-color:CC3333"
>disabled>-=<%=objSubCategoryRS("subcategory_name")%>=-</option>
> <%
> DIM classQuery
> classQuery = "SELECT classification_id, classification_name from
>agency_classifications WHERE subcategory_id = " &
>objSubCategoryRS("subcategory_id") & " ORDER BY classification_sort"
> objClassificationRS.Open classQuery, objConn
> Do While Not objClassificationRS.EOF
> Response.write("<option value=""" &
>objClassificationRS("classification_id") & """")
> if objSelectedClassifications.Exists(CSTR(objClassifi cationRS("classification_id")))
>then Response.write(" selected") end if
> Response.write(">" & objClassificationRS("classification_name") &
>"</option>")
> objClassificationRS.MoveNext
> Loop
> objClassificationRS.Close
> objSubCategoryRS.MoveNext
> Loop
> objSubCategoryRS.Close%>
> </select>
> </td>
> <%
> objCategoryRS.MoveNext
> Loop
> Set objCategoryRS = Nothing
> Set objSubCategoryRS = Nothing
> Set objClassificationRS = Nothing
> %>
> </tr></table>
> </td></tr>
> <tr>
> <td>Web Site: &nbsp;
> <input name="site" type="text" id="site" <% if site <> "" then
>%>value="<%=site%>" <%end if%> size="60"></td>
> </tr>
> <tr>
> <td>Contact Person First Name: &nbsp;
> <input name="contact" type="text" id="contact" <% if contact <> ""
>then %>value="<%=contact%>" <%end if%>>
> &nbsp;&nbsp;&nbsp;Last Name:
> <input type="text" name="contactlast" id="contactlast" <% if
>contactlast <> "" then %>value="<%=contactlast%>" <%end if%>></td>
> </tr>
> <tr>
> <td>Contact Person Title: &nbsp;
> <input name="title" type="text" <% if title <> "" then
>%>value="<%=title%>" <%end if%> id="title"></td>
> </tr>
> <tr>
> <td>Phone Number: &nbsp;
> <input name="phone" type="text" id="phone" <% if phone <> "" then
>%>value="<%=phone%>" <%end if%>>
> &nbsp;&nbsp;&nbsp;Email:&nbsp;&nbsp;
> <input name="email" type="text" id="email" size="40" <% if email
><> "" then %>value="<%=email%>" <%end if%>></td>
> </tr>
> <tr>
> <td>Premium Member: &nbsp;
> <input name="premium" type="checkbox" id="premium" value="yes" <%
>if premium <> "" then %>checked<%end if%>></td>
> </tr>
> <tr>
> <td>Description of Services:<br>
> <textarea name="description" cols="90" rows="10"
>id="description"><% if desc <> "" then %><%=desc%><%end
>if%></textarea></td>
> </tr>
> <tr>
> <td><input type="submit" name="Submit" value="Submit"></td>
> </tr>
></table>
><input type="hidden" value="<%=edit%>" name="edit">
><input type="hidden" value="<%=id%>" name="id">
></form>
></html>
><%
>Set objRS = Nothing
>objConn.Close
>Set objConn = Nothing
>%>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Reference, SQL Queries, SQL help ecoolone ASP .Net 0 01-03-2008 10:58 AM
MS Access SQL > ASP SQL problem.... david@scene-double.co.uk ASP General 10 01-06-2005 12:23 PM
asp and sql statement in sql server db weiwei ASP General 3 09-22-2004 04:12 PM
How to read an SQL Server into a ASP page and then change, add, delete and write it back to SQL Server Belinda ASP General 4 06-11-2004 12:16 PM
ASP SQL - using variables in SQL select screen Ed Garcia ASP General 4 08-07-2003 07:41 PM



Advertisments