ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2017 www.aspforums.com. All rights reserved.Youtube Upload: The remote server returned an error: (403) Forbidden<p>I am trying to upload video to youtube, directly from my application. But it is showing the following Error</p> <p>"The remote server returned an error: (403) Forbidden."</p> <p>Here is my code</p> <pre class="brush: csharp"> public static string UploadVideo(string FilePath, string Title, string Description) { YouTubeRequestSettings settings; YouTubeRequest request; string devkey = &#34;AI39si5CQ_i4fT09NNSeBJMd2nAQuQGHN8EiqXzcjdfP2xfRSqZ7dufT0LSXlhD9ruj6bzS_9Vqo0ahhtndhKFIUI5aj2FI0sQ&#34;; string username = &#34;shaiwal2shaiwal@gmail.com&#34;; string password = &#34;mygmailpassword&#34;; settings = new YouTubeRequestSettings(&#34;Video&#34;, devkey, username, password) { Timeout = -1 }; request = new YouTubeRequest(settings); Video newVideo = new Video(); newVideo.Title = Title; newVideo.Description = Description; newVideo.Private = true; newVideo.YouTubeEntry.Private = false; newVideo.YouTubeEntry.MediaSource = new MediaFileSource(FilePath, &#34;video/mp4&#34;); Video createdVideo = request.Upload(newVideo); return createdVideo.VideoId; }</pre> <p>&nbsp;</p>http://www.aspforums.net/Threads/415624/Youtube-Upload-The-remote-server-returned-an-error-403-Forbidden/http://www.aspforums.net/Threads/415624/Youtube-Upload-The-remote-server-returned-an-error-403-Forbidden/Mon, 20 Apr 2015 00:37:22 GMTWrite SQL Select statement with IF EXISTS sub query<p>studentdetail table asfollows</p> <p>studid&nbsp; mobile &nbsp; &nbsp; &nbsp; &nbsp; course&nbsp; description</p> <p>1000&nbsp;&nbsp; 9874511212&nbsp; MFA&nbsp;&nbsp;&nbsp;&nbsp; master</p> <p>&nbsp;</p> <p>smsdetail table asfollows</p> <p>Keyword studid &nbsp; mobile &nbsp; &nbsp; &nbsp; &nbsp; replymsg</p> <p>MFA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1000 &nbsp; &nbsp; 9874511212 delivered</p> <p>i want to getthe replymsg from smsdetail table. inthe above two table course and keyword matches i want to add newcolumn called status inthat status booked has to be inserted</p> <p>query asfollows</p> <pre class="brush: sql">select c.replymsg,s.studid,c.mobile from studentdetail s, smsdetail c where s.studid=c.studid and s.mobile=c.mobile</pre> <p>Output asfollows</p> <p>replymsg studid mobile</p> <p>delivered 1000&nbsp; 9874511212</p> <p>inthe above two table MFA isthere.ifit matches i want to add newcolumn called status booked.</p> <p>but i want output asfollows</p> <p>replymsg studid mobile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Status</p> <p>delivered 1000&nbsp; 9874511212&nbsp; booked</p> <p>forthat how can doinsql server.</p> <p>Regards,</p> <p>Narasiman P.</p>http://www.aspforums.net/Threads/158268/Write-SQL-Select-statement-with-IF-EXISTS-sub-query/http://www.aspforums.net/Threads/158268/Write-SQL-Select-statement-with-IF-EXISTS-sub-query/Sat, 12 Apr 2014 00:53:59 GMTWrite SQL INSERT Query with WHERE Clause<pre class="brush: csharp">protected void gvDetails_RowCommand1(object sender, GridViewCommandEventArgs e) { if (e.CommandName.Equals(&#34;AddNew&#34;)) { // TextBox txtsno = (TextBox)gvDetails.FooterRow.FindControl(&#34;txtsno&#34;); TextBox txtchitti = (TextBox)gvDetails.FooterRow.FindControl(&#34;txtchitti&#34;); con.Open(); SqlCommand cmd = new SqlCommand(&#34;insert into chitti(Chitti) values(&#34; + txtchitti.Text + &#34;)&#34;, con); int result = cmd.ExecuteNonQuery(); con.Close(); if (result == 1) { BindMasteritemDetails(); lblresult.Text = txtchitti.Text + &#34; Details inserted successfully&#34;; } else { lblresult.Text = txtchitti.Text + &#34; Details not inserted&#34;; } } }</pre> <p>i want to do only one time insertation of data , but this code inserting every time.i used&nbsp;</p> <pre class="brush: csharp"> SqlCommand cmd = new SqlCommand(&#34;insert into chitti(Chitti) values(&#34; + txtchitti.Text + &#34; where SerialNo&lt;2)&#34;, con); but it is not working..</pre>http://www.aspforums.net/Threads/557878/Write-SQL-INSERT-Query-with-WHERE-Clause/http://www.aspforums.net/Threads/557878/Write-SQL-INSERT-Query-with-WHERE-Clause/Sun, 08 Dec 2013 01:18:45 GMTWrite Query to Clear column data in SQL Server<p>hi this is my HOuse_p table</p> <table class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt;" border="1" cellspacing="0" cellpadding="0"> <tbody> <tr> <td style="width: 40.85pt; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="54"> <p class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Tahoma','sans-serif';">Id</span></p> </td> <td style="width: 3.0cm; border: solid windowtext 1.0pt; border-left: none; mso-border-left-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="113"> <p class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Tahoma','sans-serif';">Image1</span></p> </td> <td style="width: 77.95pt; border: solid windowtext 1.0pt; border-left: none; mso-border-left-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="104"> <p class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Tahoma','sans-serif';">Image2</span></p> </td> <td style="width: 49.65pt; border: solid windowtext 1.0pt; border-left: none; mso-border-left-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="66"> <p class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Tahoma','sans-serif';">behcode</span></p> </td> </tr> <tr> <td style="width: 40.85pt; border: solid windowtext 1.0pt; border-top: none; mso-border-top-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="54"> <p class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Tahoma','sans-serif';">1</span></p> </td> <td style="width: 3.0cm; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; mso-border-top-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="113"> <p class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Tahoma','sans-serif';">3.jpg</span></p> </td> <td style="width: 77.95pt; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; mso-border-top-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="104"> <p class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Tahoma','sans-serif';">&nbsp;4.jpg</span></p> </td> <td style="width: 49.65pt; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; mso-border-top-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="66"> <p class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Tahoma','sans-serif';">&nbsp;1111</span></p> </td> </tr> <tr> <td style="width: 40.85pt; border: solid windowtext 1.0pt; border-top: none; mso-border-top-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="54"> <p class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Tahoma','sans-serif';">&nbsp;</span></p> </td> <td style="width: 3.0cm; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; mso-border-top-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="113"> <p class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Tahoma','sans-serif';">&nbsp;</span></p> </td> <td style="width: 77.95pt; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; mso-border-top-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="104"> <p class="MsoNormal" style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Tahoma','sans-serif';">&nbsp;</span></p> </td> <td style="width: 49.65pt; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; mso-border-top-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="66"> <p class="MsoNormal" style="margin-bottom: 0.0001pt;">&nbsp;</p> </td> </tr> </tbody> </table> <p>&nbsp;</p> <p>i have fileupload control and delete button in my page</p> <p>&nbsp;i want when users upload their file after that they can delete it from table</p> <p>here when users upload file it save in image1.column i want when users click on delete button it delete imge from image1 column i wrote this sp but i dont know what should i write for image</p> <p>SP</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <pre class="brush: sql">create procedure dbo.deleteproduct @behcode varchar(10), @image varchar(30) as begin delete from House_p where behcode=@behcode and Image1=@image end </pre> <p>&nbsp;</p> <p>CODE</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <pre class="brush: csharp"> protected void Button1_Click(object sender, EventArgs e) { SqlCommand _cmd = new SqlCommand(&#34;deleteproduct&#34;, _cn); _cmd.CommandType = CommandType.StoredProcedure; string data = Server.UrlDecode(Request.QueryString[&#34;BehCode3&#34;]); _cn.Open(); _cmd.Parameters.AddWithValue(&#34;@Behcode&#34;, data); _cmd.Parameters.AddWithValue(&#34;@image&#34;, _cn.Close(); } </pre> <p>BEst Regards</p> <p>&nbsp;</p>http://www.aspforums.net/Threads/153840/Write-Query-to-Clear-column-data-in-SQL-Server/http://www.aspforums.net/Threads/153840/Write-Query-to-Clear-column-data-in-SQL-Server/Sat, 07 Jul 2012 23:38:01 GMTWrite conditional INNER JOIN in SQL Server Query<p>Hi</p> <p>I am having two tables and i am passing particular value. I need to put inner join based on that value. If the value is empty, no inner join else i need to perform inner join. I am not preferring dynamic query.</p> <p>Kindly let me know is there any other way to achive this.</p> <p>Thanks</p>http://www.aspforums.net/Threads/113835/Write-conditional-INNER-JOIN-in-SQL-Server-Query/http://www.aspforums.net/Threads/113835/Write-conditional-INNER-JOIN-in-SQL-Server-Query/Thu, 09 Jul 2015 03:34:55 GMTworking with multiple users<p>when working with multiple users</p> <p>is it a need that we need to create random&nbsp; temp table for working</p> <p>&nbsp;</p> <p>&nbsp;</p>http://www.aspforums.net/Threads/156421/working-with-multiple-users/http://www.aspforums.net/Threads/156421/working-with-multiple-users/Thu, 23 Feb 2012 00:36:58 GMTWhile loop to insert comma separated values in table in SQL Server<p>how to do looping in sql procedure without using cursors&nbsp;</p> <p>I need that loop for 5 times</p> <p>and it should have select query in loop</p>http://www.aspforums.net/Threads/100771/While-loop-to-insert-comma-separated-values-in-table-in-SQL-Server/http://www.aspforums.net/Threads/100771/While-loop-to-insert-comma-separated-values-in-table-in-SQL-Server/Mon, 17 Nov 2014 04:38:43 GMTWhich is better Stored Procedures or SQL Queries in ASP.Net<p>Using SQL Query as SQL Procedure is better or Using it inside the Coding Section as Simple Query ?<br /><br />Whose is more better?</p>http://www.aspforums.net/Threads/112017/Which-is-better-Stored-Procedures-or-SQL-Queries-in-ASPNet/http://www.aspforums.net/Threads/112017/Which-is-better-Stored-Procedures-or-SQL-Queries-in-ASPNet/Wed, 17 Sep 2014 00:29:20 GMTWhere to create Index on a column Primary Key or Foreign Key<p>hello sir on which key mns on Primary key or on Reference key we apply Indexing ??? Thnx in advance</p>http://www.aspforums.net/Threads/154617/Where-to-create-Index-on-a-column-Primary-Key-or-Foreign-Key/http://www.aspforums.net/Threads/154617/Where-to-create-Index-on-a-column-Primary-Key-or-Foreign-Key/Mon, 21 Jan 2013 04:26:48 GMTWhen and why do we use triggers<p>Hi,</p> <p>&nbsp;</p> <p>I need to know how will a trigger help me?</p>http://www.aspforums.net/Threads/543521/When-and-why-do-we-use-triggers/http://www.aspforums.net/Threads/543521/When-and-why-do-we-use-triggers/Wed, 28 Dec 2011 22:26:43 GMTWhat is the use if set nocount on in SQL Server<p>HI every one</p> <p>can you explain about this code in sql?</p> <p>SET NOCOUNT ON</p> <p>why we write this code in procedure?</p> <p>thanks</p>http://www.aspforums.net/Threads/180525/What-is-the-use-if-set-nocount-on-in-SQL-Server/http://www.aspforums.net/Threads/180525/What-is-the-use-if-set-nocount-on-in-SQL-Server/Wed, 16 May 2012 09:18:51 GMTWhat is the equivalent of Double DataType in SQL Server 2008<p>Hi,</p> <p>&nbsp; &nbsp; &nbsp;Iam developing leave management system.if user select HALF DAY leave means i have to detect 0.5 day from 1.</p> <p>&nbsp; &nbsp; &nbsp; &nbsp;but while coding 0.5 is double cannot convert into float.</p> <p>&nbsp; &nbsp; &nbsp; &nbsp;i attempted decimal,float and real also in sql. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p> <p>&nbsp; &nbsp; &nbsp;&nbsp;What is the equivalent of double &nbsp;in sql server 2008</p>http://www.aspforums.net/Threads/321867/What-is-the-equivalent-of-Double-DataType-in-SQL-Server-2008/http://www.aspforums.net/Threads/321867/What-is-the-equivalent-of-Double-DataType-in-SQL-Server-2008/Tue, 03 Dec 2013 22:05:50 GMTWhat is stored procedure in SQL Server<p>why it is used</p>http://www.aspforums.net/Threads/835318/What-is-stored-procedure-in-SQL-Server/http://www.aspforums.net/Threads/835318/What-is-stored-procedure-in-SQL-Server/Thu, 30 Jun 2016 01:52:26 GMTWhat is Sql Injection why it is used and how to prevent it in ASP.Net<p>please explain me the sql injection ,why they are used</p>http://www.aspforums.net/Threads/874054/What-is-Sql-Injection-why-it-is-used-and-how-to-prevent-it-in-ASPNet/http://www.aspforums.net/Threads/874054/What-is-Sql-Injection-why-it-is-used-and-how-to-prevent-it-in-ASPNet/Mon, 26 Aug 2013 00:16:13 GMTWhat is SQL Injection attack with example and measures to prevent it in ASP.Net<p>What is Sql injection? with example.</p>http://www.aspforums.net/Threads/198732/What-is-SQL-Injection-attack-with-example-and-measures-to-prevent-it-in-ASPNet/http://www.aspforums.net/Threads/198732/What-is-SQL-Injection-attack-with-example-and-measures-to-prevent-it-in-ASPNet/Mon, 21 Apr 2014 07:04:15 GMTWhat is sql injection<p>Hi,</p> <p>&nbsp;</p> <p>What is sql injection and how to secure asp.net site from sql injections? </p>http://www.aspforums.net/Threads/891904/What-is-sql-injection/http://www.aspforums.net/Threads/891904/What-is-sql-injection/Sat, 05 Oct 2013 06:09:07 GMTWhat is Non-Clustered Index in SQL Server<p>Hi</p> <p>what is non-clusted index in sql</p> <p>where it is stored?</p> <p>do not provide links</p>http://www.aspforums.net/Threads/190370/What-is-Non-Clustered-Index-in-SQL-Server/http://www.aspforums.net/Threads/190370/What-is-Non-Clustered-Index-in-SQL-Server/Wed, 21 Jan 2015 02:20:23 GMTWhat is Full text search in SQL Server<p>What is full text serch in sql server. suggest me some links to learn full text search</p>http://www.aspforums.net/Threads/683125/What-is-Full-text-search-in-SQL-Server/http://www.aspforums.net/Threads/683125/What-is-Full-text-search-in-SQL-Server/Wed, 18 Jul 2012 01:59:18 GMTWhat are Triggers and how to use it in SQL Server<p>what situation we have to use the trigers,with demo example</p> <p>&nbsp;</p>http://www.aspforums.net/Threads/116476/What-are-Triggers-and-how-to-use-it-in-SQL-Server/http://www.aspforums.net/Threads/116476/What-are-Triggers-and-how-to-use-it-in-SQL-Server/Wed, 14 Aug 2013 02:43:12 GMTWhat are SQL Server Temp Tables Where they are stored and used<p>hi all,</p> <p>i just want to get few answer about temp table in sql</p> <p>what is temp tabl in sql? where it is store?</p> <p>please give a comments.</p> <p>&nbsp;</p> <p>with regards,</p> <p>stellus.</p>http://www.aspforums.net/Threads/195566/What-are-SQL-Server-Temp-Tables-Where-they-are-stored-and-used/http://www.aspforums.net/Threads/195566/What-are-SQL-Server-Temp-Tables-Where-they-are-stored-and-used/Wed, 27 Nov 2013 05:15:29 GMT