Data Migration

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hello -

I'm trying to migrate data from an Access 2000 database to SQL 2005 Express. Both databases have the same schema.

Most primary keys are Auto Increment fields. I'm having the issue that even if I set primary key manually in my code, the Auto Increment rules seem to override this. This is very undesirable, as it would corrupt the relationships of existing data when I read from Access and Write to SQL.

How can I add rows to the SQL database bypassing the Auto Increment value?
i.e.:
ds_SQL.tblCompany.row(x).item("CompanyID") = ds_Access.tblCompany.row(x).item("CompanyID")

The data migrates, but the Auto Increment value is used. I'm using typed datasets, ensured the ReadOnly value is False in the Dataset, and even tried turning off Auto Increment at the Dataset level.

Thanks - I'm lost....


Wayne P.
.



Relevant Pages

  • Answers and the truth.. Need advice on replication..
    ... I have a database with no primary keys .. ... I have two machines setup with SQL 2000 Advanced.. ...
    (microsoft.public.sqlserver.replication)
  • Re: help with perl dbi and update without locks
    ... If I understand correctly you want to auto increment a numeric primary key ... This is heavily dependent on the database you are using. ... Another common method is to use an insert trigger that calculates the next ...
    (comp.lang.perl.misc)
  • Re: [PHP] Pragmatically changing a "Record Number"
    ... So to say it another way, I have a table that has 900 records in it, I've added 3 records, but then deleted 2 of those which puts the actual record count at 901 but my auto increment field starts at 904 on the next insert. ... Is there away with PHP that I can pragmatically change that value to the total records in the database more so then a representation of the actual record number? ... I've seen many people who wished to "fix" sequences like this before, usually because they believe there is something "wrong" with there being gaps in there. ...
    (php.general)
  • RE: Identity column, I use RDA
    ... You can use column primary key identity with auto increment, but on SQL Ce ... the patient are inserted at mobiel device end only for the first phase. ...
    (microsoft.public.sqlserver.ce)
  • DTS Package and Identity Fields
    ... SQL 2000 database. ... I used the Import Data Wizard, saving as a DTS package. ... How can I get this import to work and get the PK to auto increment like it ...
    (microsoft.public.sqlserver.programming)