REPLACE FUNCTION not working with VS2005

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Scarpellin
Posts: 2
Joined: Mon 02 Mar 2009 17:36

REPLACE FUNCTION not working with VS2005

Post by Scarpellin » Mon 02 Mar 2009 17:50

Using VS2005 query designer - connector v. 4.0, in a DataSource object I try this query:

SELECT * FROM table_name
WHERE (REPLACE(FieldName, 'aa', 'b') = 'bb' )

The designer transforms it in

SELECT * FROM table_name
WHERE (`REPLACE`(FieldName, 'aa', 'b') = 'bb' )

and when I execute, I get an error '...FUNCTION database_name.REPLACE does not exist'


Any suggestion?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Tue 03 Mar 2009 08:49

Please refer to http://www.devart.com/forums/viewtopic.php?p=31415 . REPLACE, LIMIT and other keywords that are not supported in MS SQL Server cannot be used for other databases through Query Builder. This is a limitation of Query Builder.

Scarpellin
Posts: 2
Joined: Mon 02 Mar 2009 17:36

Post by Scarpellin » Tue 03 Mar 2009 09:30

OK, I suspected the problem was the query-designer.
I solved building mysql connection and command directly in code.
I found also that making 'non standard' queries in the designer is risky: sometimes the VS crashes and loses the dataset XML descriptor file.

Post Reply