B
Bobby Edward
I am using VS 2008 SP1, ASP.NET 3.5, VB.NET, MySQL (latest version).
I created a new dataset using VS. In the ds I have a users table. I let it
create the "Fill, GetData" functions in the usersTableAdapter.
When I call the INSERT command, how do I get it to return the ID (the PK) of
the newly created record?
I pulled up the properties of the TableAdapter, then went to the
InsertCommand/Parameters. I added a parameter (for the pk I want) and made
it have a "ReturnValue" Direction.
What am I missing?
In my code I did a "Goto Definition" of the Insert command I called. It
brought me to the VS "auto generated code". I noted that the auto-generated
code does an ExecuteNonQuery. I suspect this needs to change but I don't
know how to! I don't want to edit the code directly since it's
"auto-generated".
Please help!!!
I created a new dataset using VS. In the ds I have a users table. I let it
create the "Fill, GetData" functions in the usersTableAdapter.
When I call the INSERT command, how do I get it to return the ID (the PK) of
the newly created record?
I pulled up the properties of the TableAdapter, then went to the
InsertCommand/Parameters. I added a parameter (for the pk I want) and made
it have a "ReturnValue" Direction.
What am I missing?
In my code I did a "Goto Definition" of the Insert command I called. It
brought me to the VS "auto generated code". I noted that the auto-generated
code does an ExecuteNonQuery. I suspect this needs to change but I don't
know how to! I don't want to edit the code directly since it's
"auto-generated".
Please help!!!