Link to home
Start Free TrialLog in
Avatar of FCapo
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 :
        Try

            cliTableAdapter2 = New simplyDataSetTableAdapters.DataTable2TableAdapter
            cliDataSet2 = New simplyDataSet
            cliTableAdapter2.Fill(cliDataSet2.DataTable2)
            Return cliDataSet2

        Catch ex As Exception
            Throw ex
        End Try

Open in new window


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
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

I don't understand what you are looking for, and what that exception means...

How would you like to change the SQL string?
ASKER CERTIFIED SOLUTION
Avatar of FCapo
FCapo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of FCapo
FCapo

ASKER

The question wasn't well formulated and I found a solution through different means!