Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp to asp.net

Status
Not open for further replies.

neomax

Programmer
Jul 1, 2006
29
BG
I am gettign this error while converting an asp application to asp.net

so it's not has a syntax error, but on out put is like this


The closest chapter to you is

System.__ComObjectSystem.__ComObjectSystem.__ComObject
System.__ComObject
System.__ComObject
System.__ComObject
Website
Contact

The closest chapter to you is

System.__ComObjectSystem.__ComObjectSystem.__ComObject
System.__ComObject
System.__ComObject
System.__ComObject
Website
Contact

please chek the code:

<%
Dim zipcode
Dim strZip
Dim conn
Dim rs
Dim ziplocator_database
Dim sqlWhere
Dim qlStr
Dim ChapterName, City, ChapterState, Phone1, Phone2, EmailAddress

zipcode=Request.Form("zipcode")

'zipcode validation
If isNumeric(zipcode) and InStrRev(zipcode,".")=0 and InStrRev(zipcode,",")=0 _
and InStrRev(zipcode,"&")=0 and InStrRev(zipcode,"+")=0 and InStrRev(zipcode,"-")=0 _
and InStrRev(zipcode,"$")=0 _
and Len(zipcode)=5 Then

strZip=Mid(zipcode,1,3)

'get the connection object

conn = Server.CreateObject("ADODB.Connection")
conn.Provider = "Microsoft.Jet.OLEDB.4.0"
ziplocator_database = "ziplocator_bd/ZipTable2.mdb"
conn.Open(Server.MapPath(ziplocator_database))
rs = Server.CreateObject("ADODB.recordset")

'get data from BD
sqlWhere = " where zipstart.ZipStart ='" & strZip & "'"
qlStr = " select ChapterName.EmailAddress, ChapterName.ChapterName, Chaptername.City, ChapterName.ChapterState, ChapterName.Phone1, Chaptername.Phone2, ChapterName.ChapterState, ChapterName.ChapWebsite from ChapterName inner join zipstart on Chaptername.ChapterCode = zipstart.ChapterCode "
qlStr = qlStr & sqlWhere

rs = Server.CreateObject("ADODB.recordset")
rs.Open(qlStr, conn)



'write results of searching

While Not rs.EOF

ChapterName = Convert.ToString(rs("ChapterName"))
City = Convert.ToString(rs("City"))
ChapterState = rs("ChapterState")
Phone1 = rs("Phone1")
Phone2 = rs("Phone2")
EmailAddress = rs("EmailAddress")

Response.Write("<DIV ALIGN=CENTER><table class=table1 width=100% border=0><TD>")
Response.Write("<br><br><font>The closest chapter to you is</font></TD>")
Response.Write("</TR><TD><br>")

Response.Write("<b><font>")
Response.Write(ChapterName)
Response.Write(City)
Response.Write(ChapterState)
Response.Write("</font></TD></TR><TD>")

Response.Write("<b>")
Response.Write(Phone1)
Response.Write("</TD></TR><TD>")

Response.Write("<b>")
Response.Write(Phone2)
Response.Write("</TD></TR><TD>")

Response.Write("<b>")
Response.Write(EmailAddress)
Response.Write("</TD></TR><TD>")

Response.Write("<a href= Response.Write("</TR><TD>")

Response.Write("<a href=mailto:info@.......org>Contact</a></TD>")

Response.Write("</tr></table>")


rs.movenext()
End While
else
if zipcode<>"" then
Response.Write("<center>" & "<br><br>" & "<font>" & "This is an invalid zip code, please enter a valid zip code." & "</font>")
End If
End If
%>
 
Take ca8msm's advice from your previous post:

thread855-1298824
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top