I am just updating a button control code which is updating the MS SQL Server 2008

protected void Button1_Click(object sender, EventArgs e)
string cs = ConfigurationManager.ConnectionStrings["SampleConnectionString"].ConnectionString;
SqlConnection con = new SqlConnection(cs) ;
try
SqlCommand cmd = new SqlCommand("insert into Contacts values('" + txtFirstName.Text + "','" + txtLastName.Text + "','" + txtSubject.Text + "','" + txtEmail.Text + "', '" + txtAddress.Text + "', '" + txtCity.Text + "','" + txtPinCode.Text + "','" + txtTelephoneNumber.Text + "', '" + txtMobileNumber.Text + "')", con);
con.Open();
cmd.ExecuteNonQuery();
lblMessage.Visible = true;
lblMessage.Text = "Your details added to the website. Thank You!";
txtFirstName.Text="";
txtLastName.Text="";
txtSubject.Text = "";
txtEmail.Text = "";
txtAddress.Text = "";
txtCity.Text = "";
txtPinCode.Text = "";
txtTelephoneNumber.Text = "";
txtMobileNumber.Text = "";
catch
finally
con.Close();
Dear all,
I am using asp.net as front end for updating MSSQL 2008 R2 database. When I click submit button. The data is not updating into the database.
Firstly the code is not coming out after I pressed Submit button. I have to go to the code and select the stop button in the visual studio buttons.
can somebody throw light on this.
thanks
Sathya

