|
 |
asp_web_howto thread: datatype problem - I think!
Message #1 by Jean Halstad <J_Halstad@S...> on Fri, 15 Feb 2002 14:59:46 -0000
|
|
Have a smallint field in SQL database. When I try to enter a variable into
the database, I get the following error.
[Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY
constraint 'PK_Diary_1__11': Attempt to insert duplicate key in object
'Diary'.
The SQL Statement is
"insert into Diary (Venue, MonthNo) values ('"&strVenue&"', "&strintMonth")"
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
Message #2 by Oleg Kapeljushnik <c-oleg.kapeljushnik@w...> on Fri, 15 Feb 2002 10:42:38 -0500
|
|
Hi !
It doesn't seem like data type problem but as duplicate key problem.
It seemed that your Diary table doesn't allow to have the same value of
Venue
or may be combination of Venue and MonthNo.
Check PK_Diary_1__11 constraint to see if you can add duplicate data into
this table
and if you need to have duplicate data in there then tell DBA to change
Table definition.
Oleg.
-----Original Message-----
From: Jean Halstad [mailto:J_Halstad@S...]
Sent: February 15, 2002 10:00 AM
To: ASP Web HowTo
Subject: [asp_web_howto] datatype problem - I think!
Have a smallint field in SQL database. When I try to enter a variable into
the database, I get the following error.
[Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY
constraint 'PK_Diary_1__11': Attempt to insert duplicate key in object
'Diary'.
The SQL Statement is
"insert into Diary (Venue, MonthNo) values ('"&strVenue&"', "&strintMonth")"
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
$subst('Email.Unsub').
Message #3 by Jean Halstad <J_Halstad@S...> on Fri, 15 Feb 2002 16:02:31 -0000
|
|
Panic over. It just got better all by itself when I closed Visual InterDev.
Sorry to have troubled you.
-----Original Message-----
From: Oleg Kapeljushnik [mailto:c-oleg.kapeljushnik@w...]
Sent: 15 February 2002 15:43
To: ASP Web HowTo
Subject: [asp_web_howto] RE: datatype problem - I think!
Hi !
It doesn't seem like data type problem but as duplicate key problem.
It seemed that your Diary table doesn't allow to have the same value of
Venue
or may be combination of Venue and MonthNo.
Check PK_Diary_1__11 constraint to see if you can add duplicate data into
this table
and if you need to have duplicate data in there then tell DBA to change
Table definition.
Oleg.
-----Original Message-----
From: Jean Halstad [mailto:J_Halstad@S...]
Sent: February 15, 2002 10:00 AM
To: ASP Web HowTo
Subject: [asp_web_howto] datatype problem - I think!
Have a smallint field in SQL database. When I try to enter a variable into
the database, I get the following error.
[Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY
constraint 'PK_Diary_1__11': Attempt to insert duplicate key in object
'Diary'.
The SQL Statement is
"insert into Diary (Venue, MonthNo) values ('"&strVenue&"', "&strintMonth")"
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
$subst('Email.Unsub').
$subst('Email.Unsub').
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
|
|
 |