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.write formula for column in database<p><strong>hi&nbsp;</strong></p> <p><strong>this is my table</strong></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: 95.75pt; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top" width="128"> <p class="MsoNormal" style="margin-bottom: 0.0001pt;">Id</p> </td> <td style="width: 95.75pt; 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="128"> <p class="MsoNormal" style="margin-bottom: 0.0001pt;">Price1</p> </td> <td style="width: 95.75pt; 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="128"> <p class="MsoNormal" style="margin-bottom: 0.0001pt;">meter</p> </td> <td style="width: 95.8pt; 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="128"> <p class="MsoNormal" style="margin-bottom: 0.0001pt;">price</p> </td> </tr> <tr> <td style="width: 95.75pt; 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="128"> <p class="MsoNormal" style="margin-bottom: 0.0001pt;">1</p> </td> <td style="width: 95.75pt; 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="128"> <p class="MsoNormal" style="margin-bottom: 0.0001pt;">1,000,000</p> </td> <td style="width: 95.75pt; 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="128"> <p class="MsoNormal" style="margin-bottom: 0.0001pt;">250</p> </td> <td style="width: 95.8pt; 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="128"> <p class="MsoNormal" style="margin-bottom: 0.0001pt;">&nbsp;</p> </td> </tr> </tbody> </table> <p>&nbsp;</p> <p><strong>i want when users insert data in &nbsp;Price1 and ,meter &nbsp;columns </strong></p> <p><strong>&nbsp;in database automatically in Price column insert this formula</strong></p> <p>&nbsp;</p> <p><strong>Price1*Meter</strong></p> <p><strong>how i can write storeprocedure for this?</strong></p> <p><strong>best regards</strong></p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p>http://www.aspforums.net/Threads/531926/write-formula-for-column-in-database/http://www.aspforums.net/Threads/531926/write-formula-for-column-in-database/Thu, 06 Sep 2012 05:51:03 GMTShow only records that have NO text in database<p>HI</p> <p><strong>this is BEHCODE Table in database</strong></p> <table border="1" cellspacing="0" cellpadding="0"> <tbody> <tr> <td valign="top" width="49"> <p>Id</p> </td> <td valign="top" width="72"> <p>Behcode</p> </td> <td valign="top" width="78"> <p>Reserve</p> </td> <td valign="top" width="114"> <p>date</p> </td> </tr> <tr> <td valign="top" width="49"> <p>1</p> </td> <td valign="top" width="72"> <p>1000</p> </td> <td valign="top" width="78"> <p>NO</p> </td> <td valign="top" width="114"> <p>&nbsp;</p> </td> </tr> <tr> <td valign="top" width="49"> <p>2</p> </td> <td valign="top" width="72"> <p>1001</p> </td> <td valign="top" width="78"> <p>YES</p> </td> <td valign="top" width="114"> <p>2012-12-12</p> </td> </tr> <tr> <td valign="top" width="49"> <p>3</p> </td> <td valign="top" width="72"> <p>1002</p> </td> <td valign="top" width="78"> <p>YES</p> </td> <td valign="top" width="114"> <p>2012-12-13</p> </td> </tr> <tr> <td valign="top" width="49"> <p>4</p> </td> <td valign="top" width="72"> <p>1003</p> </td> <td valign="top" width="78"> <p>YES</p> </td> <td valign="top" width="114"> <p>2012-12-15</p> </td> </tr> <tr> <td valign="top" width="49"> <p>5</p> </td> <td valign="top" width="72"> <p>1004</p> </td> <td valign="top" width="78"> <p>NO</p> </td> <td valign="top" width="114"> <p>&nbsp;</p> </td> </tr> <tr> <td valign="top" width="49"> <p>6</p> </td> <td valign="top" width="72"> <p>1005</p> </td> <td valign="top" width="78"> <p>YES</p> </td> <td valign="top" width="114"> <p>2012-12-17</p> </td> </tr> <tr> <td valign="top" width="49"> <p>7</p> </td> <td valign="top" width="72"> <p>1006</p> </td> <td valign="top" width="78"> <p>NO</p> </td> <td valign="top" width="114"> <p>&nbsp;</p> </td> </tr> <tr> <td valign="top" width="49"> <p>8</p> </td> <td valign="top" width="72"> <p>1007</p> </td> <td valign="top" width="78"> <p>NO</p> </td> <td valign="top" width="114"> <p>&nbsp;</p> </td> </tr> <tr> <td valign="top" width="49"> <p>9</p> </td> <td valign="top" width="72"> <p>1008</p> </td> <td valign="top" width="78"> <p>NO</p> </td> <td valign="top" width="114"> <p>&nbsp;</p> </td> </tr> </tbody> </table> <p>&nbsp;</p> <p>in <strong>ADMIN.aspx</strong> page I define datalist and I want in dataLIst show data of<strong> BEHCODE column</strong></p> <p>I want in dataLIst&nbsp; show behcode that in reserve column's<strong> data is ='NO'</strong> but I want it show behcode wuth <strong>reserve='NO</strong>' that are <strong>before MAXDATE in DATE column</strong></p> <p><span style="text-decoration: underline;"><strong>E.g</strong></span></p> <p>in this table I want show these behcode</p> <p><strong>1000 -1004</strong></p> <p>these behcode have <strong>reserve='NO'</strong> and these are behcode that are before 1005 that have MAX datein this table</p> <p>here I don't want show these behcode 1006-1007-1008</p> <p>becuse these behcode are after 1005&nbsp; that have MAxDate</p> <p>&nbsp;</p> <p>BEST REGARDS</p> <p>&nbsp;</p> <p>&nbsp;</p>http://www.aspforums.net/Threads/140400/Show-only-records-that-have-NO-text-in-database/http://www.aspforums.net/Threads/140400/Show-only-records-that-have-NO-text-in-database/Mon, 25 Feb 2013 05:16:37 GMTShow image only if Count of Records from Database is greater than one in ASP.Net<p>Hi</p> <p>I have 2 table in database</p> <p><strong>HOuse_info</strong></p> <table border="1" cellspacing="0" cellpadding="0"> <tbody> <tr> <td valign="top" width="31"> <p>Id</p> </td> <td valign="top" width="54"> <p>Name</p> </td> <td valign="top" width="42"> <p>City</p> </td> <td valign="top" width="78"> <p>Behcode</p> </td> <td valign="top" width="84"> <p>behcodeN</p> </td> <td valign="top" width="54"> <p>freg</p> </td> </tr> <tr> <td valign="top" width="31"> <p>1</p> </td> <td valign="top" width="54"> <p>Sara</p> </td> <td valign="top" width="42"> <p>Paris</p> </td> <td valign="top" width="78"> <p>1111</p> </td> <td valign="top" width="84"> <p>Free</p> </td> <td valign="top" width="54"> <p>1</p> </td> </tr> <tr> <td valign="top" width="31"> <p>2</p> </td> <td valign="top" width="54"> <p>Jack</p> </td> <td valign="top" width="42"> <p>Italy</p> </td> <td valign="top" width="78"> <p>1112</p> </td> <td valign="top" width="84"> <p>free</p> </td> <td valign="top" width="54"> <p>Null</p> </td> </tr> </tbody> </table> <p>&nbsp;</p> <p>and <strong>Black_list</strong> table</p> <table border="1" cellspacing="0" cellpadding="0"> <tbody> <tr> <td valign="top" width="31"> <p>Id</p> </td> <td valign="top" width="54"> <p>Name</p> </td> <td valign="top" width="42"> <p>City</p> </td> <td valign="top" width="78"> <p>Behcode</p> </td> <td valign="top" width="84"> <p>behcodeN</p> </td> <td valign="top" width="54"> <p>freg</p> </td> </tr> <tr> <td valign="top" width="31"> <p>1</p> </td> <td valign="top" width="54"> <p>Sara</p> </td> <td valign="top" width="42"> <p>Paris</p> </td> <td valign="top" width="78"> <p>1111</p> </td> <td valign="top" width="84"> <p>Free</p> </td> <td valign="top" width="54"> <p>1</p> </td> </tr> <tr> <td valign="top" width="31"> <p>2</p> </td> <td valign="top" width="54"> <p>ana</p> </td> <td valign="top" width="42"> <p>India</p> </td> <td valign="top" width="78"> <p>1115</p> </td> <td valign="top" width="84"> <p>Free</p> </td> <td valign="top" width="54"> <p>Null</p> </td> </tr> <tr> <td valign="top" width="31"> <p>3</p> </td> <td valign="top" width="54"> <p>Micheal</p> </td> <td valign="top" width="42"> <p>Germany</p> </td> <td valign="top" width="78"> <p>2222</p> </td> <td valign="top" width="84"> <p>Special</p> </td> <td valign="top" width="54"> <p>1</p> </td> </tr> </tbody> </table> <p>&nbsp;</p> <p>I have 2 image in Information.aspx page</p> <p><strong>1-IMGfree</strong></p> <p><strong>2-ImgBlackList</strong></p> <p>I want if in <strong>HOuse_info table</strong> user's <strong>BehcodeN='free'</strong> so it does</p> <p><strong>Imgfree.visible='true'</strong></p> <p>and if&nbsp; that user's information <strong>be in Bleck_list tabel</strong> so it does&nbsp; <strong>ImgBlackList .visible='true'</strong></p> <p><span style="text-decoration: underline;"><strong>i.e</strong></span></p> <p>here user with<strong> behcode=1111</strong> is in HOuse_info Table with BehcodeN='free' and this user is in Black_list Table too&nbsp;</p> <p><strong>so both image visibility Should be true</strong></p> <p>But user with <strong>behcode=1112</strong> is just in HOuse_info tabel so in this case it just&nbsp; <strong>Imgfree.visibe=true</strong></p> <p>Now Below is Behindcode</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <pre class="brush: csharp"> if (_dr[&#34;BehcodeN&#34;].ToString().Trim() == &#34;free&#34;) { Imgfree.Visible = true; } </pre> <p>&nbsp;</p> <pre class="brush: csharp"> if (_dr[&#34;Blacklist&#34;].ToString().Trim() != null) { Imgblacklist.Visible = true; } </pre> <p><span style="text-decoration: underline;"><strong>SP</strong></span></p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <pre class="brush: sql">ALTER procedure [dbo].[View_user_info] @Id int,@behcode nvarchar(10) as begin select *, (select Id from Black_list where Behcode=@behcode) Blacklist from House_Info where id=@Id or BehCode=@behcode end </pre> <p>NOw problem is that here it show Imgblacklist Everytime I mean if users be in <strong>Black_list</strong> Table or They weren't i<strong>n black_list table</strong> it show Imgblacklist</p> <p>NOw what can i do?</p> <p>Bestregards</p>http://www.aspforums.net/Threads/130661/Show-image-only-if-Count-of-Records-from-Database-is-greater-than-one-in-ASPNet/http://www.aspforums.net/Threads/130661/Show-image-only-if-Count-of-Records-from-Database-is-greater-than-one-in-ASPNet/Mon, 22 Apr 2013 02:06:00 GMTsearch<p>hi</p> <p>i have 3 table in my database</p> <p>Trade Table</p> <p>&nbsp;</p> <table class="MsoTableGrid" style="border-collapse: collapse;" border="1" cellspacing="0" cellpadding="0"> <tbody> <tr> <td style="width: 55.05pt; border: 1pt solid windowtext; padding: 0cm 5.4pt;" valign="top" width="73"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><a name="OLE_LINK2"></a><a name="OLE_LINK1"><span><span>T_code</span></span></a></p> </td> <td style="width: 49.6pt; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; padding: 0cm 5.4pt;" valign="top" width="66"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>Name</span></span></span></p> </td> <td style="width: 50.25pt; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; padding: 0cm 5.4pt;" valign="top" width="67"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>Keyword</span></span></span></p> </td> </tr> <tr> <td style="width: 55.05pt; border-right: 1pt solid windowtext; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; padding: 0cm 5.4pt;" valign="top" width="73"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>1</span></span></span></p> </td> <td style="width: 49.6pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="66"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>Hotel</span></span></span></p> </td> <td style="width: 50.25pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="67"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>Hote</span></span></span></p> </td> </tr> <tr> <td style="width: 55.05pt; border-right: 1pt solid windowtext; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; padding: 0cm 5.4pt;" valign="top" width="73"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>1</span></span></span></p> </td> <td style="width: 49.6pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="66"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>Hotel</span></span></span></p> </td> <td style="width: 50.25pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="67"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>Travel</span></span></span></p> </td> </tr> <tr> <td style="width: 55.05pt; border-right: 1pt solid windowtext; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; padding: 0cm 5.4pt;" valign="top" width="73"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>1</span></span></span></p> </td> <td style="width: 49.6pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="66"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>Hotel</span></span></span></p> </td> <td style="width: 50.25pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="67"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>Room</span></span></span></p> </td> </tr> <tr> <td style="width: 55.05pt; border-right: 1pt solid windowtext; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; padding: 0cm 5.4pt;" valign="top" width="73"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>2</span></span></span></p> </td> <td style="width: 49.6pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="66"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>Training</span></span></span></p> </td> <td style="width: 50.25pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="67"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>English</span></span></span></p> </td> </tr> <tr> <td style="width: 55.05pt; border-right: 1pt solid windowtext; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; padding: 0cm 5.4pt;" valign="top" width="73"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>2</span></span></span></p> </td> <td style="width: 49.6pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="66"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>Training</span></span></span></p> </td> <td style="width: 50.25pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="67"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>Sport</span></span></span></p> </td> </tr> </tbody> </table> <p>&nbsp;</p> <p>&nbsp;</p> <p>hotel table</p> <p>&nbsp;</p> <table class="MsoTableGrid" style="border-collapse: collapse;" border="1" cellspacing="0" cellpadding="0"> <tbody> <tr> <td style="width: 68.15pt; border: 1pt solid windowtext; padding: 0cm 5.4pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>T_code</span></p> </td> <td style="width: 68.3pt; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; padding: 0cm 5.4pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>HotelName</span></p> </td> <td style="width: 71pt; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; padding: 0cm 5.4pt;" valign="top" width="95"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>HotelAddress</span></p> </td> <td style="width: 68.25pt; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; padding: 0cm 5.4pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>HotelTell</span></p> </td> </tr> <tr> <td style="width: 68.15pt; border-right: 1pt solid windowtext; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; padding: 0cm 5.4pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>1</span></p> </td> <td style="width: 68.3pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>Milan</span></p> </td> <td style="width: 71pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="95"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>Germany</span></p> </td> <td style="width: 68.25pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>32436565</span></p> </td> </tr> <tr> <td style="width: 68.15pt; border-right: 1pt solid windowtext; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; padding: 0cm 5.4pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>1</span></p> </td> <td style="width: 68.3pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>Paris</span></p> </td> <td style="width: 71pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="95"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>Franch</span></p> </td> <td style="width: 68.25pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>25435863</span></p> </td> </tr> <tr style="height: 3.5pt;"> <td style="width: 68.15pt; border-right: 1pt solid windowtext; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; padding: 0cm 5.4pt; height: 3.5pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>1</span></p> </td> <td style="width: 68.3pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt; height: 3.5pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>Italy</span></p> </td> <td style="width: 71pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt; height: 3.5pt;" valign="top" width="95"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>Veniz</span></p> </td> <td style="width: 68.25pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt; height: 3.5pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span>3685686</span></p> </td> </tr> </tbody> </table> <p>training table</p> <p>&nbsp;</p> <table class="MsoTableGrid" style="border-collapse: collapse;" border="1" cellspacing="0" cellpadding="0"> <tbody> <tr> <td style="width: 68.15pt; border: 1pt solid windowtext; padding: 0cm 5.4pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><a name="OLE_LINK4"></a><a name="OLE_LINK3"><span><span>T_code</span></span></a></p> </td> <td style="width: 68.3pt; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; padding: 0cm 5.4pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>trainingName</span></span></span></p> </td> <td style="width: 71pt; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; padding: 0cm 5.4pt;" valign="top" width="95"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>Address</span></span></span></p> </td> <td style="width: 68.25pt; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; padding: 0cm 5.4pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>tell</span></span></span></p> </td> </tr> <tr> <td style="width: 68.15pt; border-right: 1pt solid windowtext; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; padding: 0cm 5.4pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>2</span></span></span></p> </td> <td style="width: 68.3pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>English</span></span></span></p> </td> <td style="width: 71pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="95"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>Germany</span></span></span></p> </td> <td style="width: 68.25pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>53434646</span></span></span></p> </td> </tr> <tr> <td style="width: 68.15pt; border-right: 1pt solid windowtext; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; padding: 0cm 5.4pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>2</span></span></span></p> </td> <td style="width: 68.3pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>Computer</span></span></span></p> </td> <td style="width: 71pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="95"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>Franch</span></span></span></p> </td> <td style="width: 68.25pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>25435863</span></span></span></p> </td> </tr> <tr style="height: 3.5pt;"> <td style="width: 68.15pt; border-right: 1pt solid windowtext; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-image: none; padding: 0cm 5.4pt; height: 3.5pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>2</span></span></span></p> </td> <td style="width: 68.3pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt; height: 3.5pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>Sport</span></span></span></p> </td> <td style="width: 71pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt; height: 3.5pt;" valign="top" width="95"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>Veniz</span></span></span></p> </td> <td style="width: 68.25pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt; height: 3.5pt;" valign="top" width="91"> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span><span><span>254</span></span></span></p> </td> </tr> </tbody> </table> <p>&nbsp;</p> <p>&nbsp;</p> <p>i want when user write keyword that exist in trade table it connect to table that is in keyword rows</p> <p>EX: user write room&nbsp; in TB and click search button it will connect to Hotel table and show hotel table columns</p> <p>i dont know how i can make relation between trade-hotel-training Tables?</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p>http://www.aspforums.net/Threads/167754/search/http://www.aspforums.net/Threads/167754/search/Sat, 11 Feb 2012 04:30:04 GMTProcedure or function SPInsertIndividual has too many arguments specified<p>Can anyone help, I am having trouble posting a form to a Table in my database. I am getting a ERROR "Procedure or function SPInsertIndividual has too many arguments specified.", Can anyone help it would be very much appreciated.</p> <p>My SP Code is:</p> <p>&nbsp;</p> <p>&nbsp;</p> <pre class="brush: sql">CREATE PROCEDURE [dbo].[SPInsertIndividual] ( @IndividualID int OUTPUT, @TypeName nvarchar(200), @RankName nvarchar(200), @TitleName nvarchar(200), @FamilyName nvarchar(200), @FirstName nvarchar(200), @MiddleName1 nvarchar(200), @MiddleName2 nvarchar(200), @MiddleName3 nvarchar(200), @Gender nvarchar(20), @DOB nvarchar(200), @CountryName nvarchar(200), @StateName nvarchar(200), @CityName nvarchar(200), @Verification nvarchar(200), @DateCreated DateTime ) AS BEGIN SET NOCOUNT ON INSERT INTO dbo.tblIndividual(TypeName, RankName, TitleName, FamilyName, FirstName, MiddleName1, MiddleName2, MiddleName3, Gender, DOB, CountryName, StateName, CityName, Verification, DateCreated, IndividualID) VALUES(@TypeName, @RankName, @TitleName, @FamilyName, @FirstName, @MiddleName1, @MiddleName2, @MiddleName3, @Gender, @DOB, @CountryName, @StateName, @CityName, @Verification, @DateCreated, @IndividualID) END</pre> <p>Aspx.cs Code is</p> <p>&nbsp;</p> <pre class="brush: csharp">protected void btnSubmit_Click(object sender, EventArgs e) { String strConnString = ConfigurationManager.ConnectionStrings[&#34;AspGenealogy&#34;].ConnectionString; SqlConnection con = new SqlConnection(strConnString); SqlCommand cmd = new SqlCommand(); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = &#34;SPInsertIndividual&#34;; var id = new SqlParameter(&#34;IndividualID&#34;, System.Data.SqlDbType.Int); id.Direction = System.Data.ParameterDirection.Output; cmd.Parameters.Add(id); cmd.Parameters.Add(&#34;@IndividualID&#34;, SqlDbType.Int); cmd.Parameters.Add(&#34;@TypeName&#34;, SqlDbType.VarChar).Value = ddlType.SelectedItem.Text.Trim(); cmd.Parameters.Add(&#34;@RankName&#34;, SqlDbType.VarChar).Value = ddlRank.SelectedItem.Text.Trim(); cmd.Parameters.Add(&#34;@TitleName&#34;, SqlDbType.VarChar).Value = ddlTitle.SelectedItem.Text.Trim(); cmd.Parameters.Add(&#34;@FamilyName&#34;, SqlDbType.VarChar).Value = txtFamilyName.Text.Trim(); cmd.Parameters.Add(&#34;@FirstName&#34;, SqlDbType.VarChar).Value = txtFirstName.Text.Trim(); cmd.Parameters.Add(&#34;@MiddleName1&#34;, SqlDbType.VarChar).Value = txtMiddleName1.Text.Trim(); cmd.Parameters.Add(&#34;@MiddleName2&#34;, SqlDbType.VarChar).Value = txtMiddleName2.Text.Trim(); cmd.Parameters.Add(&#34;@MiddleName3&#34;, SqlDbType.VarChar).Value = txtMiddleName3.Text.Trim(); cmd.Parameters.Add(&#34;@Gender&#34;, SqlDbType.VarChar).Value = ddlGender.SelectedItem.Text.Trim(); cmd.Parameters.Add(&#34;@DOB&#34;, SqlDbType.VarChar).Value = txtDOB.Text.Trim(); cmd.Parameters.Add(&#34;@CountryName&#34;, SqlDbType.VarChar).Value = ddlCountry.SelectedItem.Text.Trim(); cmd.Parameters.Add(&#34;@StateName&#34;, SqlDbType.VarChar).Value = ddlState.SelectedItem.Text.Trim(); cmd.Parameters.Add(&#34;@CityName&#34;, SqlDbType.VarChar).Value = ddlCity.SelectedItem.Text.Trim(); cmd.Parameters.Add(&#34;@Verification&#34;, SqlDbType.VarChar).Value = txtVerification.Text.Trim(); cmd.Parameters.Add(&#34;@DateCreated&#34;, SqlDbType.DateTime).Value = DateTime.Now; cmd.Connection = con; try { con.Open(); cmd.ExecuteNonQuery(); Response.Redirect(&#34;Details.aspx&#34;); } catch (Exception ex) { throw ex; } finally { con.Close(); con.Dispose(); }</pre> <p>My .aspx code is:</p> <p>&nbsp;</p> <pre class="brush: html">&lt;body&gt; &lt;form id=&#34;form1&#34; runat=&#34;server&#34;&gt; &lt;div style=&#34;font-family:Gabriola&#34;&gt; &lt;fieldset style=&#34;width:380px&#34;&gt; &lt;legend&gt;&lt;h3&gt;Individual Builder: Stage 1&lt;/h3&gt;&lt;/legend&gt; &lt;tr&gt; &lt;td&gt; Type: &lt;/td&gt; &lt;td&gt; &lt;asp:DropDownList ID=&#34;ddlType&#34; runat=&#34;server&#34; AutoPostBack=&#34;true&#34; OnSelectedIndexChanged=&#34;ddlType_SelectedIndexChanged&#34; DataTextField=&#34;TypeName&#34; DataValueField=&#34;TypeID&#34;&gt;&lt;/asp:DropDownList&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Rank: &lt;/td&gt; &lt;td&gt; &lt;asp:DropDownList ID=&#34;ddlRank&#34; runat=&#34;server&#34; AutoPostBack=&#34;true&#34; OnSelectedIndexChanged=&#34;ddlRank_SelectedIndexChanged&#34; DataTextField=&#34;RankName&#34; DataValueField=&#34;RankID&#34;&gt;&lt;/asp:DropDownList&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Title: &lt;/td&gt; &lt;td&gt; &lt;asp:DropDownList ID=&#34;ddlTitle&#34; AutoPostBack=&#34;true&#34; runat=&#34;server&#34; DataTextField=&#34;TitleName&#34; DataValueField=&#34;TitleID&#34;&gt;&lt;/asp:DropDownList&gt; &lt;/td&gt; &lt;/tr&gt; ______________________________________________________________________________________________________________________________________________ &lt;tr&gt; &lt;td&gt; Family Name: &lt;/td&gt; &lt;td&gt; &lt;asp:TextBox ID=&#34;txtFamilyName&#34; runat=&#34;server&#34;&gt;&lt;/asp:TextBox&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; First Name: &lt;/td&gt; &lt;td&gt; &lt;asp:TextBox ID=&#34;txtFirstName&#34; runat=&#34;server&#34;&gt;&lt;/asp:TextBox&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Middle Name: &lt;/td&gt; &lt;td&gt; &lt;asp:TextBox ID=&#34;txtMiddleName1&#34; runat=&#34;server&#34;&gt;&lt;/asp:TextBox&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Middle Name: &lt;/td&gt; &lt;td&gt; &lt;asp:TextBox ID=&#34;txtMiddleName2&#34; runat=&#34;server&#34;&gt;&lt;/asp:TextBox&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Middle Name: &lt;/td&gt; &lt;td&gt; &lt;asp:TextBox ID=&#34;txtMiddleName3&#34; runat=&#34;server&#34;&gt;&lt;/asp:TextBox&gt; &lt;/td&gt; &lt;/tr&gt; ______________________________________________________________________________________________________________________________________________ &lt;tr&gt; &lt;td&gt; Gender: &lt;/td&gt; &lt;td&gt; &lt;asp:DropDownList ID=&#34;ddlGender&#34; runat=&#34;server&#34;&gt; &lt;asp:ListItem Value=&#34;0&#34;&gt;Male&lt;/asp:ListItem&gt; &lt;asp:ListItem Value=&#34;1&#34;&gt;Female&lt;/asp:ListItem&gt; &lt;/asp:DropDownList&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Date of Birth: &lt;/td&gt; &lt;td&gt; &lt;asp:TextBox ID=&#34;txtDOB&#34; runat=&#34;server&#34;&gt;&lt;/asp:TextBox&gt; &lt;/td&gt; &lt;/tr&gt; ______________________________________________________________________________________________________________________________________________ &lt;tr&gt; &lt;td&gt; Country of Birth: &lt;/td&gt; &lt;td&gt; &lt;asp:DropDownList ID=&#34;ddlCountry&#34; runat=&#34;server&#34; AutoPostBack=&#34;true&#34; OnSelectedIndexChanged=&#34;ddlCountry_SelectedIndexChanged&#34; style=&#34;height: 22px&#34; DataTextField=&#34;CountryName&#34; DataValueField=&#34;CountryID&#34;&gt;&lt;/asp:DropDownList&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Province or State of Birth: &lt;/td&gt; &lt;td&gt; &lt;asp:DropDownList ID=&#34;ddlState&#34; runat=&#34;server&#34; AutoPostBack=&#34;true&#34; OnSelectedIndexChanged=&#34;ddlState_SelectedIndexChanged&#34; DataTextField=&#34;StateName&#34; DataValueField=&#34;StateID&#34;&gt;&lt;/asp:DropDownList&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; City of Birth: &lt;/td&gt; &lt;td&gt; &lt;asp:DropDownList ID=&#34;ddlCity&#34; runat=&#34;server&#34; AutoPostBack=&#34;true&#34; DataTextField=&#34;CityName&#34; DataValueField=&#34;CityID&#34;&gt;&lt;/asp:DropDownList&gt; &lt;/td&gt; &lt;/tr&gt; ______________________________________________________________________________________________________________________________________________ &lt;tr&gt; &lt;td&gt; Source: &lt;/td&gt; &lt;td&gt; &lt;asp:TextBox ID=&#34;txtVerification&#34; runat=&#34;server&#34;&gt;&lt;/asp:TextBox&gt; &lt;/td&gt; &lt;/tr&gt; ______________________________________________________________________________________________________________________________________________ &lt;tr&gt; &lt;td&gt; &lt;asp:Button ID=&#34;btnClear&#34; runat=&#34;server&#34; Text=&#34;Clear&#34; /&gt; &lt;/td&gt; &lt;td&gt; &lt;asp:Button ID=&#34;btnSubmit&#34; runat=&#34;server&#34; Text=&#34;Submit&#34; OnClick=&#34;btnSubmit_Click&#34;/&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/fieldset&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt;</pre> <p>&nbsp;</p> <p>Can anyone help me? I am sure it is something minor.<br /> &nbsp;<br /> Thanks, I look forward to hearing from you.</p>http://www.aspforums.net/Threads/425985/Procedure-or-function-SPInsertIndividual-has-too-many-arguments-specified/http://www.aspforums.net/Threads/425985/Procedure-or-function-SPInsertIndividual-has-too-many-arguments-specified/Fri, 19 Sep 2014 01:47:42 GMTOptimum Store Procedure<p>HI</p> <p>below code is my SP</p> <p><strong>how I can it worked correctly but I want Optimum it How I can do it?</strong></p> <p>thanks</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <pre class="brush: sql">SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER procedure [dbo].[Search_number] @Mobile nvarchar(15) as begin SET NOCOUNT ON select (select Ownername from House_Info where Mobile=@Mobile or Tell=@Mobile) as Name,(select Mobile from House_Info where Mobile=@Mobile or Tell=@Mobile) as Mobile, (select BehcodeN from House_Info where Mobile=@Mobile or Tell=@Mobile) as BehcodeN,(select ID from House_Info where Mobile=@Mobile or Tell=@Mobile) as Id, (select BehCode from House_Info where Mobile=@Mobile or Tell=@Mobile) as BehCode,(select Variz from House_Info where Mobile=@Mobile or Tell=@Mobile) as Variz, (select Variz from House_Info where Mobile=@Mobile or Tell=@Mobile) as Variz,(select Code from House_Info where Mobile=@Mobile or Tell=@Mobile ) as Code ,(select Tell from Varizpool where Tell=@Mobile ) as NVariz,(select Mobile from Black_list where Mobile=@Mobile ) as MobileB, (select BehcodeN from free_register where Mobile=@Mobile ) as Freg,(select BehcodeN from S_register where Mobile=@Mobile ) as Sreg, (select Mobil from Estate_free where Mobil=@Mobile ) as Fregestate,(select Aname from Black_list where Mobile=@Mobile ) as NameB, (select Aname from S_register where Mobile=@Mobile ) as Aname,(select Mobile from S_register where Mobile=@Mobile ) as MobileSR ,(select Mobile from free_register where Mobile=@Mobile ) as MobileFR,(select Name from Varizpool where Tell=@Mobile ) as NameV ,(select tell from Varizpool where tell=@Mobile ) as MobileV,(select Name from Estate_free where Mobil=@Mobile ) as NameE end </pre> <p>&nbsp;</p>http://www.aspforums.net/Threads/213573/Optimum-Store-Procedure/http://www.aspforums.net/Threads/213573/Optimum-Store-Procedure/Mon, 25 Mar 2013 02:05:21 GMTHow to add New line character or line break in sql statement<p>hello&nbsp;</p> <p>I want to add new line charachter in the sql statement&nbsp;</p> <p>Sql&nbsp;</p> <p>&nbsp;</p> <p>&nbsp; DECLARE @text NVARCHAR(100)</p> <p>&nbsp;</p> <p>SET @text = 'This is line 1.' &nbsp;+ (line break charachter) + &nbsp;'This is line 2.'</p> <p>SELECT @text</p> <p>&nbsp;</p> <p>I want output like this&nbsp;</p> <p>&nbsp;</p> <p>This is line 1.</p> <p>This is line 2.</p> <p>&nbsp;</p> <p>can you please tell me how to use break the line in sql&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp; &nbsp;&nbsp;</p>http://www.aspforums.net/Threads/198949/How-to-add-New-line-character-or-line-break-in-sql-statement/http://www.aspforums.net/Threads/198949/How-to-add-New-line-character-or-line-break-in-sql-statement/Mon, 23 Apr 2012 07:20:07 GMTFetched Combined Data from Two Tables in SQL Server<p>hi friends,i want to compare two tables and display the records in gridview.i know how to compare the two tables using join,but my problem is,,in one web page(employeerecords.aspx) i have a gridview control in that gridview controls i fill the data like empcode,empname,desig,dept,status and salary slip ,in the salary slip i provide a link button generate salary slip,this details saved in table 1,when i click the link button generate salary slip i pass the emp id like this</p> <p>&nbsp;PostBackUrl='&lt;%# "payslip1.aspx?empid=" + Eval("empid").tostring() %&gt;' Text="Generate Payslip"&gt;&lt;/asp:LinkButton&gt;</p> <p>and it will pass to the payslip1.aspx and display the requird records,and in the payslip1 that means 2nd webpage i want to enter leave details,deductions and others and i saved to the table2 ,in the table2 i provide a field like status whether the salary is generated or not,once it done i will get back to 1st webpage (employeerecords.aspx)i want to fill the status column ,status column is stored in 2nd table,actually i filled the gridview with table1 records,,how to retrive the table2 status column in the gridview..how to write the condition for this...can anyone help me </p>http://www.aspforums.net/Threads/194201/Fetched-Combined-Data-from-Two-Tables-in-SQL-Server/http://www.aspforums.net/Threads/194201/Fetched-Combined-Data-from-Two-Tables-in-SQL-Server/Thu, 20 Dec 2012 00:33:54 GMTA transport-level error has occurred when receiving results from the server.<p style="margin: 0px 0px 18px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: #f0f3f4; color: #222222; font-family: 'Segoe UI', Tahoma, Arial, Helvetica, sans-serif; line-height: 18px;">I am making a website in which i need to load xml file from url.i am getting the into dataset but it is not able to save into database.i am getting the following error....</p> <p style="margin: 0px 0px 18px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: #f0f3f4; color: #222222; font-family: 'Segoe UI', Tahoma, Arial, Helvetica, sans-serif; line-height: 18px;">&nbsp;</p> <p style="margin: 0px 0px 18px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: #f0f3f4; color: #222222; font-family: 'Segoe UI', Tahoma, Arial, Helvetica, sans-serif; line-height: 18px;">A transport-level error has occurred when receiving results from the server. (provider: Shared Memory Provider, error: 0 - The pipe has been ended.)</p> <p style="margin: 0px 0px 18px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: #f0f3f4; color: #222222; font-family: 'Segoe UI', Tahoma, Arial, Helvetica, sans-serif; line-height: 18px;">&nbsp;</p> <p style="margin: 0px 0px 18px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: #f0f3f4; color: #222222; font-family: 'Segoe UI', Tahoma, Arial, Helvetica, sans-serif; line-height: 18px;">below is my private method which i had been calling from page load</p> <p style="margin: 0px 0px 18px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: #f0f3f4; color: #222222; font-family: 'Segoe UI', Tahoma, Arial, Helvetica, sans-serif; line-height: 18px;">&nbsp;</p> <p style="margin: 0px 0px 18px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; vertical-align: baseline; background-color: #f0f3f4; color: #222222; font-family: 'Segoe UI', Tahoma, Arial, Helvetica, sans-serif; line-height: 18px;">&nbsp;</p> <pre class="brush: csharp">private void filloperatorcode() { DataSet ds = new DataSet(); SqlDataAdapter da; SqlConnection con; con = new SqlConnection(@&#34;Data Source=;Initial Catalog=;Integrated Security=True&#34;); ds.ReadXml(&#34;http://letitgo.asia/api/serviceData.go?apimode=test&amp;goid=5011000001&amp;password=test123&amp;rtype=xml&#34;); SqlBulkCopy sbc = new SqlBulkCopy(&#34;Data Source=.;Initial Catalog=test;Integrated Security=True&#34;); sbc.DestinationTableName = &#34;r_servicefamily&#34;; con.Open(); <strong> sbc.WriteToServer(ds.Tables[0]);</strong> //This is the place where i am getting the error DropDownList1.DataTextField = &#34;service_family&#34;; DropDownList1.DataValueField = &#34;service_family&#34;; DropDownList1.DataSource = ds; DropDownList1.DataBind(); }</pre> <p>&nbsp;</p>http://www.aspforums.net/Threads/742207/A-transport-level-error-has-occurred-when-receiving-results-from-the-server/http://www.aspforums.net/Threads/742207/A-transport-level-error-has-occurred-when-receiving-results-from-the-server/Wed, 06 Jun 2012 01:50:45 GMT