<?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>reduce quantity from database</title><link>http://forums.asp.net/thread/3526935.aspx</link><pubDate>Mon, 23 Nov 2009 04:14:55 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3526935</guid><dc:creator>zaihanadya</dc:creator><author>zaihanadya</author><slash:comments>1</slash:comments><comments>http://forums.asp.net/thread/3526935.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3526935</wfw:commentRss><description>&lt;p&gt;Hi, im a new user…n ive a problem on how to reduce quantity automatically from database?do I need 2 make 2 tables? Is there any codes that can help me out? For example I develop an inventory system for chemical, once user submit d order button the quantity reduce in database…pliz help me…&lt;img title="Cry" alt="Cry" src="http://forums.asp.net/tiny_mce/jscripts/tiny_mce/plugins/emotions/img/smiley-cry.gif" border="0" /&gt;&lt;/p&gt;</description></item><item><title>cant update db</title><link>http://forums.asp.net/thread/3526857.aspx</link><pubDate>Mon, 23 Nov 2009 02:51:30 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3526857</guid><dc:creator>Speranza</dc:creator><author>Speranza</author><slash:comments>6</slash:comments><comments>http://forums.asp.net/thread/3526857.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3526857</wfw:commentRss><description>&lt;p&gt;i have table&amp;nbsp; with&amp;nbsp;3 columns&lt;/p&gt;
&lt;p&gt;id &amp;gt; int autoincrement PK&lt;/p&gt;
&lt;p&gt;name&lt;/p&gt;
&lt;p&gt;surname&lt;/p&gt;&lt;pre class="c-sharp" name="code"&gt;        int userid = Convert.ToInt32(Session[&amp;quot;id&amp;quot;]);
        SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings[&amp;quot;ConnectionString&amp;quot;].ConnectionString);
        string upstr = &amp;quot;update customers set name=@name,surname=@surname where id=@id&amp;quot;;
        SqlCommand cmd = new SqlCommand(upstr, con);
        cmd.CommandType = CommandType.Text;
        SqlParameter param = new SqlParameter();
        param.ParameterName = &amp;quot;@id&amp;quot;;
        param.Value = userid;
        cmd.Parameters.Add(param);
        con.Open();
        cmd.Parameters.AddWithValue(&amp;quot;@name&amp;quot;, name.Text);
        cmd.Parameters.AddWithValue(&amp;quot;@surname&amp;quot;, surname.Text);
        cmd.ExecuteNonQuery();
        cmd.Dispose();
        con.Close();&lt;/pre&gt;&lt;pre class="c-sharp" name="code"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="c-sharp" name="code"&gt;i put a break point to   param.value=userid //// it shows me user id correctly but  param.value has null value and cant update customer.&lt;/pre&gt;&lt;pre class="c-sharp" name="code"&gt;can you help me about this topic or is there anyway for update customer?&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>unable to restore backup</title><link>http://forums.asp.net/thread/3518904.aspx</link><pubDate>Wed, 18 Nov 2009 05:07:56 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3518904</guid><dc:creator>vijji</dc:creator><author>vijji</author><slash:comments>4</slash:comments><comments>http://forums.asp.net/thread/3518904.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3518904</wfw:commentRss><description>&lt;p&gt;getting error differential backup cannot be restored because no files are ready to roll forward??&lt;/p&gt;&lt;p&gt;every time i restored with recovery mode =true,im successfully restored the backup.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;this time im&amp;nbsp; facing problem,im having a single user database&amp;nbsp; &amp;quot;xyz&amp;quot;,and having daily backup.&lt;/p&gt;&lt;p&gt;im getting the same error for all the referential points.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Connection String Woes....</title><link>http://forums.asp.net/thread/3518469.aspx</link><pubDate>Tue, 17 Nov 2009 21:17:48 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3518469</guid><dc:creator>curtisdehaven</dc:creator><author>curtisdehaven</author><slash:comments>5</slash:comments><comments>http://forums.asp.net/thread/3518469.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3518469</wfw:commentRss><description>&lt;p&gt;Hi All,&lt;/p&gt;
