|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
If record does not exist
hi,
what can i put in my if statement to say that this record doesnt exist example url: page.asp?ID=1 .asp page ID= request.querystring("ID") open recordset sql etc if recordset("UserID") "does not exist" then else endif so if the id in the querystring does not exist, display a message... Cheers |
|
#2
|
||||
|
||||
|
I think we told you that long ago, but here it is again:
Code:
ID= request.querystring("ID")
...
open recordset sql etc
...
If recordset.EOF Then
'does not exist
Else
strID = recordset("UserID")
...
End If
the EOF is what you need. |
|
#3
|
||||
|
||||
|
u can use end of file
Code:
if recordset.eof then 'no records else 'there r records end if you can read about it here http://www.w3schools.com/ADO/prop_rs_bofeof.asp |
|
#4
|
|||
|
|||
|
ah right yes i knew that... :| sowwi
just forgot for amoment thats how we do it thanks! |
![]() |
| Viewing: ASP Free Forums > Programming > ASP Development > If record does not exist |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|