Dataset Query


I'm using 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 :

            cliTableAdapter2 = New simplyDataSetTableAdapters.DataTable2TableAdapter
            cliDataSet2 = New simplyDataSet
            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
Who is Participating?
FCapoConnect With a Mentor Author Commented:
Thank you but I found an alternative to doing this, sorry for wasted time
Bob LearnedCommented:
I don't understand what you are looking for, and what that exception means...

How would you like to change the SQL string?
FCapoAuthor Commented:
The question wasn't well formulated and I found a solution through different means!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.