MySQL Forums :: MySQL for Visual Studio :: Problem of selection of lines by the methods select and between


Advanced Search

Problem of selection of lines by the methods select and between
Posted by: marc-antoine yonga ()
Date: January 14, 2017 10:06AM

Hello,

I program a webpage with a control GridView which uses data queries.
A query doesn't execute. I try this same query in the MySQL WorkBench and it doesn't execute too. But, if I cancel the property Between, the return of query is ok. I try too to remove the parameters by the numbers values as @Rownum BETWEEN 1 AND 10 and It doesn't showed too.

The query invisible is the following :
SqlDataSourceTestPro12.SelectCommand = "SET @Rownum=0;SELECT @Rownum:=@Rownum+1, idTP_Article, TP_Article_Designation, TP_Article_Famille, TP_Article_Unité, TP_Article_Toutes, TP_Article_Prix, REPLACE(TP_Article_Prix,'.',',') FROM tp_article WHERE TP_Article_Toutes= ?FamilleP AND @Rownum BETWEEN (CONVERT(?PageIndex, SIGNED INTEGER)*CONVERT(?PageSize, SIGNED INTEGER)) AND (((CONVERT(?PageIndex, SIGNED INTEGER)+1)*CONVERT(?PageSize, SIGNED INTEGER))-1)";


The query good removed is the following :
SqlDataSourceTestPro12.SelectCommand = "SET @Rownum=0;SELECT @Rownum:=@Rownum+1, idTP_Article, TP_Article_Designation, TP_Article_Famille, TP_Article_Unité, TP_Article_Toutes, TP_Article_Prix, REPLACE(TP_Article_Prix,'.',',') FROM tp_article WHERE TP_Article_Toutes= ?FamilleP

Thanks for your help !

Options: ReplyQuote


Subject Views Written By Posted
Problem of selection of lines by the methods select and between 155 marc-antoine yonga 01/14/2017 10:06AM
Re: Problem of selection of lines by the methods select and between 108 marc-antoine yonga 01/15/2017 05:32AM
Re: Problem of selection of lines by the methods select and between 115 JOSE RAMIREZ 01/16/2017 12:22PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.