| | |
Please help
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
I am using C# and SQL Server 2000, I have 2 related tables, master and a child, the master table have a primary which is an autonumber and I reference that autonumber to my child table as a foreign key so my problem is to get the value of the autonumber from a master table and write it to my child table when adding a new record to my child table, I was wandering if anyone know how to do that
Thanx in advance
Thanx in advance
Some people get so rich they lose all respect for humanity. That's how rich I want to be.
•
•
Join Date: Aug 2008
Posts: 1,162
Reputation:
Solved Threads: 137
it depends what you are doing at time of insert to the master table, if you are using a stored procedure you can use this
ASP.NET Syntax (Toggle Plain Text)
insert into mastertable ..... select @@identity
Custom Application & Software Development
www.houseshark.net
www.houseshark.net
![]() |
Other Threads in the ASP.NET Forum
- Previous Thread: expand listbox items
- Next Thread: Dataview Rowfilter not working
| Thread Tools | Search this Thread |
.net 2.0 activexcontrol advice ajax alltypeofvideos application asp asp.net bc30451 bottomasp.net browser button c# c#gridviewcolumn checkbox click commonfunctions compatible confirmationcodegeneration content courier css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dynamically edit expose feedback fill flash form formatdecimal forms formview grid gridview homeedition hosting iframe iis javascript jquery listbox login microsoft mono mouse mssql multistepregistration news numerical objects opera panelmasterpagebuttoncontrols parent radio ratings registration reportemail rotatepage save schoolproject search security silverlight smartcard smoobjects software sql-server sqlserver2005 suse textbox tracking typeof unauthorized validation vb.net video videos view virtualdirectory vista visual-studio visualstudio web webapplications webdevelopemnt webprogramming webservice xml xsl youareanotmemberofthedebuggerusers






