hammerman Posted February 24, 2004 Posted February 24, 2004 What is the proper way of getting back the autoincrement value for a column in a datatable (part of a strongtyped dataset) that I have just added a row to? I'm currently doing it by this method - after the row is created.. Dim row As adataset.mytablerow = CType(mytable.Rows(mytable.Count - 1), adataset.mytablerow) I really don't like this approach - is there any better way? Quote
betrl8thanever Posted February 25, 2004 Posted February 25, 2004 I'm not sure what code you are using to add your row...but this may be a little simpler than what you have...kind of all ends up being the same. Either type it all out in 1 code string, or break it up a little... Dim i as Integer With ds.Tables("YourTableName") i = .rows(.rows.count - 1).Item("yourcolumnName") End With Quote "In the immortal words of Socrates, who said "' I drank what?!'"
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.