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. How use sdf

How use sdf

Scheduled Pinned Locked Moved C#
question
4 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.
  • S Offline
    S Offline
    SajjadZare
    wrote on last edited by
    #1

    what's connection string for sdf file ?

    D 1 Reply Last reply
    0
    • S SajjadZare

      what's connection string for sdf file ?

      D Offline
      D Offline
      Dimitri Witkowski
      wrote on last edited by
      #2

      This [^] can help you

      See my article about Windows 7 Taskbar timer here on CodeProject

      S 1 Reply Last reply
      0
      • D Dimitri Witkowski

        This [^] can help you

        See my article about Windows 7 Taskbar timer here on CodeProject

        S Offline
        S Offline
        SajjadZare
        wrote on last edited by
        #3

        I used this connectionString "Data Source=|DataDirectory|TMCDataBase.sdf;Persist Security Info=False" Error : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

        D 1 Reply Last reply
        0
        • S SajjadZare

          I used this connectionString "Data Source=|DataDirectory|TMCDataBase.sdf;Persist Security Info=False" Error : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

          D Offline
          D Offline
          Dimitri Witkowski
          wrote on last edited by
          #4

          How did you initialize the connection? I think you have used this:

          conn = new SqlConnection("Data Source=|DataDirectory|TMCDataBase.sd;Persist Security Info=False");

          But the correct way is:

          conn = new SqlCeConnection("Data Source=|DataDirectory|TMCDataBase.sd;Persist Security Info=False");

          In order to use SqlCeConnection class, you should reference System.Data.SqlCe.dll.

          See my article about Windows 7 Taskbar timer here on CodeProject

          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