Re: VB Net and ADOX

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Try :

fld.Properties("AutoIncrement").Value=True

as fld.Properties("AutoIncrement") returns an object, not a boolean and you
don"t have any more non indexed default properties in VB.NET....

My personal preference would be likely to use SQL statements whenever
possible...

--
Patrice

"T Clancey" <tull@xxxxxxxxxxxxxxxx> a écrit dans le message de news:
69KdnQp_6KZWMXjZRVnygw@xxxxxxxxx
Hi.

I have an application that needs to update a database, as I'm using vb net
and an access database I have to do this using ADOX. I don't think there
is
another way.

I have found all sorts of examples which are basically the same, but none
of
them work!

I can create my tables and fields without any problems at all, but I want
to
create an AutoNumber field. All the examples state something like,
fld.properties("Autoincrement")=true. Vb net tells me that the 'Item' is
read only, I can't find anything else that helps.

Anyone come across this? Or have an answer?

Cheers,
Tull.




.



Relevant Pages

  • Re: How To Return Record Number From AddNew
    ... After adding a record to an Access Database (programmatically using ... the autonumber field should cntain the ... newly allocated value after the update resulting from the AddNew occurs. ... This email account is my spam trap so I ...
    (microsoft.public.data.ado)
  • How to create an AutoNumber field with a SQL statement?
    ... I need to upgrade a MS Access database with a script ... only, i.e., via SQL statement, not via Access GUI, and I'm having ... trouble defining an AutoNumber field. ...
    (comp.databases.ms-access)
  • Identify Autonumber field using VB6
    ... I am reading the database schema information for an access database using ... I get all the relevant information except the autonumber field. ... Dim rs111 As ADODB.Recordset ...
    (microsoft.public.vb.database.ado)
  • Identify Autonumber field using VB6
    ... I am reading the database schema information for an access database using ... I get all the relevant information except the autonumber field. ... Dim rs111 As ADODB.Recordset ...
    (microsoft.public.data.ado)
  • EDatabaseError possible Delphi bug???
    ... in the Access database: ... zzz boolean ... the really strange thing is that I can READ xxx asboolean, ... Rgds ...
    (borland.public.delphi.database.ado)