PK on access

  • Thread starter Thread starter JO
  • Start date Start date
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
 
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
 
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.
 
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.

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.

--
 
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+
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top