CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Error when no record return from database

Print topic Send  topic

Author Message
muhd fauzi
Posted: 10/27/2004, 8:35 PM

I am writing a dynamic report query and the query sql look like this.
SQL::
SELECT count(bearerid) as cctcount,stationa, stationb, capacity, networktype, ccttype, spantype, pystationa.areaid AS pystationa_areaid, pystationa.tmolnos AS pystationa_tmolnos,
pystationb.areaid AS pystationb_areaid, pystationb.tmolnos AS pystationb_tmolnos, TribSpeed, TribPortAllowed
FROM ((nwbearer INNER JOIN rfspeedtrib ON
rfspeedtrib.SpeedTrid_key = nwbearer.SpeedTrib_key) INNER JOIN pystation pystationa ON
pystationa.stationid = nwbearer.stationa) INNER JOIN pystation pystationb ON
pystationb.stationid = nwbearer.stationb
WHERE pystationa.areaid LIKE '%{s_pystationa_areaid}%'
AND pystationa.tmolnos LIKE '%{s_pystationa_tmolnos}%'
AND pystationb.areaid LIKE '%{s_pystationb_areaid}%'
AND pystationb.tmolnos LIKE '%{s_pystationb_tmolnos}%'
AND stationa LIKE '%{s_stationa}%'
AND stationb LIKE '%{s_stationb}%'
AND capacity LIKE '%{s_capacity}%'
AND ccttype LIKE '%{s_ccttype}%'
AND networktype LIKE '%{s_networktype}%'
group by pystationa.areaid, pystationb.areaid, stationa, stationb, ccttype, capacity, networktype
ORDER BY pystationa.areaid, pystationb.areaid, stationa, stationb, ccttype, capacity, networktype

The display is in grid form and query take input from search. If the result return is valid( more the 0 ) than the display ok, but if result retrun is zero( not available ) then asp crash. Error message as below:

Error Type:
ADODB.Field (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/myNipsDc2/Classes.asp, line 2590

HOw do I trap and display message "sorry database return zero" if there is no result from the query. my query datasource type using 'SQL' since table type cannot provide count() function

Appreciate any help

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.