User1110448527 posted
Greetings
I am attempting to change the data source on the fly. I have checked out some code samples on the forum and have created the following piece of code.
The SQL that results will run in the database but here it always gives an error.
Currently it is giving the following error message
Invalid column name 'SO'.
SO is not a column it is a value that the field [CLASS] can contain. The SQL string in ls_querystring resolves to
SELECT [HORSE_ID], [NAME], [CLASS] FROM [SMALLSTUD] WHERE [CLASS] = "SO" ORDER BY [HORSE_ID]
Dim
ls_querystring As
String
ls_querystring =
"SELECT [HORSE_ID], [NAME], [CLASS] FROM
[SMALLSTUD] WHERE [CLASS] = " & Chr(34) &
"SO"&
Chr(34) & " ORDER BY [HORSE_ID]"
IberianSQLDataSource.SelectCommand = ls_querystring