&lt;p&gt;We&amp;#39;re deploying our ASP.Net application into a production environment.&amp;nbsp; It connects to customer-owned&amp;nbsp;SQL server database - external to us.&lt;/p&gt;
&lt;p&gt;Our application includes some proprietary code that connects to&amp;nbsp;the same database via DSN.&amp;nbsp; In setting up the&amp;nbsp;DSN, we configure&amp;nbsp;it to authenticate using &amp;quot;Windows NT&amp;nbsp;authentication using the network login&amp;nbsp;id&amp;quot; and it works fine.&lt;/p&gt;
&lt;p&gt;We&amp;#39;re now trying to come up with a connection string for the ASP.Net side of the application.&amp;nbsp; So far we&amp;#39;ve come up with...&lt;/p&gt;&lt;pre class="xhtml" name="code"&gt;&amp;lt;add name=&amp;quot;My Server&amp;quot; connectionString=&amp;quot;Data Source=MYSERVER; Initial Catalog=MyDatabase; Integrated Security=True;&amp;quot; /&amp;gt;&lt;/pre&gt;
&lt;p&gt;When we go to open the connection, it&amp;#39;s erroring out with the message &amp;quot;Login failed for user &amp;#39;MYDOMAIN/MYSERVER$&amp;quot;&lt;/p&gt;
&lt;p&gt;Obviously, by leaving the UID and PWD out of the connection string, it&amp;#39;s picking up a login name (and i spose as password) but it doesn&amp;#39;t appear to be the same one the DSN is using - the so-called &amp;quot;network login id&amp;quot;.&lt;/p&gt;
&lt;p&gt;Any thoughts?&amp;nbsp; (Oh yeah, it&amp;#39;s Server 2008 / ASP.Net Version 2.0)&lt;/p&gt;
&lt;p&gt;Many thanks - Curt&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Select distinct</title><link>http://forums.asp.net/thread/3526917.aspx</link><pubDate>Mon, 23 Nov 2009 03:59:04 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3526917</guid><dc:creator>Noorstudio</dc:creator><author>Noorstudio</author><slash:comments>5</slash:comments><comments>http://forums.asp.net/thread/3526917.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3526917</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hello.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;What&amp;#39;s wrong on my query that I am getting similar numbers??&lt;/b&gt;&lt;/p&gt;&lt;pre&gt;&lt;pre class="sql" name="code"&gt;Select distinct (ConsumptionKWH ),ConsumptionYear, ConsumptionMonth from PeriodicConsumptions WHERE AccountNo = &amp;#39;0000&amp;#39;&lt;/pre&gt;&lt;br /&gt;&lt;pre class="sql" name="code"&gt;Result is: 

10000	2009	1
10000	2009	4
10000	2010	9
20000	2009	2
20000	2009	3
30000	2010	3
30000	2011	8
40000	2009	11
40000	2011	11
50000	2010	11
60000	2010	10
60000	2011	3
70000	2011	5&lt;/pre&gt;&lt;br /&gt;Thanks&lt;/pre&gt;</description></item><item><title>Complicated SQL query</title><link>http://forums.asp.net/thread/3526380.aspx</link><pubDate>Sun, 22 Nov 2009 15:10:14 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3526380</guid><dc:creator>Cohen Asaf</dc:creator><author>Cohen Asaf</author><slash:comments>4</slash:comments><comments>http://forums.asp.net/thread/3526380.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3526380</wfw:commentRss><description>&lt;p&gt;Hi..&lt;/p&gt;&lt;p&gt;I&amp;#39;m having with a tripple join..&lt;br /&gt;&lt;/p&gt;&lt;p&gt;By solving this query problem I hope to avoid a) calling the sproc from LINQ (the sproc uses a #temp table)&lt;/p&gt;&lt;p&gt;and B) returning tabular data from dataset.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The query searches for sport results of teams one round after they beat a certain team (for example the reigning champs)&lt;/p&gt;&lt;p&gt;so the end result of the query is &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt; Exec Teams_That_Beat_the_Champ(@Season, @Champ)&lt;/p&gt;&lt;p&gt;40.000 %Won 10.000 %Drew 40.000 Lost%&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The way achieve the result now is create a #temp table with all the teams that beat the champ in a certain season and join that with the next round results for those teams:&lt;/p&gt;&lt;p&gt;Results table:&lt;/p&gt;&lt;p&gt;ID | Season | Week | Date | HteamID | AteamID | Hscore | Ascore&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;My query:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;ALTER PROCEDURE [dbo].[Beat_Champ_In_Season]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- Add the parameters for the stored procedure here&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Season int, @Champ int&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;Declare @t int&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- Insert statements for procedure here&lt;br /&gt;CREATE TABLE #Temp ( Times int, wk int, teamID int)&lt;br /&gt;&lt;br /&gt;INSERT Into #Temp (Times, wk, teamID)&lt;br /&gt;Select Count(*) As Times, [Week], (Case When HteamID=@Champ Then AteamID When ATeamID=@Champ then HTeamID END) As teamID&amp;nbsp; From Results_Table&lt;br /&gt;Where&lt;br /&gt;((HTeamID=@Champ and Ascore&amp;gt;Hscore) Or (ATeamID=@Champ and Hscore&amp;gt;Ascore)) And Season=@Season And [Week]&amp;lt;38&lt;br /&gt;Group By HTeamID, ATeamID, [Week]&lt;br /&gt;Order By [Week]&lt;br /&gt;&lt;br /&gt;Set @t=(Select COUNT(*) From #Temp)&lt;br /&gt;&lt;br /&gt;Select (100.0*Count(case when ((RTable.HTeamID=#Temp.teamID And RTable.Hscore&amp;gt;RTable.Ascore) Or (RTable.ATeamID=#Temp.teamID And RTable.Ascore&amp;gt;RTable.Hscore)) Then 1 else null end))/@t as Won,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (100.0*Count(case when ((RTable.HTeamID=#Temp.teamID And RTable.Ascore&amp;gt;RTable.Hscore) Or (RTable.ATeamID=#Temp.teamID And RTable.Ascore&amp;lt;RTable.Hscore)) Then 1 else null end))/@t as Lost,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (100.0*Count(case when (RTable.Ascore=RTable.Hscore) Then 1 else null end))/@t as Drew&lt;br /&gt;From #Temp Join Results_Table as RTable&lt;br /&gt;On RTable.Week=#Temp.wk+1 And&lt;br /&gt;(RTable.ATeamID=#Temp.teamID Or RTable.HTeamID=#Temp.teamID )&lt;br /&gt;Where RTable.Season=@Season&lt;br /&gt;Delete #Temp&lt;br /&gt;END&lt;/p&gt;&lt;p&gt;So my question is how to avoid using the #temp table &lt;/p&gt;&lt;p&gt;and what would be the best practice for running a program that searches for any re-occurances in sports results that are over say 80%..&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;Asaf&lt;br /&gt;&lt;/p&gt;</description></item><item><title>delete a record from table....if it exists</title><link>http://forums.asp.net/thread/3522773.aspx</link><pubDate>Thu, 19 Nov 2009 21:29:43 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3522773</guid><dc:creator>mjta</dc:creator><author>mjta</author><slash:comments>12</slash:comments><comments>http://forums.asp.net/thread/3522773.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3522773</wfw:commentRss><description>&lt;p&gt;I want only one record to exist in a table per user.&amp;nbsp; The user has an option to Select a value from a gridView.&amp;nbsp; The selected record is inserted into a table...but, if there is a record for that member already there, then the existing record needs to be deleted and then the insert should take place.&amp;nbsp; I don&amp;#39;t know how to check for an existing record and if found, then deleted.&amp;nbsp; The insert works fine (see code).&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Basically, I&amp;#39;ll have a userId stored in a session, and that is where the parameter will come from.&amp;nbsp; I need an If statement to delete any existing records with the userId session value....then the insert, which will be in the same table as the delete.&amp;nbsp; I need help with the &amp;quot;search and if found, delete&amp;quot; syntax.&amp;nbsp; (I don&amp;#39;t have UserId shown here as am insert parameter value...yet...FYI)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="c-sharp" name="code"&gt;Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
        If e.CommandName = &amp;quot;Select&amp;quot; Then
            Dim index As Integer = Convert.ToInt32(e.CommandArgument)
            Dim ds As New SqlDataSource()
            ds.ConnectionString = ConfigurationManager.ConnectionStrings(&amp;quot;ConnectionString&amp;quot;).ToString()
            ds.InsertCommandType = SqlDataSourceCommandType.Text
            ds.InsertCommand = &amp;quot;INSERT INTO Colors2(ColorName) VALUES(@ColorName)&amp;quot;
            ds.InsertParameters.Add(&amp;quot;ColorName&amp;quot;, GridView1.Rows(index).Cells(2).Text)
            ds.Insert()
        End If
        Response.Redirect(&amp;quot;Default.aspx&amp;quot;)
    End Sub&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Server error that I don't understand</title><link>http://forums.asp.net/thread/3526840.aspx</link><pubDate>Mon, 23 Nov 2009 02:35:25 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3526840</guid><dc:creator>alcsew</dc:creator><author>alcsew</author><slash:comments>1</slash:comments><comments>http://forums.asp.net/thread/3526840.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3526840</wfw:commentRss><description>&lt;p&gt;I have&amp;nbsp;a formview that I&amp;#39;ve done no editing to other than to have it autoinsert two values.&amp;nbsp;&amp;nbsp;I&amp;#39;ve been using this code for days&amp;nbsp;with no issue.&amp;nbsp; Now all of a sudden on this form I&amp;#39;m getting this error:&lt;/p&gt;&lt;pre class="vb.net" name="code"&gt;Incorrect syntax near &amp;#39;)&amp;#39;. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near &amp;#39;)&amp;#39;.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 


[SqlException (0x80131904): Incorrect syntax near &amp;#39;)&amp;#39;.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1950890
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846875
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +204
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
   System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +175
   System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +137
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand command, DataSourceOperation operation) +386
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) +325
   System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +92
   System.Web.UI.WebControls.FormView.HandleUpdate(String commandArg, Boolean causesValidation) +835
   System.Web.UI.WebControls.FormView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +509
   System.Web.UI.WebControls.FormView.OnBubbleEvent(Object source, EventArgs e) +95
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.FormViewRow.OnBubbleEvent(Object source, EventArgs e) +113
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +118
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

 
&lt;/pre&gt;
&lt;p&gt;The code that I&amp;#39;m using in the code behind is as&amp;nbsp;follows:&lt;/p&gt;&lt;pre class="vb.net" name="code"&gt;    Protected Sub FormView1_DataBound(ByVal sender As Object, ByVal e As EventArgs)
        Dim employeeidtextbox As TextBox = TryCast(FormView1.FindControl(&amp;quot;employeeidtextbox&amp;quot;), TextBox)
        Dim WeekEndingDateTextbox As TextBox = TryCast(FormView1.FindControl(&amp;quot;WeekEndingDateTextbox&amp;quot;), TextBox)


        If employeeidtextbox IsNot Nothing Then
            employeeidtextbox.Text = ddlEmployeName.SelectedValue


        End If

        If WeekEndingDateTextbox IsNot Nothing Then
            WeekEndingDateTextbox.Text = txtWeekEndingDate.Text

        End If
    End Sub
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;It inserts the data correctly and I don&amp;#39;t see anything&amp;nbsp;out of the ordinary in the database.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;The code for&amp;nbsp;the page itself is as follows:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="vb.net" name="code"&gt; &amp;lt;asp:SqlDataSource ID=&amp;quot;sqlTimeSheet&amp;quot; runat=&amp;quot;server&amp;quot; 
                                            ConflictDetection=&amp;quot;CompareAllValues&amp;quot; 
                                            ConnectionString=&amp;quot;&amp;lt;%$ ConnectionStrings:SECTHWConnectionString %&amp;gt;&amp;quot; 
                                            DeleteCommand=&amp;quot;DELETE FROM [tblTimeSheet] WHERE [TimeSheetID] = @original_TimeSheetID AND (([EmployeeID] = @original_EmployeeID) OR ([EmployeeID] IS NULL AND @original_EmployeeID IS NULL)) AND (([Key] = @original_Key) OR ([Key] IS NULL AND @original_Key IS NULL)) AND (([Date] = @original_Date) OR ([Date] IS NULL AND @original_Date IS NULL)) AND (([StartTime] = @original_StartTime) OR ([StartTime] IS NULL AND @original_StartTime IS NULL)) AND (([EndTime] = @original_EndTime) OR ([EndTime] IS NULL AND @original_EndTime IS NULL)) AND (([Town/District] = @original_column1) OR ([Town/District] IS NULL AND @original_column1 IS NULL)) AND (([WeekEndingDate] = @original_WeekEndingDate) OR ([WeekEndingDate] IS NULL AND @original_WeekEndingDate IS NULL)) AND (([TimeSheetComments] = @original_TimeSheetComments) OR ([TimeSheetComments] IS NULL AND @original_TimeSheetComments IS NULL)) AND (([StudentID] = @original_StudentID) OR ([StudentID] IS NULL AND @original_StudentID IS NULL))&amp;quot; 
                                            InsertCommand=&amp;quot;INSERT INTO [tblTimeSheet] ([EmployeeID], [Key], [Date], [StartTime], [EndTime], [Town/District], [WeekEndingDate], [TimeSheetComments], [StudentID]) VALUES (@EmployeeID, @Key, @Date, @StartTime, @EndTime, @column1, @WeekEndingDate, @TimeSheetComments, @StudentID)&amp;quot; 
                                            OldValuesParameterFormatString=&amp;quot;original_{0}&amp;quot; 
                                            SelectCommand=&amp;quot;SELECT [TimeSheetID], [EmployeeID], [Key], [Date], [StartTime], [EndTime], [Town/District] AS column1, [WeekEndingDate], [TimeSheetComments], [StudentID] FROM [tblTimeSheet] WHERE ([EmployeeID] = @EmployeeID)&amp;quot; 
                                            
                                            
                                            UpdateCommand=&amp;quot;UPDATE [tblTimeSheet] SET [EmployeeID] = @EmployeeID, [Key] = @Key, [Date] = @Date, [StartTime] = @StartTime, [EndTime] = @EndTime, [Town/District] = @column1, [WeekEndingDate] = @WeekEndingDate, [TimeSheetComments] = @TimeSheetComments, [StudentID] = @StudentID WHERE [TimeSheetID] = @original_TimeSheetID)&amp;quot;&amp;gt;
                                            &amp;lt;SelectParameters&amp;gt;
                                                &amp;lt;asp:ControlParameter ControlID=&amp;quot;ddlEmployeName&amp;quot; Name=&amp;quot;EmployeeID&amp;quot; 
                                                    PropertyName=&amp;quot;SelectedValue&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;
                                            &amp;lt;/SelectParameters&amp;gt;
                                            &amp;lt;DeleteParameters&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;original_TimeSheetID&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;original_EmployeeID&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;original_Key&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;original_Date&amp;quot; Type=&amp;quot;DateTime&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;original_StartTime&amp;quot; Type=&amp;quot;DateTime&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;original_EndTime&amp;quot; Type=&amp;quot;DateTime&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;original_column1&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;original_WeekEndingDate&amp;quot; Type=&amp;quot;DateTime&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;original_TimeSheetComments&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;original_StudentID&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;
                                            &amp;lt;/DeleteParameters&amp;gt;
                                            &amp;lt;UpdateParameters&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;EmployeeID&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;Key&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;Date&amp;quot; Type=&amp;quot;DateTime&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;StartTime&amp;quot; Type=&amp;quot;DateTime&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;EndTime&amp;quot; Type=&amp;quot;DateTime&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;column1&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;WeekEndingDate&amp;quot; Type=&amp;quot;DateTime&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;TimeSheetComments&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;StudentID&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;original_TimeSheetID&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;original_EmployeeID&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;original_Key&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;original_Date&amp;quot; Type=&amp;quot;DateTime&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;original_StartTime&amp;quot; Type=&amp;quot;DateTime&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;original_EndTime&amp;quot; Type=&amp;quot;DateTime&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;original_column1&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;original_WeekEndingDate&amp;quot; Type=&amp;quot;DateTime&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;original_TimeSheetComments&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;original_StudentID&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;
                                            &amp;lt;/UpdateParameters&amp;gt;
                                            &amp;lt;InsertParameters&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;EmployeeID&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;Key&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;Date&amp;quot; Type=&amp;quot;DateTime&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;StartTime&amp;quot; Type=&amp;quot;DateTime&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;EndTime&amp;quot; Type=&amp;quot;DateTime&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;column1&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;WeekEndingDate&amp;quot; Type=&amp;quot;DateTime&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;TimeSheetComments&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;
                                                &amp;lt;asp:Parameter Name=&amp;quot;StudentID&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;
                                            &amp;lt;/InsertParameters&amp;gt;
                                        &amp;lt;/asp:SqlDataSource&amp;gt;
                                        &amp;lt;asp:SqlDataSource ID=&amp;quot;sqlStudent&amp;quot; runat=&amp;quot;server&amp;quot; 
                                            ConnectionString=&amp;quot;&amp;lt;%$ ConnectionStrings:SECTHWConnectionString %&amp;gt;&amp;quot; 
                                            
                                            SelectCommand=&amp;quot;SELECT [IDStudentName], [Student Name] AS Student_Name FROM [qryStudentName] ORDER BY [Student Name]&amp;quot;&amp;gt;
                                        &amp;lt;/asp:SqlDataSource&amp;gt;
                                        &amp;lt;asp:SqlDataSource ID=&amp;quot;SqlEmployee&amp;quot; runat=&amp;quot;server&amp;quot; 
                                            ConnectionString=&amp;quot;&amp;lt;%$ ConnectionStrings:SECTHWConnectionString %&amp;gt;&amp;quot; 
                                            SelectCommand=&amp;quot;SELECT [Therapist], [EmployeeID] FROM [tblEmployee] WHERE ([EmployeeID] = @EmployeeID)&amp;quot;&amp;gt;
                                            &amp;lt;SelectParameters&amp;gt;
                                                &amp;lt;asp:ControlParameter ControlID=&amp;quot;ddlEmployeName&amp;quot; Name=&amp;quot;EmployeeID&amp;quot; 
                                                    PropertyName=&amp;quot;SelectedValue&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;
                                            &amp;lt;/SelectParameters&amp;gt;
                                        &amp;lt;/asp:SqlDataSource&amp;gt;
                                        &amp;lt;asp:SqlDataSource ID=&amp;quot;sqlKey&amp;quot; runat=&amp;quot;server&amp;quot; 
                                            ConnectionString=&amp;quot;&amp;lt;%$ ConnectionStrings:SECTHWConnectionString %&amp;gt;&amp;quot; 
                                            
                                            SelectCommand=&amp;quot;SELECT KeyCode, KeyDescription, IDTimeSheetKey FROM tblTimeSheetKeyDefinitions ORDER BY KeyDescription&amp;quot;&amp;gt;
                                        &amp;lt;/asp:SqlDataSource&amp;gt;
                                        &amp;lt;asp:SqlDataSource ID=&amp;quot;sqlTownData&amp;quot; runat=&amp;quot;server&amp;quot; 
                                            ConnectionString=&amp;quot;&amp;lt;%$ ConnectionStrings:SECTHWConnectionString %&amp;gt;&amp;quot; 
                                            
                                            SelectCommand=&amp;quot;SELECT [Town/Agent] AS column1, TownAgentID FROM [tblTown-Agents] ORDER BY column1&amp;quot;&amp;gt;
                                        &amp;lt;/asp:SqlDataSource&amp;gt;
                                    &amp;lt;/td&amp;gt;
                                &amp;lt;/tr&amp;gt;
                                &amp;lt;tr&amp;gt;
                                    &amp;lt;td valign=&amp;quot;top&amp;quot;&amp;gt;
                                        &amp;lt;asp:FormView ID=&amp;quot;FormView1&amp;quot; runat=&amp;quot;server&amp;quot; AllowPaging=&amp;quot;True&amp;quot; 
                                            DataKeyNames=&amp;quot;TimeSheetID&amp;quot; DataSourceID=&amp;quot;sqlTimeSheet&amp;quot; OnDataBound=&amp;quot;FormView1_DataBound&amp;quot;&amp;gt;
                                            &amp;lt;EditItemTemplate&amp;gt;
                                                TimeSheetID:
                                                &amp;lt;asp:Label ID=&amp;quot;TimeSheetIDLabel1&amp;quot; runat=&amp;quot;server&amp;quot; 
                                                    Text=&amp;#39;&amp;lt;%# Eval(&amp;quot;TimeSheetID&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                EmployeeID:
                                                &amp;lt;asp:TextBox ID=&amp;quot;EmployeeIDTextBox&amp;quot; runat=&amp;quot;server&amp;quot; 
                                                    Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;EmployeeID&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                Key:
                                                &amp;lt;asp:TextBox ID=&amp;quot;KeyTextBox&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;Key&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                Date:
                                                &amp;lt;asp:TextBox ID=&amp;quot;DateTextBox&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;Date&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                StartTime:
                                                &amp;lt;asp:TextBox ID=&amp;quot;StartTimeTextBox&amp;quot; runat=&amp;quot;server&amp;quot; 
                                                    Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;StartTime&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                EndTime:
                                                &amp;lt;asp:TextBox ID=&amp;quot;EndTimeTextBox&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;EndTime&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                column1:
                                                &amp;lt;asp:TextBox ID=&amp;quot;column1TextBox&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;column1&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                WeekEndingDate:
                                                &amp;lt;asp:TextBox ID=&amp;quot;WeekEndingDateTextBox&amp;quot; runat=&amp;quot;server&amp;quot; 
                                                    Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;WeekEndingDate&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                TimeSheetComments:
                                                &amp;lt;asp:TextBox ID=&amp;quot;TimeSheetCommentsTextBox&amp;quot; runat=&amp;quot;server&amp;quot; 
                                                    Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;TimeSheetComments&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                StudentID:
                                                &amp;lt;asp:TextBox ID=&amp;quot;StudentIDTextBox&amp;quot; runat=&amp;quot;server&amp;quot; 
                                                    Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;StudentID&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                &amp;lt;asp:LinkButton ID=&amp;quot;UpdateButton&amp;quot; runat=&amp;quot;server&amp;quot; CausesValidation=&amp;quot;True&amp;quot; 
                                                    CommandName=&amp;quot;Update&amp;quot; Text=&amp;quot;Update&amp;quot; /&amp;gt;
                                                &amp;nbsp;&amp;lt;asp:LinkButton ID=&amp;quot;UpdateCancelButton&amp;quot; runat=&amp;quot;server&amp;quot; 
                                                    CausesValidation=&amp;quot;False&amp;quot; CommandName=&amp;quot;Cancel&amp;quot; Text=&amp;quot;Cancel&amp;quot; /&amp;gt;
                                            &amp;lt;/EditItemTemplate&amp;gt;
                                            &amp;lt;InsertItemTemplate&amp;gt;
                                                EmployeeID:
                                                &amp;lt;asp:TextBox ID=&amp;quot;EmployeeIDTextBox&amp;quot; runat=&amp;quot;server&amp;quot; 
                                                    Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;EmployeeID&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                Key:
                                                &amp;lt;asp:TextBox ID=&amp;quot;KeyTextBox&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;Key&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                Date:
                                                &amp;lt;asp:TextBox ID=&amp;quot;DateTextBox&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;Date&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                StartTime:
                                                &amp;lt;asp:TextBox ID=&amp;quot;StartTimeTextBox&amp;quot; runat=&amp;quot;server&amp;quot; 
                                                    Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;StartTime&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                EndTime:
                                                &amp;lt;asp:TextBox ID=&amp;quot;EndTimeTextBox&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;EndTime&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                column1:
                                                &amp;lt;asp:TextBox ID=&amp;quot;column1TextBox&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;column1&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                WeekEndingDate:
                                                &amp;lt;asp:TextBox ID=&amp;quot;WeekEndingDateTextBox&amp;quot; runat=&amp;quot;server&amp;quot; 
                                                    Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;WeekEndingDate&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                TimeSheetComments:
                                                &amp;lt;asp:TextBox ID=&amp;quot;TimeSheetCommentsTextBox&amp;quot; runat=&amp;quot;server&amp;quot; 
                                                    Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;TimeSheetComments&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                StudentID:
                                                &amp;lt;asp:TextBox ID=&amp;quot;StudentIDTextBox&amp;quot; runat=&amp;quot;server&amp;quot; 
                                                    Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;StudentID&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                &amp;lt;asp:LinkButton ID=&amp;quot;InsertButton&amp;quot; runat=&amp;quot;server&amp;quot; CausesValidation=&amp;quot;True&amp;quot; 
                                                    CommandName=&amp;quot;Insert&amp;quot; Text=&amp;quot;Insert&amp;quot; /&amp;gt;
                                                &amp;nbsp;&amp;lt;asp:LinkButton ID=&amp;quot;InsertCancelButton&amp;quot; runat=&amp;quot;server&amp;quot; 
                                                    CausesValidation=&amp;quot;False&amp;quot; CommandName=&amp;quot;Cancel&amp;quot; Text=&amp;quot;Cancel&amp;quot; /&amp;gt;
                                            &amp;lt;/InsertItemTemplate&amp;gt;
                                            &amp;lt;ItemTemplate&amp;gt;
                                                TimeSheetID:
                                                &amp;lt;asp:Label ID=&amp;quot;TimeSheetIDLabel&amp;quot; runat=&amp;quot;server&amp;quot; 
                                                    Text=&amp;#39;&amp;lt;%# Eval(&amp;quot;TimeSheetID&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                EmployeeID:
                                                &amp;lt;asp:Label ID=&amp;quot;EmployeeIDLabel&amp;quot; runat=&amp;quot;server&amp;quot; 
                                                    Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;EmployeeID&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                Key:
                                                &amp;lt;asp:Label ID=&amp;quot;KeyLabel&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;Key&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                Date:
                                                &amp;lt;asp:Label ID=&amp;quot;DateLabel&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;Date&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                StartTime:
                                                &amp;lt;asp:Label ID=&amp;quot;StartTimeLabel&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;StartTime&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                EndTime:
                                                &amp;lt;asp:Label ID=&amp;quot;EndTimeLabel&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;EndTime&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                column1:
                                                &amp;lt;asp:Label ID=&amp;quot;column1Label&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;column1&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                WeekEndingDate:
                                                &amp;lt;asp:Label ID=&amp;quot;WeekEndingDateLabel&amp;quot; runat=&amp;quot;server&amp;quot; 
                                                    Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;WeekEndingDate&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                TimeSheetComments:
                                                &amp;lt;asp:Label ID=&amp;quot;TimeSheetCommentsLabel&amp;quot; runat=&amp;quot;server&amp;quot; 
                                                    Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;TimeSheetComments&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                StudentID:
                                                &amp;lt;asp:Label ID=&amp;quot;StudentIDLabel&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;#39;&amp;lt;%# Bind(&amp;quot;StudentID&amp;quot;) %&amp;gt;&amp;#39; /&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                &amp;lt;asp:LinkButton ID=&amp;quot;EditButton&amp;quot; runat=&amp;quot;server&amp;quot; CausesValidation=&amp;quot;False&amp;quot; 
                                                    CommandName=&amp;quot;Edit&amp;quot; Text=&amp;quot;Edit&amp;quot; /&amp;gt;
                                                &amp;nbsp;&amp;lt;asp:LinkButton ID=&amp;quot;DeleteButton&amp;quot; runat=&amp;quot;server&amp;quot; CausesValidation=&amp;quot;False&amp;quot; 
                                                    CommandName=&amp;quot;Delete&amp;quot; Text=&amp;quot;Delete&amp;quot; /&amp;gt;
                                                &amp;nbsp;&amp;lt;asp:LinkButton ID=&amp;quot;NewButton&amp;quot; runat=&amp;quot;server&amp;quot; CausesValidation=&amp;quot;False&amp;quot; 
                                                    CommandName=&amp;quot;New&amp;quot; Text=&amp;quot;New&amp;quot; /&amp;gt;
                                            &amp;lt;/ItemTemplate&amp;gt;
                                            &amp;lt;EmptyDataTemplate&amp;gt;
                                                &amp;lt;br /&amp;gt;
                                                &amp;lt;asp:LinkButton ID=&amp;quot;NewButton&amp;quot; runat=&amp;quot;server&amp;quot; CausesValidation=&amp;quot;False&amp;quot; 
                                                    CommandName=&amp;quot;New&amp;quot; Text=&amp;quot;New&amp;quot; /&amp;gt;
                                            &amp;lt;/EmptyDataTemplate&amp;gt;
                                        &amp;lt;/asp:FormView&amp;gt;
