Visual studio Visual basic And condition -


i trying update row in database using information form 2 dropdownlists locate correct row , using other dropdownlists replace information in row. "and" condition not work. have tried: &, &&, and, andalso. none of worked.

the problem:

an exception of type 'system.data.sqlclient.sqlexception' occurred in system.web.dll not handled in user code. additional information: incorrect syntax near keyword 'where'.

my code is:

dseditdeletemodulerelationships1.updatecommand =     "update tbl_modules_modules set modules_id_fk2 = "         & ddlprimary.selectedvalue         & " modules_id_fk2 = "         & ddlprimarymodule.selectedvalue         & "where modules_id_fk3 = "         & ddlsecondarymodule.selectedvalue  dseditdeletemodulerelationships1.updatecommand =     "update tbl_modules_modules set modules_id_fk3 = "         & ddlsecondary.selectedvalue         & " modules_id_fk2 = "         & ddlprimarymodule.selectedvalue         & " modules_id_fk3 = "         & ddlsecondarymodule.selectedvalue  dseditdeletemodulerelationships1.updatecommand =     "update tbl_modules_modules set prerequisite_type_id_fk = "         & ddlrequisitetype.selectedvalue         & " modules_id_fk2 = "         & ddlprimarymodule.selectedvalue         & " modules_id_fk3 = "         & ddlsecondarymodule.selectedvalue  dseditdeletemodulerelationships1.update() 


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -