M
Mauricio Rosales
Hi,
I have created an app where when a user logins, it retrieves from the users
info the database he should connecto to, which I assign to a session
variable.
Then I have several pages where the select command is set on the pago_load
event for the datagrids present on those pages, using the database name
stored in the session variable in the new sql.
Ex:
ActiveUsersList.SelectCommand = "SELECT [Tipo], [Nombre], [Alias], [Active],
[key_id] FROM [" & CStr(Session("tablenames")) & "_Personnel]"
This works fine, however, there is a page where I need to update and delete
records using the datagrid, and even though I set the Update and Delete
commands just like I did for the Select command, they don't seem to work.
ActiveUsersList.DeleteCommand = "DELETE FROM [" &
CStr(Session("tablenames")) & "_Personnel] WHERE [key_id] =
@original_key_id"
When I click the delete link on the datagrid, nothing happens, just
refreshes the page.
What am I doing wrong or how would be the best way of doing it?
Thank You
Mauricio Rosales
I have created an app where when a user logins, it retrieves from the users
info the database he should connecto to, which I assign to a session
variable.
Then I have several pages where the select command is set on the pago_load
event for the datagrids present on those pages, using the database name
stored in the session variable in the new sql.
Ex:
ActiveUsersList.SelectCommand = "SELECT [Tipo], [Nombre], [Alias], [Active],
[key_id] FROM [" & CStr(Session("tablenames")) & "_Personnel]"
This works fine, however, there is a page where I need to update and delete
records using the datagrid, and even though I set the Update and Delete
commands just like I did for the Select command, they don't seem to work.
ActiveUsersList.DeleteCommand = "DELETE FROM [" &
CStr(Session("tablenames")) & "_Personnel] WHERE [key_id] =
@original_key_id"
When I click the delete link on the datagrid, nothing happens, just
refreshes the page.
What am I doing wrong or how would be the best way of doing it?
Thank You
Mauricio Rosales