&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I apologize in advance for posting so much code but I don&amp;#39;t know where to begin to find the problem and I need to get this taken care of ASAP as I&amp;#39;m under a deadline.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Leesha&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>SQL Update help needed</title><link>http://forums.asp.net/thread/3526110.aspx</link><pubDate>Sun, 22 Nov 2009 06:33:19 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3526110</guid><dc:creator>tiwas</dc:creator><author>tiwas</author><slash:comments>1</slash:comments><comments>http://forums.asp.net/thread/3526110.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3526110</wfw:commentRss><description>&lt;p&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
I&amp;#39;m playing around with some *View tables and I seem to have figured
out Edit and Delete. However, I cannot seem to find out how to do New.&lt;br /&gt;
&lt;br /&gt;
Here are my questions:&lt;br /&gt;
1. Using the Query Builder, my query ends up as &amp;quot;INSERT INTO
RegHour(userID, projectID, regStartTime, regEndTime, regBillable,
regDescription) VALUES (,,,,,)&amp;quot;. This doesn&amp;#39;t quite seem right (and it
obviously isn&amp;#39;t since it&amp;#39;s not working ;)&lt;br /&gt;
2. UserID is a field from another table. Is it possible to make this a
dropdown menu? The UserID field is linked to the UserID in the users
table, and I would like to show show the usernames but link to the ID&lt;br /&gt;
3. Anyone know any good tutorials on the different *View tables?&lt;br /&gt;
&lt;br /&gt;
Cheers!&lt;/p&gt;</description></item><item><title>Authenticating against SQL database</title><link>http://forums.asp.net/thread/3526114.aspx</link><pubDate>Sun, 22 Nov 2009 06:38:43 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3526114</guid><dc:creator>tiwas</dc:creator><author>tiwas</author><slash:comments>4</slash:comments><comments>http://forums.asp.net/thread/3526114.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3526114</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I&amp;#39;ve followed the authentication tutorial on this site and I believe I&amp;#39;ve grasped the concepts pretty well. However, as far as I could see the tutorial didn&amp;#39;t conclude with using an SQL db in the background...&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Anyone got any pointers for how to proceed?&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Cheers!&lt;br /&gt;&lt;/p&gt;</description></item><item><title>alternative Data delete from database</title><link>http://forums.asp.net/thread/3526711.aspx</link><pubDate>Sun, 22 Nov 2009 22:59:55 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3526711</guid><dc:creator>wangxg26</dc:creator><author>wangxg26</author><slash:comments>5</slash:comments><comments>http://forums.asp.net/thread/3526711.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3526711</wfw:commentRss><description>&lt;p&gt;I want to delete a&amp;nbsp;certain data from&amp;nbsp;the database daily,&amp;nbsp;e.g. expired product. I can get all of them and use admin manually to do&amp;nbsp;it through web page. It seems not good way I like. &lt;/p&gt;
&lt;p&gt;Is there any automatical way to do this type database update?&lt;/p&gt;
&lt;p&gt;Thanks&amp;nbsp;&lt;/p&gt;</description></item><item><title>Dynamic LINQ query error: Overload resolution failed ....</title><link>http://forums.asp.net/thread/3526748.aspx</link><pubDate>Mon, 23 Nov 2009 00:24:11 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3526748</guid><dc:creator>haggis999</dc:creator><author>haggis999</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3526748.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3526748</wfw:commentRss><description>&lt;p&gt;I am a total newbie to creating dynamic LINQ queries as described in Scott Guthrie&amp;#39;s blog article here:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately, I can&amp;#39;t get dynamic LINQ queries to work. I have downloaded the VB Dynamic Query Library, copied Dynamic.vb into my&amp;nbsp;ASP.NET site and referenced&amp;nbsp;S&lt;font size="2"&gt;ystem.Linq.Dynamic in my VB.NET code behind page. However, my page fails with the compilation error message &amp;quot;Overload resolution failed because no accessible &amp;#39;Where&amp;#39; can be called with these arguments&amp;quot; on the following line of code:&lt;/font&gt;&lt;/p&gt;&lt;pre class="vb.net" name="code"&gt;Recipients = myDBC.Entrants.Where(&amp;quot;FirstName = &amp;#39;David&amp;#39;&amp;quot;)&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;I am probably making a very basic error somewhere. Any help would be much appreciated.&lt;/p&gt;
&lt;p&gt;David&amp;nbsp;&lt;/p&gt;</description></item><item><title>Populating an array from a data dase, first index is skipped</title><link>http://forums.asp.net/thread/3526574.aspx</link><pubDate>Sun, 22 Nov 2009 19:49:12 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3526574</guid><dc:creator>istakoza</dc:creator><author>istakoza</author><slash:comments>4</slash:comments><comments>http://forums.asp.net/thread/3526574.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3526574</wfw:commentRss><description>&lt;p&gt;I am populating an array from a data base like this:&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;Dim &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;i &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; Int16 = 0&lt;/font&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;Dim &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;myCommand &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;New&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; SqlCommand(SQL, myConnection)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;
&lt;p&gt;myConnection.Open()&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;Dim&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; myReader &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; SqlDataReader = myCommand.ExecuteReader&lt;/font&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;If&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; myReader.Read &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Then&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;While&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt; myReader.Read()&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;
&lt;p&gt;LatArray(i) = myReader.Item(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;ForcedLat&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;
&lt;p&gt;i = i + 1&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;End&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;While&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font size="2"&gt;
&lt;p&gt;myReader.Close()&lt;/p&gt;
&lt;p&gt;myConnection.Close()&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;&lt;/font&gt;
&lt;p&gt;&lt;/font&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;&lt;/font&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;&lt;/font&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However, the first result from that data base is always skipped and my array starts being populated&amp;nbsp;with the second result.&lt;/p&gt;
&lt;p&gt;To clarify, I always end up with MyArray(0)= &amp;quot;second value from database&amp;quot;&lt;/p&gt;
&lt;p&gt;MyArray(1)=&amp;quot;Third value from database&amp;quot; and so on.&amp;nbsp;&lt;/p&gt;</description></item><item><title>how to add a primary key field to an existing data table?</title><link>http://forums.asp.net/thread/3525971.aspx</link><pubDate>Sat, 21 Nov 2009 22:55:59 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3525971</guid><dc:creator>ghassan_aljabiri</dc:creator><author>ghassan_aljabiri</author><slash:comments>2</slash:comments><comments>http://forums.asp.net/thread/3525971.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3525971</wfw:commentRss><description>&lt;p&gt;hello &lt;/p&gt;
&lt;p&gt;my table is filled with 10000 records &lt;/p&gt;
&lt;p&gt;it has no PK &lt;/p&gt;
&lt;p&gt;now&amp;nbsp;i need to add a new field of bigint &lt;/p&gt;
&lt;p&gt;it should be an identity field (seed=1,increment=1)&lt;/p&gt;
&lt;p&gt;it should be a PK too , where sould i start&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;</description></item><item><title>Assign a value from a Database to a Textbox or Label</title><link>http://forums.asp.net/thread/3525852.aspx</link><pubDate>Sat, 21 Nov 2009 20:08:40 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3525852</guid><dc:creator>iLes</dc:creator><author>iLes</author><slash:comments>8</slash:comments><comments>http://forums.asp.net/thread/3525852.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3525852</wfw:commentRss><description>&lt;p&gt;I am using Visual Web Developer Express with VB.net&lt;/p&gt;&lt;p&gt;And I Have a Drop Down Menu and what I want to do is when that menu changes, have the code behind (VB) to run a select statement and from &amp;nbsp;SQLServerDataSource2 and take the results which will be a column called Product (will only be one row, one word result) and display it in a label or textbox. Cannot be a gridview or anything.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Can someone please please help me to figure this out, I have been googling for days with nothing that works for me. I just need the simplest solution.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I know how to add data to a table in VB, but for some reason I cant figure out how to run a select statment and use the output.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Thanks a bunch, I look forward to a response.&lt;/p&gt;</description></item><item><title>one of SQL Statement in Stored procedure</title><link>http://forums.asp.net/thread/3525930.aspx</link><pubDate>Sat, 21 Nov 2009 21:37:25 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3525930</guid><dc:creator>persistentDeveloper</dc:creator><author>persistentDeveloper</author><slash:comments>3</slash:comments><comments>http://forums.asp.net/thread/3525930.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3525930</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I like to know how can i return all the records that matches&amp;nbsp;the records whereever &amp;#39;Norway&amp;#39; and the comma delimited string matched records.&lt;/p&gt;&lt;pre class="sql" name="code"&gt;//dbo.StringSplit is database funciton that splits the @special string into comma delimited , one.
(@special is NULL or special Like(&amp;#39;%&amp;#39; + &amp;#39;Norway&amp;#39; + &amp;#39;%&amp;#39;) AND special IN((Select Items from dbo.StringSplit(@special,&amp;#39;,&amp;#39;))))&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;Above is the part of&amp;nbsp;stored procedure. I&amp;nbsp;like to know the right&amp;nbsp;SQL statement that can be used to retrieve all records that matches&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;special&amp;nbsp;&lt;/strong&gt;Like (&amp;#39;&amp;#39; + &amp;#39;Norway&amp;#39; + &amp;#39;&amp;#39;&lt;strong&gt;)&amp;nbsp;&lt;/strong&gt;AND &lt;strong&gt;&amp;nbsp;&lt;/strong&gt;special &lt;strong&gt;IN&lt;/strong&gt;((SELECT Items FROM dbo.&lt;strong&gt;StringSplit(@&lt;/strong&gt;special,&amp;#39;,&amp;#39;)))&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;</description></item><item><title>Problem copying cell from Excel into SQL Server Management Studio Express</title><link>http://forums.asp.net/thread/3522595.aspx</link><pubDate>Thu, 19 Nov 2009 19:31:12 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3522595</guid><dc:creator>tottenham_rule_18</dc:creator><author>tottenham_rule_18</author><slash:comments>4</slash:comments><comments>http://forums.asp.net/thread/3522595.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3522595</wfw:commentRss><description>&lt;p&gt;I am trying to copy something like this into a table, but every time it just completely screws up:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;table cellspacing="0" cellpadding="0"&gt;

 

&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Grafix) Wooden Play People
  (Age 18m+)&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  Features:&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  - 9 twist and stack activity blocks.&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  - Wooden pieces.&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  - Approximate height: 13cm.&lt;br /&gt;
  &lt;br /&gt;
  &amp;nbsp;&lt;br /&gt;
  &lt;br /&gt;
  - Suitable for age 18m+.&lt;/td&gt;
&lt;/tr&gt;

&lt;/table&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Can anyone help me sort it out?&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Thanks&lt;/p&gt;&lt;p&gt;Mike&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description></item><item><title>How to find the top 5 entries In table for 5 unique fields?.</title><link>http://forums.asp.net/thread/3522819.aspx</link><pubDate>Thu, 19 Nov 2009 21:57:09 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3522819</guid><dc:creator>danmc13</dc:creator><author>danmc13</author><slash:comments>15</slash:comments><comments>http://forums.asp.net/thread/3522819.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3522819</wfw:commentRss><description>&lt;p&gt;Hi hope somebody can point me In the right direction or can understand what Am trying to do, I&amp;#39;ll try to explain as best I can,&amp;nbsp;I&amp;#39;ve been at it for hours.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m trying&amp;nbsp;to select the latest&amp;nbsp;top entry In my Article table&amp;nbsp;from each Section using it&amp;#39;s SectionId&amp;nbsp;where article publised = 1.&lt;/p&gt;
&lt;p&gt;I know I could achieve this by using 5 different queries but have been trying to solve it with this one I basically need the latest entry for each section.&lt;/p&gt;
&lt;p&gt;Any guidance would be great, Thanks.&lt;/p&gt;&lt;pre name="code"&gt;SELECT DISTINCT 
                      TOP (5) SectionId AS ArticleId, UserId, SectionId, ArticleTitle, ArticleHeadline, ArticleByline, ArticleSummary, ArticleStory, DatePublished, 
                      ArticlePriority, SubmissionDate, ArticlePublished
FROM         Articles
WHERE     (ArticlePublished = 1)
ORDER BY DatePublished DESC&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Concatenating Columns with the IDs</title><link>http://forums.asp.net/thread/3521079.aspx</link><pubDate>Thu, 19 Nov 2009 06:09:09 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3521079</guid><dc:creator>sonaasp</dc:creator><author>sonaasp</author><slash:comments>6</slash:comments><comments>http://forums.asp.net/thread/3521079.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3521079</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Dear All&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am getting result as below:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Colors&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Red&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Blue&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Black&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Red&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Black&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; White&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Orange&lt;/p&gt;
&lt;p&gt;But I need the result as below:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Colors&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Red,Blue,Black&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Red,Black&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; White,Orange&lt;/p&gt;
&lt;p&gt;Can Anybody help me how to form the query for above result............................&lt;/p&gt;</description></item><item><title>There is no position at row -1</title><link>http://forums.asp.net/thread/3521290.aspx</link><pubDate>Thu, 19 Nov 2009 08:02:33 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3521290</guid><dc:creator>Shog Saif</dc:creator><author>Shog Saif</author><slash:comments>13</slash:comments><comments>http://forums.asp.net/thread/3521290.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3521290</wfw:commentRss><description>&lt;p&gt;Hello&lt;/p&gt;&lt;p&gt;i have text box and 2 labels and when the user enters any data &amp;quot;number, or charachter&amp;quot; the associated name should be display in the labels. &lt;/p&gt;&lt;p&gt;this is my code&lt;/p&gt;&lt;div&gt;&amp;#39;Create Session item named StudentsID&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Session(&amp;quot;StudentsID&amp;quot;) = 
IDTextBox.Text&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;Create table adapter to connect the application to the 
database&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim StudentAdapter As New 
TBTDataSetTableAdapters.Student_TableAdapter&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;Create data table to 
store the values in the database&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim StudentTable As 
TBTDataSet._Student_DataTable = StudentAdapter.GetData()&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Dim rowNumber As Integer = Convert.ToInt32(Session(&amp;quot;StudentsID&amp;quot;)) - 1&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;Display student name of the enterd ID&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NameLabel2.Text = 
StudentTable(rowNumber).Student_Name&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; Display student email of the 
enterd ID&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EmailLabel2.Text = 
StudentTable(rowNumber).Email_Address&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;this is the Error &lt;/div&gt;&lt;div&gt;There is no position at row -1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Help&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;thanks in Advanced &lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description></item><item><title>Problem in Parsing AMAZON XML Using Openxml </title><link>http://forums.asp.net/thread/3526126.aspx</link><pubDate>Sun, 22 Nov 2009 07:09:22 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3526126</guid><dc:creator>Ehsan_aiub</dc:creator><author>Ehsan_aiub</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3526126.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3526126</wfw:commentRss><description>&lt;p&gt;Hello Everybody,&lt;br /&gt; I am trying to parse the below xml document using openxml in sqlserver 2005. Everything is fine except the features tag. I am trying to get all the features nodes of itemattributes node in one xml column(for ex. &amp;lt;features&amp;gt;&amp;lt;feature&amp;gt;1&amp;lt;/feature&amp;gt;&amp;lt;feature&amp;gt;2&amp;lt;/feature&amp;gt;&amp;lt;/features&amp;gt;) but I am getting only one at a time. Let me show you the tsql script that I am executing-&amp;nbsp; &lt;br /&gt; &lt;br /&gt; &lt;span style="text-decoration:underline;"&gt;&lt;b&gt;Source&lt;/b&gt; &lt;/span&gt; &lt;br /&gt; &lt;br /&gt; DECLARE @xmlData XML;&lt;br /&gt; &lt;br /&gt; set @xmlData = &amp;#39;&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt; &amp;lt;ItemSearchResponse xmlns=&amp;quot;http://webservices.amazon.com/AWSECommerceService/2005-10-05&amp;quot;&amp;gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Items&amp;gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Item&amp;gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;lt;ASIN&amp;gt;B001MIZNEM&amp;lt;/ASIN&amp;gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;lt;DetailPageURL&amp;gt;http://www.amazon.com/Cake-Mania-Game-Download-Pc/dp/B001MIZNEM%3FSubscriptionId%3D0Z6TA0JMJ7NM6RQP0WR2%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB001MIZNEM&amp;lt;/DetailPageURL&amp;gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;lt;SalesRank&amp;gt;69&amp;lt;/SalesRank&amp;gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ItemAttributes&amp;gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Binding&amp;gt;Software Download&amp;lt;/Binding&amp;gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Brand&amp;gt;Sandlot Games&amp;lt;/Brand&amp;gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Edition&amp;gt;Standard&amp;lt;/Edition&amp;gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Feature&amp;gt;48 Levels Of Baking Fun.&amp;lt;/Feature&amp;gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Feature&amp;gt;Customize And Upgrade Your Kitchen&amp;lt;/Feature&amp;gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Feature&amp;gt;4 Unique Bakeries To Run&amp;lt;/Feature&amp;gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Feature&amp;gt;Hilarious Seasonal Characters.&amp;lt;/Feature&amp;gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Format&amp;gt;Download&amp;lt;/Format&amp;gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Label&amp;gt;Sandlot Games&amp;lt;/Label&amp;gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ItemAttributes&amp;gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Item&amp;gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Items&amp;gt;&lt;br /&gt; &amp;lt;/ItemSearchResponse&amp;gt;&amp;#39;;&lt;br /&gt; &lt;br /&gt; Declare @iDoc int&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; EXEC sp_xml_preparedocument @iDoc Output,@xmlData,&amp;#39;&amp;lt;ItemSearchResponse xmlns:ns=&amp;quot;http://webservices.amazon.com/AWSECommerceService/2005-10-05&amp;quot;/&amp;gt;&amp;#39;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT ox.*,getdate(),getdate()&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; From OPENXML(@iDoc,&amp;#39;/ns:ItemSearchResponse/ns:Items/ns:Item&amp;#39;,3)&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; With&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [ASIN] nvarchar(50) &amp;#39;ns:ASIN&amp;#39;,&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DetailPageURL nvarchar(2000) &amp;#39;ns:DetailPageURL&amp;#39;,&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Features xml &amp;#39;ns:ItemAttributes/ns:Feature&amp;#39;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; ) ox&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; Exec sp_xml_removedocument @iDoc&lt;br /&gt; &lt;br /&gt; &lt;span style="text-decoration:underline;"&gt;&lt;b&gt;Expected Output:&lt;/b&gt; &lt;/span&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;/p&gt; 
&lt;table class="mceItemTable"&gt;

&lt;tr&gt;
&lt;td&gt;ASIN&lt;/td&gt;
&lt;td&gt;DetailedPageURL&lt;/td&gt;
&lt;td&gt;Features&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;B001MIZNEM&lt;/td&gt;
&lt;td style="color:red;"&gt;http://www.amazon.com/&lt;br /&gt; Cake-Mania-Game-Download-&lt;br /&gt; Pc/dp/B001MIZNEM%3F&lt;br /&gt; SubscriptionId%3D0Z6TA0JMJ7&lt;br /&gt; NM6RQP0WR2%26tag%3Dws%26&lt;br /&gt; linkCode%3Dxm2%26camp%3D2025&lt;br /&gt; %26creative%3D165953%&lt;br /&gt; 26creativeASIN%3DB001MIZNEM&lt;/td&gt;
&lt;td&gt;
&lt;pre&gt;&amp;lt;Features&amp;gt; 
&amp;lt;Feature&amp;gt;48 Levels Of Baking Fun.&amp;lt;/Feature&amp;gt;
&amp;lt;Feature&amp;gt;Customize And Upgrade Your Kitchen&amp;lt;/Feature&amp;gt;
&amp;lt;Feature&amp;gt;4 Unique Bakeries To Run&amp;lt;/Feature&amp;gt;
&amp;lt;Feature&amp;gt;Hilarious Seasonal Characters.&amp;lt;/Feature&amp;gt;
&amp;lt;/Features&amp;gt;&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;

&lt;/table&gt;&lt;p&gt;
&lt;br /&gt; Can anybody please help me to achieve the above result?  Thanks,&lt;/p&gt;</description></item><item><title>trigger help??</title><link>http://forums.asp.net/thread/3525099.aspx</link><pubDate>Sat, 21 Nov 2009 04:34:01 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3525099</guid><dc:creator>.net_junkie</dc:creator><author>.net_junkie</author><slash:comments>10</slash:comments><comments>http://forums.asp.net/thread/3525099.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3525099</wfw:commentRss><description>&lt;p&gt;hi all i am new to triggers i have created a trigger to insert data below is my code**&lt;/p&gt;&lt;pre name="code" class="sql:showcolumns"&gt;create trigger insert2 
afetr insert on cust

as
declare @name,@add1
insert into cust(@name,@add1) values(name,add1)
select name,add1 from inserted &lt;/pre&gt;&lt;p&gt;&lt;br /&gt; but im getting errors i dnt know the written trigger is correct or not so can anyone help me with this??i have another doubt when i write a trigger as it is a kind of stored proc i think there is no need to create another stored proc to insert data is that right??&lt;/p&gt;&lt;p&gt;how can i know when a user insert data into my table using triggers??&lt;br /&gt;&lt;/p&gt;</description></item><item><title>code not work in sql 2000</title><link>http://forums.asp.net/thread/3525515.aspx</link><pubDate>Sat, 21 Nov 2009 12:21:04 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3525515</guid><dc:creator>padh</dc:creator><author>padh</author><slash:comments>5</slash:comments><comments>http://forums.asp.net/thread/3525515.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3525515</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;Here my code which is worked&amp;nbsp; with sql 2005 version but doesnt worked with sql 2000.&lt;/p&gt;&lt;p&gt;my code is:&lt;/p&gt;&lt;p&gt;-------------------------------------------------------------------------------------------------------------------&lt;/p&gt;&lt;p&gt;objCmd = New SqlCommand(&amp;quot;spsurvey_master&amp;quot;, objCon)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objCmd.Parameters.AddWithValue(&amp;quot;@int_userid&amp;quot;, 0)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objCmd.Parameters.AddWithValue(&amp;quot;@var_username&amp;quot;, &amp;quot;Hai&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objCmd.Parameters.AddWithValue(&amp;quot;@bit_measure&amp;quot;, btType)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim intReturnValue = New SqlParameter(&amp;quot;@intUid&amp;quot;, Data.SqlDbType.Int)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objCmd.CommandType = Data.CommandType.StoredProcedure&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; intReturnValue.Direction = Data.ParameterDirection.ReturnValue&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objCmd.Parameters.Add(intReturnValue)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objCmd.ExecuteNonQuery()&lt;/p&gt;&lt;p&gt;-------------------------------------------------------------------------------------------------------------------&lt;/p&gt;&lt;p&gt;and stored procedure code is&lt;/p&gt;&lt;p&gt;-------------------------------------------------------------------------------------------------------------------&lt;/p&gt;&lt;p&gt;&lt;br /&gt;CREATE PROCEDURE [dbo].[spsurvey_master](@int_userid int,@var_username nvarchar(50),@bit_measure bit)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;AS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;BEGIN&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;DECLARE @intUid AS numeric(10);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;SET NOCOUNT ON;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;SET @intUid = 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;IF @intUid &amp;gt; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; BEGIN&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;UPDATE survey_master SET user_id=@int_userid,user_name=@var_username,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;measurement=@bit_measure WHERE uid = @intUid&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; END&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;ELSE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; BEGIN&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;INSERT INTO survey_master (survey_datetime,user_id,user_name,measurement) VALUES&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;(getdate(),@int_userid,@var_username,@bit_measure)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;SET @intUid = @@IDENTITY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; END&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;RETURN @intUid&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;END&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;-------------------------------------------------------------------------------------------------------------------&lt;/p&gt;&lt;p&gt;i know above procedure code is wrong with 2000 version. But even output parameter also not worked here.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Please help &lt;/p&gt;&lt;p&gt;regards&lt;/p&gt;&lt;p&gt;Padh&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>trigger problem??</title><link>http://forums.asp.net/thread/3526036.aspx</link><pubDate>Sun, 22 Nov 2009 03:24:27 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3526036</guid><dc:creator>.net_junkie</dc:creator><author>.net_junkie</author><slash:comments>6</slash:comments><comments>http://forums.asp.net/thread/3526036.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3526036</wfw:commentRss><description>&lt;p&gt;hi all i have created a stored proc to insert values and i have created a trigger to insert the same values into my db but whenever i insert the values and click the button same values are entering into my db two times i dnt knw why?? i dint write any code for trigger but how the same values are entering twice??any help??&lt;br /&gt;&lt;/p&gt;</description></item><item><title>how to call triggers??</title><link>http://forums.asp.net/thread/3525185.aspx</link><pubDate>Sat, 21 Nov 2009 06:12:34 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3525185</guid><dc:creator>.net_junkie</dc:creator><author>.net_junkie</author><slash:comments>3</slash:comments><comments>http://forums.asp.net/thread/3525185.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=3525185</wfw:commentRss><description>&lt;p&gt;hi all i have written trigger now i want to call it from my code is it possible to call it like stored proc?? what i want to do is i want to know whenever a new user enters into my db i must get an alert that he is entered how to do it??plzz help me thanks.&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>