What i must use to create this form?

Discussion in 'ASP .Net' started by marek zegarek, Oct 30, 2006.

  1. Hello!

    I have strange and simple problem....
    I am starting developer. I need to create webform, that will insert my data
    into SQL 2005 database.
    My idea is to make something like MS Access Form-Subform. I'm typing data,
    pressing "Add" and i see it on datagrid below. So I can type second datas,
    press "Add" and now i will see two records below.

    I'm using .NET (2.0), SQL 2005.

    My form have two regions on one page:
    - I - few texboxes, two dropdownlists (here are records from specific
    tables), one button "Add"
    - II - (here I need something like datalist), one button "Send to SQL"

    How should look that engine?
    I have ready:
    - region I with textboxes and SQLcommand, that is inserting records now
    into SQL database
    - dataset with datatables and relations between

    How to insert data into dataset and then insert it into datalist?
    What I must use?

    Thanks
    Leszek
     
    marek zegarek, Oct 30, 2006
    #1
    1. Advertising

  2. marek zegarek

    Jon Paal Guest

    on the post back use an sqlcommand to insert the data and another sqlcommqnd to requery the table to get the records desired and
    bind to the gridview









    "marek zegarek" <> wrote in message news:u0F7vWD$...
    > Hello!
    >
    > I have strange and simple problem....
    > I am starting developer. I need to create webform, that will insert my data into SQL 2005 database.
    > My idea is to make something like MS Access Form-Subform. I'm typing data, pressing "Add" and i see it on datagrid below. So I can
    > type second datas, press "Add" and now i will see two records below.
    >
    > I'm using .NET (2.0), SQL 2005.
    >
    > My form have two regions on one page:
    > - I - few texboxes, two dropdownlists (here are records from specific tables), one button "Add"
    > - II - (here I need something like datalist), one button "Send to SQL"
    >
    > How should look that engine?
    > I have ready:
    > - region I with textboxes and SQLcommand, that is inserting records now into SQL database
    > - dataset with datatables and relations between
    >
    > How to insert data into dataset and then insert it into datalist?
    > What I must use?
    >
    > Thanks
    > Leszek
    >
    >
     
    Jon Paal, Oct 31, 2006
    #2
    1. Advertising

  3. As I sad, I have form with few controls to type data.
    When I push button "Add", i want to add it to datalist. Not to the database.
    Then i need to add second, and third, and etc row with new data into this
    datalist.
    Then on finish will be button "Save" (for example), that will save all into
    database.

    How to add something to this datalist wiithout using sqlconnection?




    U¿ytkownik "Jon Paal" <Jon[ nospam ]Paal @ everywhere dot com> napisa³ w
    wiadomo¶ci news:u8ND2bK$...
    >
    > on the post back use an sqlcommand to insert the data and another
    > sqlcommqnd to requery the table to get the records desired and bind to the
    > gridview
    >
    >
    >
    >
    >
    >
    >
    >
    >
    > "marek zegarek" <> wrote in message
    > news:u0F7vWD$...
    >> Hello!
    >>
    >> I have strange and simple problem....
    >> I am starting developer. I need to create webform, that will insert my
    >> data into SQL 2005 database.
    >> My idea is to make something like MS Access Form-Subform. I'm typing
    >> data, pressing "Add" and i see it on datagrid below. So I can type second
    >> datas, press "Add" and now i will see two records below.
    >>
    >> I'm using .NET (2.0), SQL 2005.
    >>
    >> My form have two regions on one page:
    >> - I - few texboxes, two dropdownlists (here are records from specific
    >> tables), one button "Add"
    >> - II - (here I need something like datalist), one button "Send to SQL"
    >>
    >> How should look that engine?
    >> I have ready:
    >> - region I with textboxes and SQLcommand, that is inserting records now
    >> into SQL database
    >> - dataset with datatables and relations between
    >>
    >> How to insert data into dataset and then insert it into datalist?
    >> What I must use?
    >>
    >> Thanks
    >> Leszek
    >>
    >>

    >
    >
     
    marek zegarek, Oct 31, 2006
    #3
  4. marek zegarek

    Milsnips Guest

    Hi there,

    how about something like this:

    1. Create and populate a dataset object and bind it to the datalist control/
    2. When the user clicks ADD, read the new record values that were entered,
    and add a new DataRow to the dataset, then rebind the dataset again to the
    datalist control.

    3. When user clicks save, loop through the items in the dataset, and insert
    them all into the database.

    regards,
    Paul

    "marek zegarek" <> wrote in message
    news:erpWuQM$...
    > As I sad, I have form with few controls to type data.
    > When I push button "Add", i want to add it to datalist. Not to the
    > database.
    > Then i need to add second, and third, and etc row with new data into this
    > datalist.
    > Then on finish will be button "Save" (for example), that will save all
    > into database.
    >
    > How to add something to this datalist wiithout using sqlconnection?
    >
    >
    >
    >
    > U¿ytkownik "Jon Paal" <Jon[ nospam ]Paal @ everywhere dot com> napisa³ w
    > wiadomo¶ci news:u8ND2bK$...
    >>
    >> on the post back use an sqlcommand to insert the data and another
    >> sqlcommqnd to requery the table to get the records desired and bind to
    >> the gridview
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >> "marek zegarek" <> wrote in message
    >> news:u0F7vWD$...
    >>> Hello!
    >>>
    >>> I have strange and simple problem....
    >>> I am starting developer. I need to create webform, that will insert my
    >>> data into SQL 2005 database.
    >>> My idea is to make something like MS Access Form-Subform. I'm typing
    >>> data, pressing "Add" and i see it on datagrid below. So I can type
    >>> second datas, press "Add" and now i will see two records below.
    >>>
    >>> I'm using .NET (2.0), SQL 2005.
    >>>
    >>> My form have two regions on one page:
    >>> - I - few texboxes, two dropdownlists (here are records from specific
    >>> tables), one button "Add"
    >>> - II - (here I need something like datalist), one button "Send to SQL"
    >>>
    >>> How should look that engine?
    >>> I have ready:
    >>> - region I with textboxes and SQLcommand, that is inserting records now
    >>> into SQL database
    >>> - dataset with datatables and relations between
    >>>
    >>> How to insert data into dataset and then insert it into datalist?
    >>> What I must use?
    >>>
    >>> Thanks
    >>> Leszek
    >>>
    >>>

    >>
    >>

    >
    >
     
    Milsnips, Oct 31, 2006
    #4
  5. I made it 2 hours ago :)
    I didn't knew, how to do this, but now everything is ok :)

    I will use your 2) to rebind.

    Thanks Milsnips!

    U¿ytkownik "Milsnips" <> napisa³ w wiadomo¶ci
    news:uywVrjM$...
    > Hi there,
    >
    > how about something like this:
    >
    > 1. Create and populate a dataset object and bind it to the datalist
    > control/
    > 2. When the user clicks ADD, read the new record values that were entered,
    > and add a new DataRow to the dataset, then rebind the dataset again to the
    > datalist control.
    >
    > 3. When user clicks save, loop through the items in the dataset, and
    > insert them all into the database.
    >
    > regards,
    > Paul
    >
    > "marek zegarek" <> wrote in message
    > news:erpWuQM$...
    >> As I sad, I have form with few controls to type data.
    >> When I push button "Add", i want to add it to datalist. Not to the
    >> database.
    >> Then i need to add second, and third, and etc row with new data into this
    >> datalist.
    >> Then on finish will be button "Save" (for example), that will save all
    >> into database.
    >>
    >> How to add something to this datalist wiithout using sqlconnection?
    >>
    >>
    >>
    >>
    >> U¿ytkownik "Jon Paal" <Jon[ nospam ]Paal @ everywhere dot com> napisa³ w
    >> wiadomo¶ci news:u8ND2bK$...
    >>>
    >>> on the post back use an sqlcommand to insert the data and another
    >>> sqlcommqnd to requery the table to get the records desired and bind to
    >>> the gridview
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>> "marek zegarek" <> wrote in message
    >>> news:u0F7vWD$...
    >>>> Hello!
    >>>>
    >>>> I have strange and simple problem....
    >>>> I am starting developer. I need to create webform, that will insert my
    >>>> data into SQL 2005 database.
    >>>> My idea is to make something like MS Access Form-Subform. I'm typing
    >>>> data, pressing "Add" and i see it on datagrid below. So I can type
    >>>> second datas, press "Add" and now i will see two records below.
    >>>>
    >>>> I'm using .NET (2.0), SQL 2005.
    >>>>
    >>>> My form have two regions on one page:
    >>>> - I - few texboxes, two dropdownlists (here are records from specific
    >>>> tables), one button "Add"
    >>>> - II - (here I need something like datalist), one button "Send to SQL"
    >>>>
    >>>> How should look that engine?
    >>>> I have ready:
    >>>> - region I with textboxes and SQLcommand, that is inserting records now
    >>>> into SQL database
    >>>> - dataset with datatables and relations between
    >>>>
    >>>> How to insert data into dataset and then insert it into datalist?
    >>>> What I must use?
    >>>>
    >>>> Thanks
    >>>> Leszek
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    marek zegarek, Oct 31, 2006
    #5
    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. Luis Esteban Valencia
    Replies:
    1
    Views:
    330
    intrader
    Jul 8, 2005
  2. gk
    Replies:
    5
    Views:
    973
  3. NeoGeoSNK
    Replies:
    25
    Views:
    961
    NeoGeoSNK
    Nov 24, 2006
  4. André
    Replies:
    2
    Views:
    773
    André
    Jun 23, 2008
  5. Matt
    Replies:
    1
    Views:
    164
    Brynn
    Jan 18, 2004
Loading...

Share This Page