View with Parameters - Generated SELECT statement - Specifice method is not supported.

View with Parameters - Generated SELECT statement - Specifice method is not supported.

Postby evidor » Tue 11 Apr 2006 18:22

I have a view in MySQL and in the generated select statement I add a WHERE with a paramter

col1 - DateTime

SELECT col1, col2 FROM tb1 WHERE col1 > :VALUE

and get the error:

Generated SELECT statement: Specified method is not supported.

It seems to work on a table just not a view. Any suggestions?

Thanks
evidor
 
Posts: 3
Joined: Tue 11 Apr 2006 18:18

Postby Alexey » Wed 12 Apr 2006 07:09

We don't experience any problems.
Take a look on the code snippet below:
Code: Select all
      mySqlConnection.Open();
      mySqlCommand.CommandText = "SELECT col1, col2 FROM tb1 WHERE col1>:VALUE";
      mySqlCommand.Parameters.Add("VALUE", MySqlType.DateTime);
      mySqlCommand.Parameters["VALUE"].Value = DateTime.Now;
      MySqlDataReader reader = mySqlCommand.ExecuteReader();
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby evidor » Wed 12 Apr 2006 13:53

I'm using VS2005 and using the MySQLDirect .NET Data Provider to create a DataSet. and in it attempt to create a Table Adapter. Once I go to "Enter a SQL Statement" in the wizard and get to the Wizard Results I get the

Generated SELECT statement.
Specified method is not supported.

This only happens when I'm trying to use parameters on a view. Normal tables seem to work without any problem.
evidor
 
Posts: 3
Joined: Tue 11 Apr 2006 18:18

Postby Alexey » Wed 12 Apr 2006 14:25

What version of the MySQLDirect do you use?
Download the latest version from our site and try use it.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby evidor » Wed 12 Apr 2006 15:30

I'm using the 3.50 beta
evidor
 
Posts: 3
Joined: Tue 11 Apr 2006 18:18

Postby Alexey » Thu 13 Apr 2006 06:33

Send us small test project if possible to reproduce the problem; it is
desirable to use 'test' schema objects, otherwise include definition of
your own database objects. Do not use third party components.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby JStal » Sat 15 Apr 2006 15:48

I am having a similar problem using declarative databinding in VWD, but I've traced it to the tags. The moment I introduce an , , etc. I get the "Specified Method Not Supported" error. Even if I don't put a scalar variable into my "SELECT..." command, the simple presence of the (or other type of parameter) declared in the

Return to dotConnect for MySQL