Update statement
-
cmd.CommandText = "update ceasrjuice set fatname = " & x & " and reglz set fatrname = " & x & " where fatname LIKE '%" & TextBox1.Text & "%' " how can i update two tables with on word according to this condition plz it's urgent
It's always urgent, isn't it ? Your strings are not in quotes, only the LIKE statement is. I assume x is a string, and I assume you know that this code makes your database completely insecure, and easily destroyed by a malicious end user. Look up SQL injection attacks on this site.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
cmd.CommandText = "update ceasrjuice set fatname = " & x & " and reglz set fatrname = " & x & " where fatname LIKE '%" & TextBox1.Text & "%' " how can i update two tables with on word according to this condition plz it's urgent
Please explain your problem in Detail, you mean to say you want to Update two different table from one command, I think it is not possbile from one line, you have to do it one by one, Or If I mis-understood your problem, then please explain clearly. Bhaskar Shetty
-
Please explain your problem in Detail, you mean to say you want to Update two different table from one command, I think it is not possbile from one line, you have to do it one by one, Or If I mis-understood your problem, then please explain clearly. Bhaskar Shetty