Wrox Home  
Search P2P Archive for: Go

  Return to Index  

activex_data_objects thread: Testing for the existence of a field in a recordset


Message #1 by Terrence Joubert <Terrence@v...> on Mon, 17 Sep 2001 11:19:50 +0400
Hi,

 

Is there a way I can check whether a field exists within an available

recordset?

I want to be able to check for the availability of a field before getting

its value from

a recordset.

 

Thanks

Terrence



Message #2 by Selvaraj PT <PSelvaraj@s...> on Mon, 17 Sep 2001 09:30:13 -0400
For i = 0 to RS.Fields.count - 1

	if RS.Fields(i).Name = "Something" then

		Flag = TRUE

		EXIT FOR

	End If

	Flag = FALSE

next i 



If Flag  =  True  then

	Do Something  You want........

End If





Hope this helps...



Pon.









> -----Original Message-----

> From: Terrence Joubert [mailto:Terrence@v...]

> Sent: Monday, September 17, 2001 3:20 AM

> To: ActiveX_Data_Objects

> Subject: [activex_data_objects] Testing for the existence of 

> a field in

> a recordset

> 

> 

> Hi,

>  

> Is there a way I can check whether a field exists within an available

> recordset?

> I want to be able to check for the availability of a field 

> before getting

> its value from

> a recordset.

>  

> Thanks

> Terrence

  Return to Index