Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is the return value of record set object,when value in data base does not exist?
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi,

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
Reply


Messages In This Thread
What is the return value of record set object,when value in data base does not exist? - by Star - 08-26-2009, 11:16 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  General run error when Exist fails msacks 1 1,851 02-08-2019, 02:12 AM
Last Post: Ankur
  [UFT 12.52/VBScript] Test object exist, is visible and enabled before take an action sparkwanted 0 3,641 02-07-2017, 12:28 AM
Last Post: sparkwanted
  Childobject return wrong checkbox count.. VpnQTP 1 2,847 04-09-2015, 09:07 PM
Last Post: babu123
  how to find Excel file exist or not in vbscript code sree.85 3 11,240 08-22-2013, 11:42 AM
Last Post: akhandesh
  Remote server machine does not exist eroshan 5 14,229 05-06-2013, 06:03 PM
Last Post: Saket

Forum Jump:


Users browsing this thread: 1 Guest(s)