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. Mobile Development
  3. Mobile
  4. mobile database connectivity

mobile database connectivity

Scheduled Pinned Locked Moved Mobile
helpcsharpdatabaselearning
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
    achari ravi
    wrote on last edited by
    #1

    heloo can anyone plz help me out in writing a code in c# to create a databse in mobile application iama a beginner thx. in advance bascially i got this but i getsa error in "da.Fill(dt)" stating that the database table craeted in c:/ inside my project is not valid i even started the ms avtive sync and emulator plz help me out public static string connectionString = ""; public static SqlCeConnection cn = null; public static SqlCeDataAdapter da = null; public static DataTable dt = new DataTable(); connectionString = "Data Source=c:\\My Documents\\Database.sdf" ; cn = new SqlCeConnection(connectionString); da = new SqlCeDataAdapter("SELECT * FROM Users", cn); da.Fill(dt); foreach (DataRow dr in dt.Rows) { listbox1.items.add(dr[0]); }

    M 1 Reply Last reply
    0
    • A achari ravi

      heloo can anyone plz help me out in writing a code in c# to create a databse in mobile application iama a beginner thx. in advance bascially i got this but i getsa error in "da.Fill(dt)" stating that the database table craeted in c:/ inside my project is not valid i even started the ms avtive sync and emulator plz help me out public static string connectionString = ""; public static SqlCeConnection cn = null; public static SqlCeDataAdapter da = null; public static DataTable dt = new DataTable(); connectionString = "Data Source=c:\\My Documents\\Database.sdf" ; cn = new SqlCeConnection(connectionString); da = new SqlCeDataAdapter("SELECT * FROM Users", cn); da.Fill(dt); foreach (DataRow dr in dt.Rows) { listbox1.items.add(dr[0]); }

      M Offline
      M Offline
      mac24nzmac24nz
      wrote on last edited by
      #2

      Try, da.Fill(dt,"Users"); Just a thought. Martin

      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