Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Can we send a datagrid's records directly to the database?

Can we send a datagrid's records directly to the database?

Scheduled Pinned Locked Moved Visual Basic
questiondatabasehelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lavanya_satheesh
    wrote on last edited by
    #1

    hello all, this could be a stupid question. but for me it is a headache. i've been trying to do it for some time with no luck. i have got a datagrid with some data. i want to write the code to send the rows of data directly into a table on the click event of a button. how is this possible. if anyone knows how please do help me. thanks :rose:

    P 1 Reply Last reply
    0
    • L lavanya_satheesh

      hello all, this could be a stupid question. but for me it is a headache. i've been trying to do it for some time with no luck. i have got a datagrid with some data. i want to write the code to send the rows of data directly into a table on the click event of a button. how is this possible. if anyone knows how please do help me. thanks :rose:

      P Offline
      P Offline
      Pravin H
      wrote on last edited by
      #2

      First count the no of row in dataset dim rowno as integer = dataset.row.count for rowno = 0 to rowno 'creating a loop dim strval as string=datagrid.items(row#,coloum1).tostring dim insert as string = "insert into table(field)values(strval)'write the insert command here cmd1 = new oldbcommdbuilder(insert) cmd1.nonexecutereader next hope it helps you If you still have any questions let me know i will give you detailed explanation. take care Regards :-D

      L 1 Reply Last reply
      0
      • P Pravin H

        First count the no of row in dataset dim rowno as integer = dataset.row.count for rowno = 0 to rowno 'creating a loop dim strval as string=datagrid.items(row#,coloum1).tostring dim insert as string = "insert into table(field)values(strval)'write the insert command here cmd1 = new oldbcommdbuilder(insert) cmd1.nonexecutereader next hope it helps you If you still have any questions let me know i will give you detailed explanation. take care Regards :-D

        L Offline
        L Offline
        lavanya_satheesh
        wrote on last edited by
        #3

        hi, thanks for ur help. right now i am in another project team doing a project in asp.net. i will try out ur solution and let u know. thanks, lavanya

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups