Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - DetailsView - When do you get the new record value after an insert??

Reply
 
Old 01-25-2009   #1 (permalink)
MU


 
 

DetailsView - When do you get the new record value after an insert??

Hello,

I have a DetailsView on my form and I have a CheckBoxList that the
user can use in Insert mode. I need to take the values that were
selected from the CheckBoxList and insert them into another table
along with the NEW record id that is generated from the Insert from
the DetailsView.

When do I have access to that new record id and also still have access
to the CheckBoxList that is on the form?

Thoughts? Thanks!

My System SpecsSystem Spec
Old 01-26-2009   #2 (permalink)
Cor Ligthert[MVP]


 
 

Re: DetailsView - When do you get the new record value after an insert??

Hi Michael,

A detailview is a web control not a form control, what do I understand
wrong?

Cor

"MU" <michael@xxxxxx> wrote in message
news:0445a2d7-b1ff-4584-89ba-b35f794231d6@xxxxxx
Quote:

> Hello,
>
> I have a DetailsView on my form and I have a CheckBoxList that the
> user can use in Insert mode. I need to take the values that were
> selected from the CheckBoxList and insert them into another table
> along with the NEW record id that is generated from the Insert from
> the DetailsView.
>
> When do I have access to that new record id and also still have access
> to the CheckBoxList that is on the form?
>
> Thoughts? Thanks!
My System SpecsSystem Spec
Old 01-26-2009   #3 (permalink)
MU


 
 

Re: DetailsView - When do you get the new record value after aninsert??

On Jan 26, 1:46*am, "Cor Ligthert[MVP]" <Notmyfirstn...@xxxxxx>
wrote:
Quote:

> Hi Michael,
>
> A detailview is a web control not a form control, what do I understand
> wrong?
>
> Cor
>
> "MU" <mich...@xxxxxx> wrote in message
>
> news:0445a2d7-b1ff-4584-89ba-b35f794231d6@xxxxxx
>
Quote:

> > Hello,
>
Quote:

> > I have a DetailsView on my form and I have a CheckBoxList that the
> > user can use in Insert mode. *I need to take the values that were
> > selected from the CheckBoxList and insert them into another table
> > along with the NEW record id that is generated from the Insert from
> > the DetailsView.
>
Quote:

> > When do I have access to that new record id and also still have access
> > to the CheckBoxList that is on the form?
>
Quote:

> > Thoughts? *Thanks!
Sorry, I am using a DetailsView control and would like to get the ID
of the new record that is inserted into the database and am not sure
how.
My System SpecsSystem Spec
Old 01-26-2009   #4 (permalink)
Cor Ligthert[MVP]


 
 

Re: DetailsView - When do you get the new record value after an insert??

Mu,

In strongly depends what kind ID is used.

If that is by instance a Global Unique ID then you have to create that
yourself first before you do an insert.

Is it an so called Auto ID then you do send nothing (in a datatable is by
instance created a pseudo ID) and you have to get the ID by instance using

SCOPE_IDENTITY
http://msdn.microsoft.com/en-us/library/ks9f57t0.aspx

Cor

"MU" <michael@xxxxxx> wrote in message
news:0d48db3c-ad16-4837-b4dc-c09a0a8663bf@xxxxxx
On Jan 26, 1:46 am, "Cor Ligthert[MVP]" <Notmyfirstn...@xxxxxx>
wrote:
Quote:

> Hi Michael,
>
> A detailview is a web control not a form control, what do I understand
> wrong?
>
> Cor
>
> "MU" <mich...@xxxxxx> wrote in message
>
> news:0445a2d7-b1ff-4584-89ba-b35f794231d6@xxxxxx
>
Quote:

> > Hello,
>
Quote:

> > I have a DetailsView on my form and I have a CheckBoxList that the
> > user can use in Insert mode. I need to take the values that were
> > selected from the CheckBoxList and insert them into another table
> > along with the NEW record id that is generated from the Insert from
> > the DetailsView.
>
Quote:

> > When do I have access to that new record id and also still have access
> > to the CheckBoxList that is on the form?
>
Quote:

> > Thoughts? Thanks!
Sorry, I am using a DetailsView control and would like to get the ID
of the new record that is inserted into the database and am not sure
how.

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
how to insert pic? Live Mail
Can't record stereo mix, and it isn't disabled... can't record line either? Vista General
insert cd Vista music pictures video
CD Insert/Jewel Case Insert Maker ignored? Vista music pictures video


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46