Inserting values into a table

Discussion in 'ASP General' started by Fawke101, Apr 2, 2004.

  1. Fawke101

    Fawke101 Guest

    Hi there,

    I am new to ASP and i have really only been exposed to getting data from a
    SQL database and displaying it.

    I want to include a page in my application (like a form in Access i guess)
    with various text boxes and drop-downs + tick boxes.
    Then i want to click a submit button that inserts the data (providing is
    valid) into a SQL Server table.

    I have had a search in google but nothing seems to explain this in its most
    basic terms (errorchecking and inserting).

    Could anyone give me an example of this or some background about this
    functionality.

    Thanks

    --
    Thanks in advance

    Fawke

    Please remove ANTI and SPAM
    from my email address before emailing me.

    www.bradflack.com
    Fawke101, Apr 2, 2004
    #1
    1. Advertising

  2. Fawke101

    Jeff Cochran Guest

    On Fri, 2 Apr 2004 10:50:35 +0100, "Fawke101"
    <> wrote:

    >I am new to ASP and i have really only been exposed to getting data from a
    >SQL database and displaying it.
    >
    >I want to include a page in my application (like a form in Access i guess)
    >with various text boxes and drop-downs + tick boxes.
    >Then i want to click a submit button that inserts the data (providing is
    >valid) into a SQL Server table.
    >
    >I have had a search in google but nothing seems to explain this in its most
    >basic terms (errorchecking and inserting).
    >
    >Could anyone give me an example of this or some background about this
    >functionality.


    You need a better Google search then... )

    Start with a basic ASP database tutorial and a SQL tutorial. For the
    latter, use sqlcourse.com. For the former, Google "asp database
    tutorial" and start reading. When you have that down, start
    researching input error checking.

    You may also need some HTML tutorials if you don't understand forms.

    Jeff
    Jeff Cochran, Apr 2, 2004
    #2
    1. Advertising

  3. Fawke101

    Maarten Guest

    Maarten, Apr 2, 2004
    #3
  4. Fawke101

    Fawke101 Guest

    Sorry,

    I know my way around in HTML and ASP to a certain extent.
    Its just that i have never been in the situation to use INSERT statements. I
    didnt know what was/was not good practise and how exactly the INSERT worked.
    I am not a complete novice, just new to this function.

    Thanks anyhow, il have a look around

    --
    Thanks in advance

    Fawke

    Please remove ANTI and SPAM
    from my email address before emailing me.

    www.bradflack.com
    "Jeff Cochran" <> wrote in message
    news:...
    > On Fri, 2 Apr 2004 10:50:35 +0100, "Fawke101"
    > <> wrote:
    >
    > >I am new to ASP and i have really only been exposed to getting data from

    a
    > >SQL database and displaying it.
    > >
    > >I want to include a page in my application (like a form in Access i

    guess)
    > >with various text boxes and drop-downs + tick boxes.
    > >Then i want to click a submit button that inserts the data (providing is
    > >valid) into a SQL Server table.
    > >
    > >I have had a search in google but nothing seems to explain this in its

    most
    > >basic terms (errorchecking and inserting).
    > >
    > >Could anyone give me an example of this or some background about this
    > >functionality.

    >
    > You need a better Google search then... )
    >
    > Start with a basic ASP database tutorial and a SQL tutorial. For the
    > latter, use sqlcourse.com. For the former, Google "asp database
    > tutorial" and start reading. When you have that down, start
    > researching input error checking.
    >
    > You may also need some HTML tutorials if you don't understand forms.
    >
    > Jeff
    Fawke101, Apr 2, 2004
    #4
  5. You should be able to find the syntax for Update and Insert in the searches
    Jeff mentioned. Just remember that Insert is for adding entire "new"
    records, while Update is to alter existing data.


    --

    Phillip Windell [MCP, MVP, CCNA]
    www.wandtv.com


    "Fawke101" <> wrote in message
    news:#...
    > Sorry,
    >
    > I know my way around in HTML and ASP to a certain extent.
    > Its just that i have never been in the situation to use INSERT statements.

    I
    > didnt know what was/was not good practise and how exactly the INSERT

    worked.
    > I am not a complete novice, just new to this function.
    >
    > Thanks anyhow, il have a look around
    >
    > --
    > Thanks in advance
    >
    > Fawke
    >
    > Please remove ANTI and SPAM
    > from my email address before emailing me.
    >
    > www.bradflack.com
    > "Jeff Cochran" <> wrote in message
    > news:...
    > > On Fri, 2 Apr 2004 10:50:35 +0100, "Fawke101"
    > > <> wrote:
    > >
    > > >I am new to ASP and i have really only been exposed to getting data

    from
    > a
    > > >SQL database and displaying it.
    > > >
    > > >I want to include a page in my application (like a form in Access i

    > guess)
    > > >with various text boxes and drop-downs + tick boxes.
    > > >Then i want to click a submit button that inserts the data (providing

    is
    > > >valid) into a SQL Server table.
    > > >
    > > >I have had a search in google but nothing seems to explain this in its

    > most
    > > >basic terms (errorchecking and inserting).
    > > >
    > > >Could anyone give me an example of this or some background about this
    > > >functionality.

    > >
    > > You need a better Google search then... )
    > >
    > > Start with a basic ASP database tutorial and a SQL tutorial. For the
    > > latter, use sqlcourse.com. For the former, Google "asp database
    > > tutorial" and start reading. When you have that down, start
    > > researching input error checking.
    > >
    > > You may also need some HTML tutorials if you don't understand forms.
    > >
    > > Jeff

    >
    >
    Phillip Windell, Apr 2, 2004
    #5
  6. Fawke101

    Jeff Cochran Guest

    On Fri, 2 Apr 2004 12:54:38 -0600, "Phillip Windell" <@.> wrote:

    >You should be able to find the syntax for Update and Insert in the searches
    >Jeff mentioned. Just remember that Insert is for adding entire "new"
    >records, while Update is to alter existing data.


    And one solution to that is to do an IF EXISTS on the record to choose
    whether to use an INSERT or UPDATE query. Books Online will give you
    the syntax if you decide to look in that direction, as well as syntax
    for the queries. The sqlcourse.com site covers each type of query
    very concisely and is easy to understand.

    Jeff
    Jeff Cochran, Apr 2, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. wjer
    Replies:
    0
    Views:
    2,024
  2. =?Utf-8?B?U2FuZHk=?=

    Checkboxlist - inserting values into tables

    =?Utf-8?B?U2FuZHk=?=, Feb 9, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    430
    =?Utf-8?B?U2FuZHk=?=
    Feb 9, 2005
  3. thersitz
    Replies:
    3
    Views:
    645
    thersitz
    Jan 31, 2007
  4. ebosysindia
    Replies:
    0
    Views:
    353
    ebosysindia
    May 8, 2009
  5. Joey Martin
    Replies:
    1
    Views:
    106
    Bob Barrows
    Jul 16, 2003
Loading...

Share This Page