-
ASPDB Error inspite of suppressmsg and custom message using custom message
Hi,
I am using ASPDB enterprise edition. The foll is the description of my problem.
I connect to the database twice and display two sets of recors retrieved from two different tables on the same page.second table has no records while the first one has.
I get the following error inspite of giving custom error message and using suppressmsg property.
Error: dbmdb, dbDSN, dbdat and dbRecordSet cannot be all blank
If i use response.clear while retrieving dealing with the second table only my custom message gets displayed
Thanks for spending your valuable time.
The code is
<%Response.buffer = true%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<META HTTP-EQUIV="EXPIRES" CONTENT="0">
<META HTTP-EQUIV="Expires" CONTENT="Mon, 01 Jan 1996 01:01:01 GMT">
</HEAD>
<%
member_id = Request.QueryString("mem_id"
Set objdict = Server.CreateObject("Scripting.Dictionary"
Set obj = Server.CreateObject("BHPcommon.user"
nickname = obj.GetNickName(cstr(member_id))
%>
<body bgcolor="#ffffff" text="#000000" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
<!--#INCLUDE VIRTUAL="/common/include_files/reg_header.asp"-->
<div align="center"><center>
<table border="0" width="780" cellspacing="0" cellpadding="0">
<tr>
<!--#INCLUDE VIRTUAL="/common/include_files/leftpanel.asp"-->
<td width="530" bgcolor="#FFFFFF" valign="top">
<table
border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="50%" valign="top"></td>
<td width="50%" valign="top"></td>
</tr>
</table>
<div align="left"><p align="center"><b>
<font face="Arial" size="2" color="#000000"><%Response.Write ucase(nickname)%>'S Exchange<br>
</font></b><font face="Arial" size="2">
<div align="center"><center>
<font face="Verdana" size="3" color="blue">
</center>
Have Items
</font>
<p>
<%
Set MyDb = Server.CreateObject("AspDB.EP"
MyDb.dbUnit = 97
MyDb.dbReset(97)
MyDb.dbDSN=Application("Connection1_Connection String"
MyDb.dbColor = "7,auto,#ECECEC,,#ECECEC"
MyDb.dbGridtabletag = "border=0 cellspacing=2 cellpadding=3"
MyDb.dbGridTableTag = "width=96%"
MyDb.DbMode="Grid"
MC = "2,, <A HREF=have_item_title.asp?Itemid=#1#>#2#</A>;"
MyDb.dbMagicCell = MC
MyDb.DbGridInc = 20
MyDb.dbOptions = "HeaderFontTag=Face=Arial Size=2 Color=#F6F6F6,CellFontTag=Face=Arial Size=2"
MyDb.dbNameMap = "0,,bgcolor=#009999; 1,,bgcolor=#009999; 2,,bgcolor=#009999; 3,,bgcolor=#009999; 4,,bgcolor=#009999; 5,,bgcolor=#009999; 6,,bgcolor=#009999; 7,,bgcolor=#009999; 8,,bgcolor=#009999; 9,,bgcolor=#009999; 10,,bgcolor=#009999..."
sq = "select distinct a.member_id_n,"
sq = sq & " a.exchange_item_have_id_n,"
sq = sq & " a.item_title_t as [I Have],"
sq = sq & " a.item_description_t as [Description]"
sq = sq & " from edj.exchange_have_item a"
sq = sq & " where a.member_id_n = '" &member_id& "'"
sq = sq & " and (a.item_status_id_n = 1 or a.item_status_id_n = 2)"
MyDb.dbSQL = sq
MyDb.dbImageDir="../../common/images/"
MyDb.dbStatusBar = False
MyDb.dbSuppressMsg = true
MyDb.dbGridColSortHideFlds = "0,1,2,3,4,5,6"
MyDb.dbGridHideFlds = "0,1"
Mydb.dbNavigationItem="next, prev"
Mydb.dbNavigationIcon="std"
MyDb.dbGridHideDuprecFlds="0,1,3,4,5,6,7,8" ;
MyDb.aspDBEP
RECS = MyDb.dbRecordCount
%>
<%
If recs <= 0 then
Response.Clear
Response.Write("No records were found for Have Items!"
End If
%>
<!--
<% if RECS < 1 then %>
<br>
<font SIZE="3" COLOR="black">
No records were found for Have Items!
</font>
<% end if %>-->
<p>
<br>
<div align="center"><center>
<font face="Verdana" size="3" color="blue">
</center>
Want Items
</font>
<%
Set MyDb2 = Server.CreateObject("AspDB.EP"
MyDb2.dbUnit = 488
MyDb2.dbReset(488)
MyDb.dbDSN=Application("Connection1_Connection String"
MyDb2.dbColor = "7,auto,#F6F6F6,,#F6F6F6"
MyDb2.dbGridtabletag = "border=0 cellspacing=2 cellpadding=3"
MyDb2.dbGridTableTag = "width=96%"
MyDb2.DbMode="Grid"
MC = "2,, <A HREF=want_item_title.asp?Itemid=#1#>#2#</A>;"
MyDb2.dbMagicCell = MC
MyDb2.DbGridInc = 20
MyDb2.dbOptions = "HeaderFontTag=Face=Arial Size=2,CellFontTag=Face=Arial Size=2"
MyDb2.dbNameMap = "0,,bgcolor=#009999; 1,,bgcolor=#009999; 2,,bgcolor=#009999; 3,,bgcolor=#009999; 4,,bgcolor=#009999; 5,,bgcolor=#009999; 6,,bgcolor=#009999; 7,,bgcolor=#009999; 8,,bgcolor=#009999; 9,,bgcolor=#009999; 10,,bgcolor=#009999..."
MyDb2.dbImageDir="../../common/images/"
sq = "select b.member_id_n,"
sq = sq & " b.exchange_item_want_id_n,"
sq = sq & " b.item_title_t as [I Want],"
sq = sq & " b.item_description_t as [Description]"
sq = sq & " from edj.exchange_want_item b"
sq = sq & " where b.member_id_n = '" &member_id& "'"
MyDb2.dbSQL = sq
MyDb2.dbStatusBar = False
MyDb2.dbSuppressMsg =true
MyDb2.dbGridColSortHideFlds = "0,1,2,3,4,5,6,7,8"
MyDb2.dbGridHideFlds = "0,1"
Mydb2.dbNavigationItem="next, prev"
Mydb2.dbNavigationIcon="std"
MyDb2.aspDBEP
RECS = MyDb2.dbRecordCount
%>
<%
If recs <= 0 then
'Response.Clear
Response.Write("No records were found for Want Items!"
End If
%>
<!--
<% if RECS < 1 then %>
<br>
<div align="center"><center>
<font face="Verdana" size="3" color="red">
</center>
No items available !
</font>
<% end if %>-->
<form id=form1 name=form1>
<div align="center">
<input type="button" value="Back" name="B1" onClick="history.back()">
</center></div>
</form>
</td>
<!--#INCLUDE VIRTUAL="/common/include_files/rightpanel.asp"-->
</tr>
</table>
</center></div><!--#INCLUDE VIRTUAL="/common/include_files/footer.asp"-->
</body>
</HTML>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|