Sorry Ana I don't think you can leave out the table name in the from clause. If you really want to search 30 different tables (that all have the same columns...?) then you'd likely have to iterate over each one of them separately and join the information yourself
You could do a for each (Table Name) loop to get the data from each table. The adapter adds all the new information into the datatable so that you have just 1 datatable in the end with results from all 30 tables.
Dim query As String
Dim dt as new Datatable
For each tablename in (tablenamelist)
query = "select * from " & tablename & " where (Item_Description LIKE '%" & TextBox11.Text & "%' or Vendor LIKE '%" & TextBox11.Text & "%' OR S_N LIKE '%" & TextBox11.Text & "%' or Tag_num LIKE '%" & TextBox11.Text & "%')"
command = New MySqlCommand(query, mysqlconn)
sda.SelectCommand = command
sda.Fill(dt)
next
where tablenamelist is a list of all your datatable names. This will get the job done, but there are many improvements to be made here.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…