SonicBoomAu
Well-known member
Hi All,
This is a snippet of my code. What I am trying to do is use strTableQuery to assign the table name I want to search through. It could be SystemName, Type, etc. Basically any of the table names.
When I run this the value of strTableQuery isnt being set into the strSqlQuery.
I.E. During Runtime
strSqlQuery = "SELECT * from PermanentAssets WHERE strTableQuery = *"
where I want it to equal.
strSqlQuery = "SELECT * from PermanentAssets WHERE WallPortNo = *"
Is it possible to do this? If so what am I doing wrong?
Thank you in advance for your help.
[VB]
Dim strSqlQuery As String
Dim strTableQuery As String
strTableQuery = "WallPortNo"
strSqlQuery = "SELECT * from PermanentAssets WHERE strTableQuery = *"
Retrieve all the Permanent Asset Information
daDataAdapter = New OleDb.OleDbDataAdapter(strSqlQuery, cnAdoNetConnection)
[/VB]
This is a snippet of my code. What I am trying to do is use strTableQuery to assign the table name I want to search through. It could be SystemName, Type, etc. Basically any of the table names.
When I run this the value of strTableQuery isnt being set into the strSqlQuery.
I.E. During Runtime
strSqlQuery = "SELECT * from PermanentAssets WHERE strTableQuery = *"
where I want it to equal.
strSqlQuery = "SELECT * from PermanentAssets WHERE WallPortNo = *"
Is it possible to do this? If so what am I doing wrong?
Thank you in advance for your help.
[VB]
Dim strSqlQuery As String
Dim strTableQuery As String
strTableQuery = "WallPortNo"
strSqlQuery = "SELECT * from PermanentAssets WHERE strTableQuery = *"
Retrieve all the Permanent Asset Information
daDataAdapter = New OleDb.OleDbDataAdapter(strSqlQuery, cnAdoNetConnection)
[/VB]