When using the SQL Select string : "Select * FROM AAAAA" or "Select * FROM " & aaaaa & " , where aaaaa is a string reference to table name AAAAA, everything works fine. But when I select the string reference, aaaaa, from a combobox like: aaaaa = mycmbBox.SelectedItem.Tostring(), and use it as: "Select * FROM " & aaaaa & " " or "Select * FROM ' " & aaaaa & " ' " , I get an error that 'there is a syntax error near aaaaa. Can someone please tell me what is wrong here? I use vb.net in WPF. Thanks a lot for helping. (The databse conn string works fine)
↧