PK on access

J

JO

hello,
how could i make to know if my column PK on access is auto increment.

with .net i use
Dim dtLstKP As DataTable =
MyConn.GetOleDbSchemaTable(OleDbSchemaGuid.Primary_Keys, New Object()
{Nothing, Nothing, strNomTable})

thx






bonjour
comment puis je savoir si la cle primaire primaire d'une table access
est auto incrementée ??

en .net j'utilise

Dim dtLstKP As DataTable =
MyConn.GetOleDbSchemaTable(OleDbSchemaGuid.Primary_Keys, New Object()
{Nothing, Nothing, strNomTable})


merci
 
A

Allen Browne

J

JO

Allen Browne a formulé la demande :
working in Access, you have several libraries you can use to get this kind
of info. DAO is the native one, but the others may be closer to what you are
used to.

ok ths but i dont want use another librarie, do you a system with
GetOleDbSchemaTable of dotnet

thx
 
A

Allen Browne

You cannot run .NET code in Access.

If you are actually trying to do this in .NET and not in Access, perhaps
someone else can comment.
 
J

JO

Le 12/03/2007, Jamie Collins a supposé :
For GetOleDbSchemaTable, see

How To Retrieve Column Schema by Using the DataReader GetSchemaTable
Method and Visual C# .NET
http://support.microsoft.com/kb/310107

using the OLE DB Provider for Jet 4.0 (Provider=Microsoft.Jet.OLEDB.
4.0).


FWIW in ADODB (ADO classic) you can't use OpenSchema to get the
autoincrement property. I assume this is because SchemaEnum rowsets
are analogous to the VIEWs of the SQL-92 standard's Information Schema
and you won't find autoincrement in the standard ;-) It's available to
ADOX, though.

Jamie.

i solve my problem with oledbdatareader

thx a+
 
Top