Unix Technical Forum

Auto-increment fields when moving a base from Access to SQL server

This is a discussion on Auto-increment fields when moving a base from Access to SQL server within the SQL Server forums, part of the Microsoft SQL Server category; --> Hello all, I'm a total newbie with SQL Server 2000 and I have a little problem when moving a ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 06:10 PM
Yan Roosens
 
Posts: n/a
Default Auto-increment fields when moving a base from Access to SQL server

Hello all,

I'm a total newbie with SQL Server 2000 and I have a little problem when
moving a database form Access 2000 to SQL Server 2000.
In the Access database, each table has an auto-increment field.
After importing the tables in SQL Server, all the auto-increment fields
are turned into "int" type fields.
Does anybody have an explanation for that mystery?

Thanks in advance,
Yan


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 06:10 PM
CJ
 
Posts: n/a
Default Re: Auto-increment fields when moving a base from Access to SQL server

You might want to change the field type from int to identity. The identity
field type in SQL Server is analogous to the Autonumber field type in
Access.

good luck

CJ


"Yan Roosens" <yan.roosens@skynet.be> wrote in message
news:3F7C4258.6C6B428E@skynet.be...
> Hello all,
>
> I'm a total newbie with SQL Server 2000 and I have a little problem when
> moving a database form Access 2000 to SQL Server 2000.
> In the Access database, each table has an auto-increment field.
> After importing the tables in SQL Server, all the auto-increment fields
> are turned into "int" type fields.
> Does anybody have an explanation for that mystery?
>
> Thanks in advance,
> Yan
>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-28-2008, 06:10 PM
Yan Roosens
 
Posts: n/a
Default Re: Auto-increment fields when moving a base from Access to SQL server

Hi CJ,

> You might want to change the field type from int to identity. The identity
> field type in SQL Server is analogous to the Autonumber field type in
> Access.


Thank you, the error message related to that problem is no longer displayed, I
will now care about the next one :-(

Yan

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-28-2008, 06:10 PM
Lyndon Hills
 
Posts: n/a
Default Re: Auto-increment fields when moving a base from Access to SQL server

On Thu, 02 Oct 2003 17:20:57 +0200, Yan Roosens
<yan.roosens@skynet.be> wrote:

>Hello all,
>
>I'm a total newbie with SQL Server 2000 and I have a little problem when
>moving a database form Access 2000 to SQL Server 2000.
>In the Access database, each table has an auto-increment field.
>After importing the tables in SQL Server, all the auto-increment fields
>are turned into "int" type fields.
>Does anybody have an explanation for that mystery?
>
>Thanks in advance,
>Yan
>

Because that isn't a data type. Look up identity for an explanation of
how sql server can provide that sort of functionality.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:03 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com