Hello,
Post your question in ASP.NET forums
and you'll get more help from web developers.
Thanks for your understanding.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Do I need to install Security Hotfix (KB2977319) after Cumulative Update 12 for SQL Server 2008 R2 SP2

    HI,
    I have installed Cumulative Update 12 for SQL Server 2008 R2 SP2 on my SharePoint instances. This was to resolve a known  issue faced with the instance. CU12 helped resolve the issue. My company is rather strict regarding security hotfixes. But I am
    not sure if this particular hotfix [Security Hotfix (KB2977319)] is required if the instance has CU12 applied.
    Tested this on a Lab server, the installation did run fine, the summary log also stated that the KB is applied. But the Build Number did not change. Hence the doubt.
    Overall summary:
      Final result:                  Passed
      Exit code (Decimal):           0
      Exit message:                  Passed
      Start time:                    2014-09-06 10:31:21
      End time:                      2014-09-06 10:55:49
      Requested action:              Patch
    Instance SPNTSQLTRN overall summary:
      Final result:                  Passed
      Exit code (Decimal):           0
      Exit message:                  Passed
      Start time:                    2014-09-06 10:48:08
      End time:                      2014-09-06 10:55:45
      Requested action:              Patch
    Package properties:
      Description:                   SQL Server Database Services 2008 R2
      ProductName:                   SQL2008
      Type:                          RTM
      Version:                       10
      SPLevel:                       2
      KBArticle:                     KB2977319
      KBArticleHyperlink:            http://support.microsoft.com/?kbid=2977319
      PatchType:                     QFE
      AssociatedHotfixBuild:         0
      Platform:                      x64
      PatchLevel:                    10.52.4321.0
      ProductVersion:                10.52.4000.0
      GDRReservedRange:              10.50.4001.0:10.50.4199.0;10.50.4200.0:10.50.4250.0
      PackageName:                   SQLServer2008-KB2977319-x64.exe
      Installation location:         e:\ac2af22d88ee645b5b32b5c178\x64\setup\
    Please inform if I need to apply the hotfix on CU12. Thanks in advance.
    John S

    Yes you must install Security update mentioned in KB 2977319 it is important for SQL Server to be patches with this security update. Without this it could allow an attacker to compromise your system and gain control over it.
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Articles

  • How to use update trigger in sql server 2008 with specific column

    Hello friends currently my trigger updates on table update, and I need to change this to only fire when specific column changes.
    /****** Object: Table [dbo].[User_Detail] ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[User_Detail](
    [sno] [int] IDENTITY(1,1) NOT NULL,
    [userid] [nvarchar](50) NULL,
    [name] [nvarchar](max) NULL,
    [jointype] [nvarchar](50) NULL,
    [joinside] [nvarchar](50) NULL,
    [lleg] [nvarchar](50) NULL,
    [rleg] [nvarchar](50) NULL,
    [ljoining] [int] NULL,
    [rjoining] [int] NULL,
    [pair] [int] NULL
    ) ON [PRIMARY]
    GO
    /****** Object: Table [dbo].[User_Detail] table data ******/
    SET IDENTITY_INSERT [dbo].[User_Detail] ON
    INSERT [dbo].[User_Detail] values (1, N'LDS', N'LDS Rajput', N'free', N'Left', N'jyoti123', N'SUNIL', 6, 4, 4)
    INSERT [dbo].[User_Detail] VALUES (2, N'jyoti123', N'jyoti rajput', N'free', N'Left', N'mhesh123', N'priya123', 3, 2, 2)
    SET IDENTITY_INSERT [dbo].[User_Detail] OFF
    /****** Object: Table [dbo].[User_Detail] trigger ******/
    CREATE TRIGGER triggAfterUpdate ON User_Detail
    FOR UPDATE
    AS
    declare @userid nvarchar(50);
    declare @pair varchar(100);
    select @userid=i.userid from inserted i;
    select @pair=i.pair from inserted i;
    SET NOCOUNT ON
    if update(pair)
    begin
    insert into Complete_Pairs(userid,pair)
    values(@userid,1);
    end
    GO
    /****** Object: Table [dbo].[Complete_Pairs] Script Date: 05/22/2014 21:20:35 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[Complete_Pairs](
    [Sno] [int] IDENTITY(1,1) NOT NULL,
    [userid] [nvarchar](50) NULL,
    [pair] [int] NULL
    ) ON [PRIMARY]
    GO
    my query is TRIGGER triggAfterUpdate is fired only when pair column in User_Details table is update only and when we update other column like ljoin or rjoin then my trigger is not fired
    please any one can suggest us how it can done or provide solution
    Jitendra Kumar Sr. Software Developer at Ruvixo Technologies 7895253402

    >select @userid=i.userid
    frominserted i;
            select
    @pair=i.pair
    frominserted i;
    The code above assumes a single row UPDATE.
    You have to setup the trigger for set processing like when 100 rows are updated in a single statement.
    UPDATE trigger example: http://www.sqlusa.com/bestpractices2005/timestamptrigger/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Error Code 1605 when installing or unstalling sql server 2008 R2 on my server

    Rai, Sunil (IN - Delhi)
    5:32 PM
    TITLE: SQL Server Setup failure.
    SQL Server Setup has encountered the following error:
    MsiGetProductInfo failed to retrieve ProductVersion for package with Product Code = '{2453DBC8-ACC4-4711-BD03-0C15353AA3D8}'. Error code: 1605..
    BUTTONS:
    OK

    With limited information you posted I can only find below
    http://www.windowsvalley.com/fix-sql-server-setup-has-encountered-the-error-code-1605/
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • SQL Server 2008 Cumulative update

    Hi All,
    Please let me know if Cumulative Update 9 for SQL Server 2008 SP1 has been certified or not. Also what is an ETA.
    Thanks.
    Regards,
    Raghu.

    SP1 was already certified. That's menas  any cumulative patch for SP1can be applied without any problem because it can not cause any problem it can just fix some bugs from SQL or SSAS.
    SAP BPC doesn't install any component into SQL server (database server , SQL or SSAS) which means applying a CU for SQL server cannot create any issue for BPC.
    Regards
    Sorin Radulescu

  • Has mssql2008r2 got "Cumulative Update Package 6 for SQL Server 2008 Service Pack 1"

    hi,
    I have
    Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (Intel X86)   Apr  2 2010 15:53:02   Copyright (c) Microsoft Corporation  Express Edition with Advanced Services on Windows NT 5.1 <X86> (Build 2600: Service Pack 3) 
    , i wanted to know has it got
    "Cumulative Update Package 6 for SQL Server 2008 Service Pack 1"
    so that i do not have to install or i have to install
    yours sincerley

    Thank u, please tel me can i instal  sp3.
    I have noticed the link of sp2 (http://www.microsoft.com/en-in/download/details.aspx?id=30437)
     has listed
    (SQL Server 2008 R2 Express Edition)
    SQL Server 2008 R2 Service Pack 2 (SP2) is now available for download. SQL Server 2008 R2 service packs are cumulative and can be used to upgrade all releases of SQL Server 2008 R2 to Service Pack 2. SQL Server 2008 R2 Service Pack 2 contains Cumulative Update
    1 to 5 from SQL Server 2008 R2 SP1. The package can be used to upgrade the following SQL Server 2008 R2 editions: 
    SQL Server 2008 R2 Parallel Computing Edition
    SQL Server 2008 R2 Datacenter Edition
    SQL Server 2008 R2 Enterprise Edition and Developer Edition
    SQL Server 2008 R2 Standard Edition
    SQL Server 2008 R2 Web Edition
    SQL Server 2008 R2 Workgroup Edition
    SQL Server 2008 R2 Express Edition
    where as link of sp3(http://www.microsoft.com/en-us/download/details.aspx?id=44271)
    has not listed express edition but written in general.
    SQL Server 2008 R2 Service Pack 3 (SP3) is now available for download. SQL Server 2008 R2 service packs are cumulative and can be used to upgrade all releases of SQL Server 2008 R2 to Service Pack 3. SQL Server 2008 R2 Service Pack 3 contains
    Cumulative Update 1 to 13 from SQL Server 2008 R2 SP2. The package can be used to upgrade the following SQL Server 2008 R2 editions: 
    SQL Server 2008 R2 Parallel Computing Edition
    SQL Server 2008 R2 Datacenter Edition
    SQL Server 2008 R2 Enterprise Edition and Developer Edition
    SQL Server 2008 R2 Standard Edition
    SQL Server 2008 R2 Web Edition
    SQL Server 2008 R2 Workgroup Edition
    yours sincerley

  • Can't install the Windows Update package KB2674319 (SQL Server 2012 SP1)

    Hi. I need to get the update of my MS SQL Server 2012 installation in order to get the SP1.
    When I run the Windows Update it appears to download well the package.
    Then when it begins to install  I get the error "84C4000E: Se ha producido un error con Windows Update" (our server is in Spanish).
    I have the last updates for Windows Server, a rebooted our server and the issue remains.
    Any idea of what should I do to get the SP1 update?
    Thanks in advance.
    Gustavo.

    Hi Gustavo,
    Based on your description, I suggest you should refer to the following articles. And then check if you can install the update successfully.
    SQL 2012 Server fails in Windows Update with error 84C4000E
    http://techtuxwords.blogspot.in/2013/10/sql-2012-server-fails-in-windows-update.html
    MS SQL Server 2008 R2 SP1 fails with error 84C4000E
    http://techtuxwords.blogspot.in/2011/09/ms-sql-server-2008-r2-sp1-fails-with.html
    If this issue still persists, please don’t hesitate to let me know.
    Hope this helps.
    Best regards,
    Justin Gu

  • I just updated the OS on my iphone4  and now it won't work- says 0bytes available

    I just Updated the iOS on my iPhone 4 from 4.3.1 to the latest update, (after backing up my data on iTunes) and now the iPhone says I have 0bytes available and need to delete some photos or videos..  I have tried deleting content from my iPhone, as well as re-setting it, and nothing works.  What could be the problem?

    Try hold down Power and Home buttons for 10 to 15 seconds.
    Allan

  • TS1702 I have just updated the op system on my phone, it now won't let me close down any apps that are open in the background, any ideas?

    I have just updated the op system on my phone, it now won't let me close down any apps that are open in the background, any ideas?

    Double-click the Home button to bring up the app screen, then swipe upwards on the app.
    http://howto.cnet.com/8301-11310_39-57602601-285/how-to-force-close-apps-on-ios- 7/
    Regards.
    Forum Tip: Since you're new here, you've probably not discovered the Search feature available on every Communities page, but next time, it might save you time (and everyone else from having to answer the same question multiple times) if you search a couple of ways for a topic, both in the relevant forums and in the Apple Knowledge Base before you post a question.

  • I have a iMac and i just updated the computer to Yosemite.  I have Photoshop CS5 and when I try to print under print size --- manage custom size , photoshop unexpectedly quits every time.  I updated the printer drivers (epson 9880)  uninstalled and instal

    I have a iMac and i just updated the computer to Yosemite.  I have Photoshop CS5 and when I try to print under print size --- manage custom size , photoshop unexpectedly quits every time.  I updated the printer drivers (epson 9880)  uninstalled and installed all the drivers. restarted computer and it is still doing the same thing.  Cant find any costumer service here either except forums.

    I have exactly the same problem - Whenever I go to Print, the print widow appears, it thinks about it for a bit (rotating symbol) and then quits.
    This is the beginning of the problem details, cut and paste. It goes on much longer than this:
    Process:               Adobe Photoshop CS5 [786]
    Path:                  /Applications/Adobe Photoshop CS5/Adobe Photoshop CS5.app/Contents/MacOS/Adobe Photoshop CS5
    Identifier:            com.adobe.Photoshop
    Version:               12.0 (12.0x20100407.r.1103] [12.0)
    Code Type:             X86-64 (Native)
    Parent Process:        ??? [1]
    Responsible:           Adobe Photoshop CS5 [786]
    User ID:               502
    Date/Time:             2015-02-01 10:56:19.422 +0000
    OS Version:            Mac OS X 10.10.2 (14C109)
    Report Version:        11
    Anonymous UUID:        C0191A3D-714A-8117-8061-9291955759D1
    Sleep/Wake UUID:       B201F1B6-486D-4D70-B99A-E4F89B024BBF
    Time Awake Since Boot: 5600 seconds
    Time Since Wake:       240 seconds
    Crashed Thread:        0  Dispatch queue: com.apple.main-thread
    Exception Type:        EXC_BAD_ACCESS (SIGBUS)
    Exception Codes:       KERN_PROTECTION_FAILURE at 0x00007fff789d1e70
    VM Regions Near 0x7fff789d1e70:
        __DATA                 00007fff78986000-00007fff7898b000 [   20K] rw-/rwx SM=COW  /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Ve rsions/A/libLAPACK.dylib
    --> __DATA                 00007fff7898b000-00007fff789e1000 [  344K] rw-/rwx SM=COW  /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
        __DATA                 00007fff789e1000-00007fff789e6000 [   20K] rw-/rwx SM=COW  /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211
    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
    0   ???                           0x00007fff789d1e70 OBJC_CLASS_$_NSMutableArray + 0
    1   com.apple.print.framework.PrintCore 0x00007fff95693021 PMRelease + 43
    2   com.adobe.Photoshop           0x0000000100c237cf AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 9727123
    3   com.adobe.Photoshop           0x0000000100c23e7d AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 9728833
    4   com.adobe.Photoshop           0x0000000100c23eb7 AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 9728891
    5   com.adobe.Photoshop           0x0000000100c23da5 AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 9728617
    6   com.adobe.Photoshop           0x0000000100aee053 AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 8459543
    7   com.adobe.Photoshop           0x0000000100768c64 AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 4768040
    8   com.adobe.Photoshop           0x0000000100af067e AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 8469314
    9   com.adobe.Photoshop           0x0000000100af0be9 AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 8470701
    10  com.adobe.Photoshop           0x0000000100af1295 AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 8472409
    11  com.adobe.Photoshop           0x000000010007bbdc 0x100000000 + 506844
    12  com.adobe.Photoshop           0x00000001000d6a7e 0x100000000 + 879230
    13  com.adobe.Photoshop           0x00000001000d6a9e 0x100000000 + 879262
    14  com.adobe.Photoshop           0x0000000100066eb1 0x100000000 + 421553
    15  com.adobe.Photoshop           0x0000000100071d74 0x100000000 + 466292
    16  com.adobe.Photoshop           0x000000010006716f 0x100000000 + 422255
    17  com.adobe.Photoshop           0x0000000100067232 0x100000000 + 422450
    18  com.adobe.Photoshop           0x00000001012f0007 AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 16856267
    19  com.apple.AppKit               0x00007fff8d77c608 -[NSApplication run] + 711
    20  com.adobe.Photoshop           0x00000001012ee19c AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 16848480
    21  com.adobe.Photoshop           0x00000001012ef3c7 AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 16853131
    22  com.adobe.Photoshop           0x0000000100068e82 0x100000000 + 429698
    23  com.adobe.Photoshop           0x0000000100238308 0x100000000 + 2327304
    24  com.adobe.Photoshop           0x00000001002383a7 0x100000000 + 2327463

  • Having just bought an iMac and set every thing up I have found that my IPad seems to run very slow. I have also just updated the IPad to OS 5.1 .Are these two things connected or is there a problem with the IPad

    Having just bought an iMac and set every thing up I have found that my IPad seems to run very slow. I have also just updated the IPad to OS 5.1 .Are these two things connected or is there a problem with the IPad

    Using the Mac with your iPad has nothing to do with the fact that the iPad is running slow. There could be any number of reasons why the iPad is now running slow.
    Have you tried a reset on the iPad?
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

  • I just downloaded a lot of PDF textbooks to my ibooks, and now it crashes within seconds of opening the app. I have tried restoring the iPad and just updated the iBooks to 3.1. Any ideas? I have the new iPad.

    I just downloaded a lot of PDF textbooks to my ibooks, and now it crashes within seconds of opening the app. I have tried restoring the iPad and just updated the iBooks to 3.1. Any ideas? I have the new iPad.

    What a waste of space to paste the code.
    Why not ask in the iLife > iPhoto forum where your question belongs.

  • I just updated the iPad IOS and it will not finish. HELP

    I just updated the iPad IOS to 8.3 and it will not finish the install it has been stuck for over 24 hours. I plug it into the Mac and the computer says that the iPad must give me access which of course I can't. So I can not do a hard reboot. help

    If it's stuck on the progress bar then you could try a soft-reset and see if that gets it to complete : press and hold both the sleep and home buttons for about 10 to 15 seconds, after which the Apple logo should reappear and it will hopefully reboot fully.
    If not then try recovery mode and restore to your backup : If you can't update or restore your iPhone, iPad, or iPod touch - Apple Support

  • I just updated the OS on my iPad.  Turned it off and now it won't turn on.  Anyone else having this problem?

    I just updated the OS on my IPad.  I turned it off and now have retured to it and it won't turn on.  Anyone else having this problem?

    Lc137-
    Try resetting (rebooting) the iPad.  Hold both the Home and Sleep buttons for several seconds until the Apple logo appears.  Ignore the "Slide to power off" arrow.  The iPad will restart after a couple of minutes.  Resetting this way will not hurt anything, and sometimes solves mysterious problems.
    If that does not help, see if this article does:  <iOS:  Unable to Update or Restore>.
    Fred

  • I just updated the software on my iPad2 and now it's asking for my passcode but I never set one. How can I fix this?

    I just updated the software on my iPad2 and now it's asking for my passcode but I never set one. How can I fix this?

    I fixed it!!
    While not connected to any USB cable I put the iPad in recovery mode.
    To do that turn the iPad completely off. Press and hold the home button while turning the iPad on, once you see the apple logo release the home button.
    Turn on your OS X mac after it boots up connect the USB from iPod to Mac. iTunes should start. If not launch itunes.
    Perform the factory restore process paying attention to all of the screen message windows. Then set up the ipad like it was new.

Maybe you are looking for

  • Mac App Store on my Macbook Pro

    Why can I not find my Mac App Store even though the software is updated? I bought my Macbook Pro in 2009; is it outdated? I'd really, really appreciate your help.

  • Why is the first MIDI note always delayed?

    Hi all I'm having some trouble recording MIDI in Logic Pro X. When using virtual instruments (built-in Logic instruments) there is a latency issue with the first note. When recording or playing along, the first note I play has quite audible latency,

  • Making Selection Enabled for fields

    Hi, I have a infopackage which contains some fields in the data selection tab. My question is: How to make any other field to make Selection Enabled in Infopackage? What are the steps need s to be carried out in R/3 and in BI system? Thanks In Advanc

  • Numbers/Currency in SAP to be translated to COMP-3 on mainframe

    Hi Experts,    I am pretty sure that I am not the first person dealing with this problem. Could anyone let me know how to translate say SAP quantity to the legacy COMP-3 Field and COMP-3 to SAP Numbers/Quantity?    I have the Mainframe Legacy System

  • Image number attached to slide show images

    I am a photographer and would like to offer dvd proofs. is there a way to have the existing image number show up in the slide show presentation, either on the photo as some sort of watermark or as the file number displayed when they fast forward or r