data question (ASP.NET2.0 - C#)

  • Thread starter Thread starter Justin Rich
  • Start date Start date
J

Justin Rich

I am making a fairly simple help desk program. when a new ticket is created
it is sent in to two tables.

TICKETS and CONVERSATIONS

the username, computer, topic and subject go in to TICKETS and the problem
description goes in to CONVERSATION

the problem is i need the TICKET_ID from the TICKETS table to insert in to
the CONVERSATION table..

what i can do is do the insert and then query the TICKET_ID field for max
(its an identity, counts up, highest number is the new ticket)

but im guessing there is some nice way to do this in ASP.NET/C#

so i guess what im looking for is..... is there a way to return the auto
generated ticket_id from the insert?

Thanks
Justin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top