Forums
This topic is locked
syntax to recognize there is no record there
Posted 21 Apr 2003 17:34:24
1
has voted
21 Apr 2003 17:34:24 Richard Krawczak posted:
Hi there,Tried to get an answer to my problem in the ultradev and mx community but they can’t provide me with a sati factional answer.
So I hope that this forum can
Well the problems this:
A product table is the parent table which provides a unique product-id. This product_id also resides in the measurements table.
So 1 product can have many measures.
When deleting measurements in the adminpage, I encounter a problem which I can’t solve.
The thing is that when deleting, the page submits to it self.
When no record is left then the page gives an error telling there is no record set.
EOF and BOF don’t do the trick since there is no record set. But the record set is expected to be there since the parsing of the value gives a value to be processed.
So the page gives its expected error. There is no record set.
I want to code the page so it reacts to the fact that there is no record set and response redirects elsewhere.
Something like:
<%
If recordsetexample.BOF AND recordsetexample.EOF = true then
Response.Redirect(“anypage”
%>
But then in a sense that it reacts to the fact that there is no record set there where there should be one.
Help in this matter is appreciated
JJF
Replies
Replied 25 Apr 2003 11:47:18
25 Apr 2003 11:47:18 Julio Taylor replied:
why don't you submit to another page after deletion which carries out a check to see if the recordset is empty or not and redirect accordingly from there?
------------------------
Julio
PHP | MySQL | DWMX
ICQ: 19735247
MSN:
------------------------
Julio
PHP | MySQL | DWMX
ICQ: 19735247
MSN:
Replied 25 Apr 2003 14:18:05
25 Apr 2003 14:18:05 Richard Krawczak replied:
Hi there julio,
Yes that is the shortest way arround to solve it.
But there is an extra page needed and i hoped that it wouldnt be nessecary, because for the customer it's an extra wait while he maybe has up to 8 or 12 measures to delete.
Everytime a sumbit to the server and back again extra.
I just hoped there was a shorter way to it
thanks
JJF
Yes that is the shortest way arround to solve it.
But there is an extra page needed and i hoped that it wouldnt be nessecary, because for the customer it's an extra wait while he maybe has up to 8 or 12 measures to delete.
Everytime a sumbit to the server and back again extra.
I just hoped there was a shorter way to it
thanks
JJF