Click here to Skip to main content
16,013,082 members
Home / Discussions / Database
   

Database

 
GeneralRe: datetime issues in primary key [modified] Pin
Ennis Ray Lynch, Jr.17-Aug-06 9:09
Ennis Ray Lynch, Jr.17-Aug-06 9:09 
GeneralRe: datetime issues in primary key Pin
Ista17-Aug-06 9:35
Ista17-Aug-06 9:35 
GeneralWTF Pin
Ennis Ray Lynch, Jr.17-Aug-06 9:48
Ennis Ray Lynch, Jr.17-Aug-06 9:48 
GeneralRe: WTF Pin
Paul Conrad17-Aug-06 9:57
professionalPaul Conrad17-Aug-06 9:57 
AnswerRe: datetime issues in primary key Pin
Eric Dahlvang17-Aug-06 8:26
Eric Dahlvang17-Aug-06 8:26 
GeneralRe: datetime issues in primary key Pin
Ista17-Aug-06 9:33
Ista17-Aug-06 9:33 
GeneralRe: datetime issues in primary key Pin
i.j.russell17-Aug-06 10:48
i.j.russell17-Aug-06 10:48 
GeneralRe: datetime issues in primary key [modified] Pin
Ista17-Aug-06 11:05
Ista17-Aug-06 11:05 
i.j.russell wrote:
Has it only just started happening as you say that the code is 5 years old?


Well it appears that on the development server the primary key exists, but on the rest of the servers(staging, QA, and production) it has either been deleted or never published. Probably it wasn't working in a roll-out and never got put back in.

i.j.russell wrote:
Does it always cause a PK violation?


Always. They have managed to get the row inserted with the violation. Since The stored procedure calls another stored procedure to do the actual insert


i.j.russell wrote:
Are you only inserting into 1 table?


Yes


i.j.russell wrote:
Are all of the datetime values obtained from the same source?


Yes, there is a GetDate() inside the insert statement.


i.j.russell wrote:
Is the datetime value different for each insert?


We have waited from 15 seconds to a few minutes and we always get the issue.


I realize, like everyone else, that this isn't advisable but this method seems to be carved in stone. Since I recommend an int column and they tell me that can't be the problem. If the world was a best case scenario, we probably wouldn't have a job to go to.

If you can tell me why this is bugging out when I'm not violating the date millisecond issue.

The PK is has 7 columns in it. Each isd an int field and thier exactly the same except for the GetDate() column, which is at the end


-- modified at 17:06 Thursday 17th August, 2006

--------------------------------------------------------

1 line of code equals many bugs. So don't write any!!

My mad coder blog

GeneralRe: datetime issues in primary key Pin
Ista17-Aug-06 11:10
Ista17-Aug-06 11:10 
GeneralRe: datetime issues in primary key Pin
Eric Dahlvang17-Aug-06 10:56
Eric Dahlvang17-Aug-06 10:56 
GeneralRe: datetime issues in primary key Pin
Ista17-Aug-06 11:07
Ista17-Aug-06 11:07 
GeneralRe: datetime issues in primary key Pin
Eric Dahlvang17-Aug-06 11:26
Eric Dahlvang17-Aug-06 11:26 
QuestionI want to rows having no repeated values..... Pin
Khawar Abbas116-Aug-06 2:50
Khawar Abbas116-Aug-06 2:50 
AnswerRe: I want to rows having no repeated values..... Pin
ToddHileHoffer16-Aug-06 4:44
ToddHileHoffer16-Aug-06 4:44 
GeneralRe: I want to rows having no repeated values..... Pin
Khawar Abbas116-Aug-06 19:29
Khawar Abbas116-Aug-06 19:29 
AnswerRe: I want to rows having no repeated values..... Pin
i.j.russell18-Aug-06 8:51
i.j.russell18-Aug-06 8:51 
Questioninsert data from excel into a sql 2005 database Pin
playout16-Aug-06 2:01
playout16-Aug-06 2:01 
AnswerRe: insert data from excel into a sql 2005 database Pin
ToddHileHoffer16-Aug-06 4:46
ToddHileHoffer16-Aug-06 4:46 
QuestionConnect to MySQL Pin
dkeenaghan16-Aug-06 0:53
dkeenaghan16-Aug-06 0:53 
AnswerRe: Connect to MySQL Pin
248912816-Aug-06 1:28
248912816-Aug-06 1:28 
GeneralRe: Connect to MySQL Pin
dkeenaghan16-Aug-06 2:27
dkeenaghan16-Aug-06 2:27 
AnswerRe: Error connecting to Access DB: "Could not find installable ISAM" Pin
Stephen McGuire16-Aug-06 7:27
Stephen McGuire16-Aug-06 7:27 
QuestionQuestion of beginer Pin
papa8015-Aug-06 22:20
papa8015-Aug-06 22:20 
AnswerRe: Question of beginer Pin
Colin Angus Mackay15-Aug-06 23:21
Colin Angus Mackay15-Aug-06 23:21 
GeneralRe: Question of beginer Pin
papa8016-Aug-06 3:55
papa8016-Aug-06 3:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.