DavidT_macktool
Well-known member
I am still having this problem: See http://www.vbdotnetforums.com/showthread.php?t=1007
Research has pointed me in the direction of having to return the value of @@identity from the dataset and set a variable to its value. Then, I guess, i have to reload the dataset by query of the variable to get the added record and correctly display the added key/autoincrement field in the textbox.
The whole @@identity thing is confusing. @@identity is in my insert statement. All other textbox fields are correctly updated with the values of the added record except the autoincrement field represented by @@identity.
I am trying to add a new record by clicking a button on another form (form1), calling the dataform wizard generated display form (form2), and adding the code to insert the record in the form_load procedure of (form2). The record is added to the dataset, I can view it on a different grid view form. Same textbox display problem occurs when I use the add button on form2 that was generated by the wizard. Record is added, textbox does not display the added value.
SUPER FRUSTRATING!!!
Someone please help me get the value of the autoincrement field after adding a record!
thanks for looking
Research has pointed me in the direction of having to return the value of @@identity from the dataset and set a variable to its value. Then, I guess, i have to reload the dataset by query of the variable to get the added record and correctly display the added key/autoincrement field in the textbox.
The whole @@identity thing is confusing. @@identity is in my insert statement. All other textbox fields are correctly updated with the values of the added record except the autoincrement field represented by @@identity.
I am trying to add a new record by clicking a button on another form (form1), calling the dataform wizard generated display form (form2), and adding the code to insert the record in the form_load procedure of (form2). The record is added to the dataset, I can view it on a different grid view form. Same textbox display problem occurs when I use the add button on form2 that was generated by the wizard. Record is added, textbox does not display the added value.
SUPER FRUSTRATING!!!
Someone please help me get the value of the autoincrement field after adding a record!
thanks for looking