there are two ASPs
here is line 1- 50 from cityadded.asp
<!-- .asp
Designed by: Adrienne DeVoe
Modified for Oracle by: Michael Durik
Updated date: March 3, 2005
Description: This allows the user to add a new city and abbreviation
to the database.
-->
<html>
<head>
<title>Add New City</title>
</head>
<!--#include file="../access/string.asp"-->
<%
Dim CityName
Dim CityAbbr
Dim TodayDate
Dim Duplicate
TodayDate = date()
CityName = (Request.Form("txtCity"))
CityAbbr = (Request.Form("txtCityAbbreviation"))
Duplicate = False
if CityName = "" OR cityAbbr = "" THEN
response.write("Invalid City or Abbreviation")
else
strSQL = "INSERT INTO group_travel(City_Name, City_Abbreviation)
VALUES('"&CityName&"', '"&CityAbbr&"')"
dbConnection.execute(strSQL)
end if
strSQL = "SELECT * FROM group_travel"
rsCityAdded = dbConnection.execute(strSQL)
%>
<body>
<table align="center" width="319">
<!--If statement displays values already in the table-->
<tr>
<td align="center" colspan="2"><b><font size="4">City Abbreviation
List</font></b></td>
</tr>
<tr><td colspan="2"> </td></tr>
<tr>
<td align="center"><b>Location</b></td>
<td align="center"><b>Abbreviation</b></td>
</tr>
This is the other asp (addnewcity.asp)
This is the one where i add the records... the cityadded.asp then the
cityadded.asp should just
be a return page confirming the city and the abbreviation that was added...
the entries do get recorded it is just that i get these errors once i add new
values.
Here is the code for this one:
<!--AddNewCity.asp
Designed by: Adrienne DeVoe
Modified for Oracle by: Michael Durik
Updated: March 3, 2005
Description: This allows the user to add a new city and abbreviation
to the database.
-->
<html>
<head>
<title>Add New City</title>
</head>
<!--#include file="../access/string.asp"-->
<%
TodayDate = date()
'Query the database for city and abbreviation
strSQL = "SELECT * FROM group_travel Order By City_Name"
set rsAddCity = dbConnection.execute(strSQL)
%><body>
<table align="center" width="334">
<!--If statement displays values already in the table-->
<tr>
<td align="center" colspan="3"><b><font size="6">City Abbreviation
List</font></b></td>
</tr>
<tr><td colspan="2"> </td></tr>
<tr>
<td align="center" width="198"><b><font size="4">Location</font></b></td>
<td align="center" width="126"><b><font
size="4">Abbreviation</font></b></td>
</tr>
<%Do While NOT rsAddCity.EOF%>
<%if rsAddCity("City_Name") <> "" AND rsAddCity("City_Abbreviation") <> ""
then%>
<tr>
<td align="center" width="198"><%=rsAddCity("City_Name")%></td>
<td align="center"><%=rsAddCity("City_Abbreviation")%></td>
</tr>
<%else%>
<%end if%>
<% rsAddCity.moveNext() %>
<%Loop%>
<!--No records found-->
</table>
<table align="center" width="472">
<!--Add New City-->
<form method="post" action="CityAdded.asp">
<tr><td> </td></tr>
<tr>
<td align="center" colspan="3"><b><font size="5">What city would you like
to ADD?</font></b></td>
</tr>
<tr>
<td align="center" colspan="3">*If there is more than one airport in a
city, specify the airport in parentheses.</td>
</tr>
<tr><td colspan="2"> </td></tr>
<tr>
<td align="right"><b>City </b></td>
<td ><input type="text" name="txtCity" size="24"></td>
</tr>
<tr>
<td> </td>
<td>*Example: Chicago(Midway)</td>
</tr>
<tr>
<td align="right"><b>Abbreviation</b></td>
<td><input type="text" name="txtCityAbbreviation" size="6"></td>
</tr>
<tr>
<td height="22"> </td>
<td height="22">*Three uppercase letters</td>
</tr>
<tr><td> </td></tr>
<tr>
<td colspan="3" align="center"><input type="submit" value="Add City"></td>
</tr>
</form>
<!--Links to other pages-->
<tr><td> </td></tr>
<tr>
<td align="center" colspan="3"><A name="CancelAdd" id="CancelADd"
href=ViewCityAbbr.asp>Cancel City Add</a></td>
</tr>
<tr>
<td align="center" colspan="3"><A name="MainMenu" id="MainMenu"
href=../../ReportMainMenu.asp>Report Main Menu</a></td>
</tr>
</table>
</body>
<%
set dbConnection = nothing
%>
</html>
Here is the link: try to add a city if u want to see what happens....
http://www.sba.muohio.edu/sba_home/...International/CityAbbreviation/AddNewCity.asp
Thanks