AW: How to check SAPDB return value in Access

"Hübschen, Peter" <[email protected]> Wed, 3 Sep 2003 06:57:18 +0200
Newsgroups gmane.comp.db.sapdb.general
Message-ID <5037282E0DC5D711974C00304852417A025E71@SERVER-XCH>
Hello, 

I found my own solution. If I insert a count() then I get what I want.
Simple but very usefull.

Peter

> -----Ursprüngliche Nachricht-----
> Von:	Hübschen, Peter 
> Gesendet am:	Dienstag, 2. September 2003 11:04
> An:	Mailingliste SAPDB (E-Mail)
> Betreff:	How to check SAPDB return value in Access
> 
> Hello, 
> 
> I'm facing the followin problem:
> To find out if I have to insert new records or if I have to use the old
> one,
> I'm executing a "SELECT lfd_Rueckfragenummer FROM tbl_StaffelRueckm WHERE
> Lfd_Rueckfragenummer = <integer>". 
> If I execute this in SQL Studio I get the message:
> "Statement successfully executed. No result." 
> That's ok.
> 
> But in Access I'm using this query for defining a recordset. (Set rs =
> ODBCConnection.OpenRecordSet("SELECT lfd_Rueckfragenummer FROM
> tbl_StaffelRueckm WHERE Lfd_Rueckfragenummer = <integer>)
> 
> Now I want to check if I get any information back. If I test
> 'IsNull(rs(0))', I get false => so it's not null
> If I test 'IsEmpty(rs(0)), I get false => so it's not empty.
> If I test if rs = "", I get "No current Record".
> 
> So how can I check in Access if I get an empty recordsource back from my
> query.
> 
> Thanks in advance for any hint.
> Peter
> 
> P.S. If I remember right, in a complete Access environment I could check
> this with a "IsNull".
> 
> 
> _______________________________________________
> sapdb.general mailing list
> [email protected]
> http://listserv.sap.com/mailman/listinfo/sapdb.general
> 
>