Hello,
I have 2 problems with autonumber in a form. I use sql server as back-end,
but when adding records i don't see the autonumber.
Also i use primary field where it values comes from the autonumber, which
results in a error that it cannot insert null values.
How can i resolve this issue?
ThxHi,
Can you please send me the Table structure as well the script which try to
insert into table.
Normally the primary key field will be kept as identity and we do not want
to insert value for that column.
Thanks
Hari
MCDBA
"Ezekiël" <ezekiel@.lycos.nl> wrote in message
news:OzTdDga5DHA.2496@.TK2MSFTNGP09.phx.gbl...
> Hello,
> I have 2 problems with autonumber in a form. I use sql server as back-end,
> but when adding records i don't see the autonumber.
> Also i use primary field where it values comes from the autonumber, which
> results in a error that it cannot insert null values.
> How can i resolve this issue?
> Thx
>|||Unlike Access/Jet, you don't see identity column numbers in a form
until AFTER the row is committed. You cannot insert nulls in a primary
key column. That causes an error in both Jet and SQL Server.
-- Mary
Microsoft Access Developer's Guide to SQL Server
http://www.amazon.com/exec/obidos/ASIN/0672319446
On Wed, 28 Jan 2004 15:07:03 +0100, "Ezekiël" <ezekiel@.lycos.nl>
wrote:
>Hello,
>I have 2 problems with autonumber in a form. I use sql server as back-end,
>but when adding records i don't see the autonumber.
>Also i use primary field where it values comes from the autonumber, which
>results in a error that it cannot insert null values.
>How can i resolve this issue?
>Thx
>|||Hi,
I don't use any script to insert records. I add records directly into the
table. As for the table structure, see below:
1 AutoNr int 4 0 (autonumber)
2 PersonIdnr int 4 0 (primary)
0 CarIdnr int 4 0
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:%23KB%23zwa5DHA.2300@.TK2MSFTNGP10.phx.gbl...
> Hi,
> Can you please send me the Table structure as well the script which try to
> insert into table.
> Normally the primary key field will be kept as identity and we do not want
> to insert value for that column.
> Thanks
> Hari
> MCDBA
>
> "Ezekiël" <ezekiel@.lycos.nl> wrote in message
> news:OzTdDga5DHA.2496@.TK2MSFTNGP09.phx.gbl...
> > Hello,
> >
> > I have 2 problems with autonumber in a form. I use sql server as
back-end,
> > but when adding records i don't see the autonumber.
> > Also i use primary field where it values comes from the autonumber,
which
> > results in a error that it cannot insert null values.
> >
> > How can i resolve this issue?
> >
> > Thx
> >
> >
>|||Hi,
To overcome these , can you try the below to insert data,
insert into table(PersonIdnr,CarIdnr ) values (2,0)
It is not required to explicitly provide data for Identity (Autonumber)
column.
Thanks
hari
MCDBA
"Mary Chipman" <mchip@.nomail.please> wrote in message
news:8ajf1010po8jlt48nuct0i64gmgch3637t@.4ax.com...
> Unlike Access/Jet, you don't see identity column numbers in a form
> until AFTER the row is committed. You cannot insert nulls in a primary
> key column. That causes an error in both Jet and SQL Server.
> -- Mary
> Microsoft Access Developer's Guide to SQL Server
> http://www.amazon.com/exec/obidos/ASIN/0672319446
> On Wed, 28 Jan 2004 15:07:03 +0100, "Ezekiël" <ezekiel@.lycos.nl>
> wrote:
> >Hello,
> >
> >I have 2 problems with autonumber in a form. I use sql server as
back-end,
> >but when adding records i don't see the autonumber.
> >Also i use primary field where it values comes from the autonumber, which
> >results in a error that it cannot insert null values.
> >
> >How can i resolve this issue?
> >
> >Thx
> >
>
No comments:
Post a Comment