Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42441

selecting table name from a combobox: Not working

$
0
0
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)

Viewing all articles
Browse latest Browse all 42441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>