REPLACE FUNCTION not working with VS2005

REPLACE FUNCTION not working with VS2005

Postby 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?
Scarpellin
 
Posts: 2
Joined: Mon 02 Mar 2009 17:36

Postby 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.
Shalex
Devart Team
 
Posts: 7290
Joined: Thu 14 Aug 2008 12:44

Postby 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.
Scarpellin
 
Posts: 2
Joined: Mon 02 Mar 2009 17:36


Return to dotConnect for MySQL