|
-
Jan 3rd, 2020, 09:49 PM
#5
Thread Starter
Fanatic Member
Re: Update a single row in database
My dB table ("Tasks") has a nested relationship to itself. The table has a PrimaryKey ("RecID") and a ForeignKey ("ParentID").
For example, I add 3 records to the Tasks DataTable (father, son, and grandson Tasks). Then I call the daTasks.Update method and pass it the Tasks DataTable.
Code:
'...only updates the "father" task in a "father-son-grandson" set of tasks (i.e., iTasks = 1)
iTasks = daTasks.Update(dsMain.Tables("Tasks"))
Is my only option to use an "INSERT INTO..." SQL command to add each of these records, one-by-one, starting with the "father", then the "son", and finally the "grandson" Task?
Last edited by Mark@SF; Jan 3rd, 2020 at 09:56 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|