J
jimt
I'm using Frontpage 2000 with connection to an Access 2000 DB. I open a
connection to a stored query in the DB. After the Set command to execute the
query I would like to test for the number of records before writing the data
to the web page. If no records are returned I would skip over that section of
the html code.
I've tried using a DCount function for the record check but get an error
(unable to display the page). The following is an example of the type of code
I'm using:
where_stmt = "Where mykeyfld"
SQL_stmt = "Select * " & _
"From my_stored_query" & _
where_stmt
Set rs_xyz = connOLEDB.execute(SQL_stmt)
record_check = DCount("*", rs_xyz)
(this is where it errors out)
If record_check > 0 Then
etc.
1. Does VBScript allow the use of DCount?
2. If so, what is incorrect with the above code?
3. If not, is there an alternative other than counting the record via a
where loop?
Thanks
Jim T.
connection to a stored query in the DB. After the Set command to execute the
query I would like to test for the number of records before writing the data
to the web page. If no records are returned I would skip over that section of
the html code.
I've tried using a DCount function for the record check but get an error
(unable to display the page). The following is an example of the type of code
I'm using:
where_stmt = "Where mykeyfld"
SQL_stmt = "Select * " & _
"From my_stored_query" & _
where_stmt
Set rs_xyz = connOLEDB.execute(SQL_stmt)
record_check = DCount("*", rs_xyz)
(this is where it errors out)
If record_check > 0 Then
etc.
1. Does VBScript allow the use of DCount?
2. If so, what is incorrect with the above code?
3. If not, is there an alternative other than counting the record via a
where loop?
Thanks
Jim T.