creating insert form n connecting it to database using asp.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mandrekar salim
    New Member
    • Feb 2011
    • 8

    creating insert form n connecting it to database using asp.net

    hi guys , i'm using visual studio 2005. now i've to create a insert form which shud be connected to database(mssql) . can any one tell me how to do dat. as i'm new to visual studio i dnt knw it.
  • vanc
    Recognized Expert New Member
    • Mar 2007
    • 211

    #2
    G'day mate,

    This is a big question, I think we have to break it down a little bit.

    1. You should have the MSSQL database setup already.
    2. You should have known the way to connect to that database from your project.
    3. Then you will decide how to put data from forms into that database.

    Get back to me when you're at step 3, we will go from then.

    Cheers.

    Comment

    • mandrekar salim
      New Member
      • Feb 2011
      • 8

      #3
      its done.. now tel me how. i completed the design of te form.

      Comment

      • vanc
        Recognized Expert New Member
        • Mar 2007
        • 211

        #4
        This is quick :D.

        The simplest way and quickest way to do this is to create connection to the database, command with SQL queries and execute the command to insert data into database.

        The idea is quite simple, you will have a form with some input text boxes, and an input button where you wire it to the event that will get data from those boxes and put them into the command text and execute it.

        It may not get your question or this is what you're after. Please let me know.

        Cheers.

        Comment

        • mandrekar salim
          New Member
          • Feb 2011
          • 8

          #5
          i completed with design of the form .. it has few txtbooxes n combo boxes. i hve sqldata source. hw to connect the form to d database. wat code is required tobe written in save button?

          Comment

          • mandrekar salim
            New Member
            • Feb 2011
            • 8

            #6
            @vanc: i want the codes to connect to db...

            Comment

            • mandrekar salim
              New Member
              • Feb 2011
              • 8

              #7
              d form is designed using visual studio 2005, using asp.net . frm this form i want to insert data into database. i wnt the code example so that i can do it.

              Comment

              • Frinavale
                Recognized Expert Expert
                • Oct 2006
                • 9749

                #8
                Please check out the quick articles on How to use a Database in your Program (part 1) and How to use a Database in your Program (part 2)

                Comment

                • vanc
                  Recognized Expert New Member
                  • Mar 2007
                  • 211

                  #9
                  Sweet Frinavale. This should help heaps with example codes.

                  Cheers.

                  Comment

                  Working...