<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>SQL Server, SQL Server Express, and SqlDataSource Control</title><link>http://forums.asp.net/54.aspx</link><description>All about SQL Server, SQL Server Express, MSDE, and the SqlDataSource control.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: help me with an SELECT statement, please</title><link>http://forums.asp.net/thread/3276701.aspx</link><pubDate>Mon, 06 Jul 2009 12:04:02 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3276701</guid><dc:creator>zuperboy90</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3276701.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3276701</wfw:commentRss><description>&lt;p&gt;don&amp;#39;t worry, you didn&amp;#39;t hurt my feelings&lt;img src="http://forums.asp.net/emoticons/emotion-4.gif" alt="Stick out tongue" /&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: help me with an SELECT statement, please</title><link>http://forums.asp.net/thread/3276634.aspx</link><pubDate>Mon, 06 Jul 2009 11:19:56 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3276634</guid><dc:creator>soumendu</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3276634.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3276634</wfw:commentRss><description>&lt;p&gt;NOO ya &lt;img src="http://forums.asp.net/tiny_mce/jscripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif" alt="Surprised" title="Surprised" border="0" /&gt;&lt;/p&gt;&lt;p&gt;its for simply i had write that .. create problems? &amp;nbsp;i mean that in later part if u want to use that u procedure(that u definitely want to use) ,then that time also,that can fall u in trouble(if that hurt u ,then sorry from me),&amp;amp; also u &amp;#39;s approach is correct,only thing i just want to tell that if u can change the way u make u querry then the result may be different ,so good luck to u .ok bye&lt;/p&gt;</description></item><item><title>Re: help me with an SELECT statement, please</title><link>http://forums.asp.net/thread/3275604.aspx</link><pubDate>Sun, 05 Jul 2009 19:53:18 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3275604</guid><dc:creator>zuperboy90</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3275604.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3275604</wfw:commentRss><description>&lt;p&gt;hello&lt;/p&gt;&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;soumendu:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;first make sure u r really in need of that as many of time it may creat prob&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;what do you mean that can create problems? stored procedure or the way i am executing sql command?&lt;/p&gt;&lt;p&gt;thank you&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: help me with an SELECT statement, please</title><link>http://forums.asp.net/thread/3274699.aspx</link><pubDate>Sat, 04 Jul 2009 13:30:21 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274699</guid><dc:creator>soumendu</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274699.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3274699</wfw:commentRss><description>&lt;p&gt;hi,good day&lt;img src="http://forums.asp.net/tiny_mce/jscripts/tiny_mce/plugins/emotions/img/smiley-cool.gif" alt="Cool" title="Cool" border="0" /&gt;&lt;/p&gt;&lt;p&gt;i think u querry is correct otherwise the error will be different so u r free of u querry worry ,so now as u r using stored procedure , first make sure u r really in need of that as many of time it may creat prob. on extracting multiple join etc ,so if u can solve u purpose bu using table &amp;amp; simple querry then u can follow that way,&amp;amp; u can make similar querry in other places (as that time u r free of u error) i hope u can solve u problem,if that stills then u can look for the online help.&lt;/p&gt;&lt;p&gt;ok good luck bye&lt;img src="http://forums.asp.net/tiny_mce/jscripts/tiny_mce/plugins/emotions/img/smiley-smile.gif" alt="Smile" title="Smile" border="0" /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: help me with an SELECT statement, please</title><link>http://forums.asp.net/thread/3274683.aspx</link><pubDate>Sat, 04 Jul 2009 13:13:40 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274683</guid><dc:creator>zuperboy90</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274683.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3274683</wfw:commentRss><description>&lt;p&gt;Great!!!! thanks!!!&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: help me with an SELECT statement, please</title><link>http://forums.asp.net/thread/3274582.aspx</link><pubDate>Sat, 04 Jul 2009 11:20:04 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274582</guid><dc:creator>mohd786hussain</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274582.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3274582</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;in the stored procedure where you are writing exec @sqlcommand relpace it with exec (@sqlcommand) and try.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>help me with an SELECT statement, please</title><link>http://forums.asp.net/thread/3274499.aspx</link><pubDate>Sat, 04 Jul 2009 09:12:18 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274499</guid><dc:creator>zuperboy90</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274499.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3274499</wfw:commentRss><description>&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt;I have a stored procedure witch should return products from a specific table:&lt;pre class="sql" name="code"&gt;ALTER PROCEDURE [dbo].[Browse_selectproduse] 
               -- Add the parameters for the stored procedure here 
               @SqlCommand NVARCHAR(3000), 
               @PageNumber      TINYINT, 
               @ProductsPerPage TINYINT, 
               @HowManyResults  SMALLINT  OUTPUT 
AS 
  BEGIN 
    -- SET NOCOUNT ON added to prevent extra result sets from   
    -- interfering with SELECT statements. 
    SET nocount  ON; 
     
    -- Insert statements for procedure here 
    DECLARE  @Products  TABLE( 
                              rownumber   SMALLINT    IDENTITY ( 1 , 1 )    NOT NULL, 
                              productid   INT, 
                              username    NVARCHAR(255), 
                              name        VARCHAR(70), 
                              DESCRIPTION VARCHAR(2000), 
                              image1      VARCHAR(200) 
                              ) 
     
    INSERT INTO @Products 
    EXEC @SqlCommand 
     
    SELECT @HowManyResults = Count(* ) 
    FROM   @Products 
     
    SELECT [ProductID], 
           [UserName], 
           [Name], 
           [Description], 
           [Image1] 
    FROM   @Products 
    WHERE  rownumber BETWEEN (@PageNumber - 1) * @ProductsPerPage + 1 AND @PageNumber * @ProductsPerPage 
  END 


&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Normally, i should replace EXEC @SqlCommand with a SELECT statement that inserts into @Products table the required products.&lt;/p&gt;
&lt;p&gt;In code-behind, i am constructing SqlCommand string witch is exactly that SELECT statement, but when i am trying to execute database command i get the folowing error:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;i&gt;&lt;i&gt;The name &amp;#39;SELECT p.[ProductID], p.[UserName], p.[Name], p.[Description],p.[Image1] FROM [Product] AS p INNER JOIN [ProductSscat] AS s ON p.[ProductID] = s.[ProductID] WHERE s.[SubsubcategoryID] = 502 ORDER BY p.[DateAdded] DESC&amp;#39; is not a valid identifier.&lt;/i&gt;&lt;/i&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="FONT-FAMILY:Arial, Helvetica, Geneva, SunSans-Regular, sans-serif;"&gt;&lt;pre&gt;Line 785:        comm.Connection.Open();&lt;br /&gt;Line 786:        // Execute the command and save the results in a DataTable&lt;br /&gt;&lt;span style="FONT-FAMILY:;COLOR:#ff0000;"&gt;Line 787:        DbDataReader reader = comm.ExecuteReader();&lt;br /&gt;&lt;/span&gt;Line 788:        table = new DataTable();&lt;br /&gt;Line 789:        table.Load(reader);&lt;/pre&gt;&lt;/span&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;is there any way to resolve my problem?&lt;img src="http://forums.asp.net/emoticons/emotion-6.gif" alt="Sad" /&gt;&lt;/p&gt;
&lt;p&gt;Thank you&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>