PDA

View Full Version : Field IDENTITY and ADOBD.RecordSet


Melian
03-22-02, 09:51
Hi,

I need help.

I'm using Sybase OLEDB Provider 2.1, Visual Basic 6.0 and Microsoft Activex Data Object 2.5.

How can to know if a field is of type IDENTITY in a RecordSet?

I know that using the property Type of Field, for example:

RS.Field.Type = adNUMERIC, but I would like to know when is IDENTITY not NUMERIC.

Bye.

Tim G
04-25-02, 05:04
I don't know why you need to know if a fieldtype is set to IDENTITY, but here is how to put the IDENTY to on or off..

YourConnection.Execute "SET IDENTITY_INSERT [yourtable] ON"
YourConnection.Execute "SET IDENTITY_INSERT [yourtable] OFF"

This will set all the fields that have an Identity to off or on...