Re: IDENTITY_INSERT Problems
From: drs (dsavitsk_at_remove-and)
Date: 07/27/04
- Next message: drs: "Re: IDENTITY_INSERT Problems"
- Previous message: drs: "Re: IDENTITY_INSERT Problems"
- In reply to: Aaron [SQL Server MVP]: "Re: IDENTITY_INSERT Problems"
- Next in thread: Jim Young: "Re: IDENTITY_INSERT Problems"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 26 Jul 2004 22:53:07 -0500
"Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
news:uNJuBv3cEHA.1888@TK2MSFTNGP12.phx.gbl...
> Why would you post dummy code and not "the real code that wouldn't run"?
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
>
>
> "drs" <dsavitsk@remove-and respell-to-send-mail-YAH-HEW.com> wrote in
> message news:10gb6057novl208@corp.supernews.com...
> > "Jacco Schalkwijk" <jacco.please.reply@to.newsgroups.mvps.org.invalid>
> > wrote
> > in message news:Oix2sq1cEHA.244@TK2MSFTNGP12.phx.gbl...
> >> Hi drs,
> >>
> >> I didn't check all your code, but I noticed that the Field_2 column you
> > use
> >> is NOT NULL, and in the code you post you don't insert a value in this
> >> column. I.e. the code as you have posted it will fail because of this.
> >
> > Just the example code I posted, not the real code that wouldn't run.
> >
By "dummy code" I mean that I left out the line where I added a value for
the NOT NULL field -- a perfectly reasonable thing to do as actually leaving
out this line would not cause an error until calling the Update() function.
Further, I changed the dsn to take out my real name, etc. Oh, and the
CREATE statement was shortened so you did not need to read about all of the
fields I was creating which had no relevance to this question, and there
were times when I tried a create statement which did not contain a field
which was NOT NULL. Last, since Python is interactive (the >>> prompts
indicate that I was doing this from the command line) I actually tried over
a hundred different things. What I posted was reasonable example code which
did indeed not work, and which was the closest I could come in a short
amount of space to demonstraiting what I though might work, but which
didn't. It really does not work. It does not fail, however, due to some
problem other than my lack of understanding how the IDENTITY_INSERT command
works. That is to say, the NOT NULLness of a field, or the altered dsn does
not make my question more difficult to understand. I am sorry that my short
response did not elucidate this point more clearly.
Really, what I am looking for is an example of something that does work. I
have been unable to find one online.
So far, no one seems to think my code should work, but why is still a
mystery to me.
-d
- Next message: drs: "Re: IDENTITY_INSERT Problems"
- Previous message: drs: "Re: IDENTITY_INSERT Problems"
- In reply to: Aaron [SQL Server MVP]: "Re: IDENTITY_INSERT Problems"
- Next in thread: Jim Young: "Re: IDENTITY_INSERT Problems"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|