FCapo
asked on
Dataset Query
Hi,
I'm using vb.net and the dataset designer to get data from a mysql database.
In the dataset designer, I've added a query to the datatable, I'd like to know if I can programmatically change the sql query that's stored in this datatable at run time.
Currently to get the data I'm using :
I've tried using a wildcard in the SQL statement to use a parameter at run time but it gives me the following error : No mapping exists from dbType Object to a known OdbcType.
I'd like to know If I can change that sql string at runtime to something else.
Thank you
I'm using vb.net and the dataset designer to get data from a mysql database.
In the dataset designer, I've added a query to the datatable, I'd like to know if I can programmatically change the sql query that's stored in this datatable at run time.
Currently to get the data I'm using :
Try
cliTableAdapter2 = New simplyDataSetTableAdapters.DataTable2TableAdapter
cliDataSet2 = New simplyDataSet
cliTableAdapter2.Fill(cliDataSet2.DataTable2)
Return cliDataSet2
Catch ex As Exception
Throw ex
End Try
I've tried using a wildcard in the SQL statement to use a parameter at run time but it gives me the following error : No mapping exists from dbType Object to a known OdbcType.
I'd like to know If I can change that sql string at runtime to something else.
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The question wasn't well formulated and I found a solution through different means!
How would you like to change the SQL string?