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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

redefined the names

Status
Not open for further replies.

meenakshidhar

Programmer
Oct 19, 2001
77
MY
my code is given below..i have two recordsets named "rs" both..
the error which i m getting is
---------------------------------------------
Microsoft VBScript compilation error '800a0411'

Name redefined

/test/db.asp, line 36

dim rs
----^
---------------------------------------------
so can't i redefined the name in asp??? is there any way to redefine the names...


<%@ Language=VBScript %>
<%Option explicit%>
<!-- #include file="connection.asp" -->
<%
dim rs
set rs=server.CreateObject("adodb.recordset")
set rs=conn.Execute("select * from invoice")
Response.write rs("invoicenumber")
rs.close
set rs=nothing


dim rs
set rs=server.CreateObject("adodb.recordset")
set rs=conn.Execute("select * from CustomerUsage where anicode='aaa'")
response.write rs("CompanyName") & "<br>"
rs.close
set rs=nothing
%>
 
You dont need to redefine it. Get rid of the second definition and you will be OK. However, good programming practice would say that you shouldn't use the same name twice.


Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top