carpe2 Posted January 20, 2004 Posted January 20, 2004 Hi. I am trying to make a function that could open tables in a database getting its noun, and i have no idea how to do it.... BDatos= new SqlConnection(S"data source=(local);" S"integrated security=false;User ID=SA;password=xxx;" S"initial catalog=Laboratorios"); The idea is to do something similar to this... SqlDataAdapter* DataAdapter(String *Prueba) { SqlDataAdapter *sqlDataAdapter; sqlDataAdapter= new SqlDataAdapter( "SELECT *FROM Prueba", BDatos); } The idea is to take Prueba as a variable, but i don´t know how to do that. I would appreciate any help. Thanks. Quote Adolfo.
hog Posted January 23, 2004 Posted January 23, 2004 Don't really follow your code C++ too long in the past:( But if I understand you right in VB I would do.... Dim strTableName As String = "AnyOldTable" Dim strSQL As String = "SELECT * FROM" & strTableName & ";" Quote My website
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.