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. Create database in windows mobile but dont create password

Create database in windows mobile but dont create password

Scheduled Pinned Locked Moved C#
databasehelp
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.
  • K Offline
    K Offline
    khosnur
    wrote on last edited by
    #1

    Create database in windows mobile but when i run doesn't create password so exception for password mismatch.If i Create database in windows mobile it works fine... How solve it... Plz Help me . this is my first project of windows mobile. Code is given below: DataTable dt = new DataTable("ServerSettings"); dt.ReadXmlSchema(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + ("\\ServerInformation.bin")); dt.ReadXml(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + ("\\ServerInformation.bin")); SqlCeReplication repl = new SqlCeReplication(); repl.InternetUrl = @"http://" + dt.Rows[0]["PCName"].ToString() +"/DBRestaurant/sqlcesa30.dll"; repl.Publisher = dt.Rows[0]["PCName"].ToString(); repl.PublisherDatabase = @"DBRestaurant"; repl.PublisherSecurityMode = SecurityType.DBAuthentication; repl.PublisherLogin = @"sa"; repl.PublisherPassword = dt.Rows[0]["PublicatrionPassword"].ToString(); repl.Publication = @"DBRestaurant"; repl.Subscriber = @"DBRestaurant"; repl.SubscriberConnectionString = @"Data Source=""My documents\DBRestaurant.sdf"";Password=" + dt.Rows[0]["SubscriptionPassword"].ToString() + ";Max Database Size=128;Default Lock Escalation =100;"; try { if(!System.IO.File.Exists("My documents\\DBRestaurant.sdf")) repl.AddSubscription(AddOption.CreateDatabase); repl.Synchronize(); } catch (SqlCeException e) { System.Windows.Forms.MessageBox.Show(e.ToString()); }

    H 1 Reply Last reply
    0
    • K khosnur

      Create database in windows mobile but when i run doesn't create password so exception for password mismatch.If i Create database in windows mobile it works fine... How solve it... Plz Help me . this is my first project of windows mobile. Code is given below: DataTable dt = new DataTable("ServerSettings"); dt.ReadXmlSchema(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + ("\\ServerInformation.bin")); dt.ReadXml(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + ("\\ServerInformation.bin")); SqlCeReplication repl = new SqlCeReplication(); repl.InternetUrl = @"http://" + dt.Rows[0]["PCName"].ToString() +"/DBRestaurant/sqlcesa30.dll"; repl.Publisher = dt.Rows[0]["PCName"].ToString(); repl.PublisherDatabase = @"DBRestaurant"; repl.PublisherSecurityMode = SecurityType.DBAuthentication; repl.PublisherLogin = @"sa"; repl.PublisherPassword = dt.Rows[0]["PublicatrionPassword"].ToString(); repl.Publication = @"DBRestaurant"; repl.Subscriber = @"DBRestaurant"; repl.SubscriberConnectionString = @"Data Source=""My documents\DBRestaurant.sdf"";Password=" + dt.Rows[0]["SubscriptionPassword"].ToString() + ";Max Database Size=128;Default Lock Escalation =100;"; try { if(!System.IO.File.Exists("My documents\\DBRestaurant.sdf")) repl.AddSubscription(AddOption.CreateDatabase); repl.Synchronize(); } catch (SqlCeException e) { System.Windows.Forms.MessageBox.Show(e.ToString()); }

      H Offline
      H Offline
      himanshu2561
      wrote on last edited by
      #2

      Wrong forum

      himanshu

      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