08-26-2009, 11:16 AM
Hi,
I have a problem in recordset object, when result of query is null means no data in database. Following is my code:
i m executing a query "select name, id, parentId from `Folders` where name = 'test' and parentId = 0 and id = 1;"
when this value exists in data base then my code is working fine.
But how can i check that this value exists in databases or not?
means if test in "name" colum does not exist then what would b the return value of recordset object? and how can we check that?
i did like following,
if recordSet = ""
if recordSet <> ""
if recordSet <> Nothing
if recordSet <> Null but these all are not working.
Please help me asap,
Thanks
I have a problem in recordset object, when result of query is null means no data in database. Following is my code:
Code:
Set Conn = CreateObject("ADODB.Connection" )
Conn.open "DRIVER={MySQL ODBC 5.1 Driver};SERVER=192.168.1.204;DATABASE=band;user id=monty;password=some_pass"
Set recordSet = Conn.Execute( "select name, id, parentId from `Folders` where name = 'test' and parentId = 0 and id = 1;")
i m executing a query "select name, id, parentId from `Folders` where name = 'test' and parentId = 0 and id = 1;"
when this value exists in data base then my code is working fine.
But how can i check that this value exists in databases or not?
means if test in "name" colum does not exist then what would b the return value of recordset object? and how can we check that?
i did like following,
if recordSet = ""
if recordSet <> ""
if recordSet <> Nothing
if recordSet <> Null but these all are not working.
Please help me asap,
Thanks