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. C#
  4. SQl Server express Edition

SQl Server express Edition

Scheduled Pinned Locked Moved C#
databasesql-serversysadmindata-structureshelp
2 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.
  • A Offline
    A Offline
    Agyeman
    wrote on last edited by
    #1

    I have posted this question before but didn't post the code. The thing is for some reason, i cannot programatically Insert new row or update the database. However, I could fill the dataset after manaually populating the database. Could any help me. The permissions are set right and the folder that contains the database file is also writable. thank you. below is what i have ProductItemDataSet = new DataSet.DatabaseDataSet.ProductItemTableDataTable(); DataSet.DatabaseDataSetTableAdapters.ProductItemTableTableAdapter ProdAdapter = new DataSet.DatabaseDataSetTableAdapters.ProductItemTableTableAdapter(); ProdAdapter.Fill(ProductItemDataSet); ProdAdapter.Insert("man", "mango", "mango tree", ""); The database is in project Dataset. And this code exist in a different project but references the Dataset project.

    Nana

    A 1 Reply Last reply
    0
    • A Agyeman

      I have posted this question before but didn't post the code. The thing is for some reason, i cannot programatically Insert new row or update the database. However, I could fill the dataset after manaually populating the database. Could any help me. The permissions are set right and the folder that contains the database file is also writable. thank you. below is what i have ProductItemDataSet = new DataSet.DatabaseDataSet.ProductItemTableDataTable(); DataSet.DatabaseDataSetTableAdapters.ProductItemTableTableAdapter ProdAdapter = new DataSet.DatabaseDataSetTableAdapters.ProductItemTableTableAdapter(); ProdAdapter.Fill(ProductItemDataSet); ProdAdapter.Insert("man", "mango", "mango tree", ""); The database is in project Dataset. And this code exist in a different project but references the Dataset project.

      Nana

      A Offline
      A Offline
      Alireza Loghmani
      wrote on last edited by
      #2

      Hello to Nana you must use this code in FormLoad event for fill dataset: prodadapter.fill(productitemdataset); and use this code for add a new row to db: ProductItemdataset.(TableName).AddNew(TableName)Row(field1,...); ProdAdapter.Update(ProductItemDataset); Good Luck. Editali (Alireza Loghmani):)

      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