Application.StartupPath

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OuTCasT
    Contributor
    • Jan 2008
    • 374

    Application.StartupPath

    Hi Guys.

    Can anyone help me with a problem im having.

    I knw in access u can save your db into the application/bin folder and read and write straight to it in ur application

    I want to publish my application with the SQL database, right now i need to install sql express on the machine that i am installing the application because i cannot get the app to read the database that i have saved in the application/bin folder.

    can anyone help me out with how the connectionstrin g is surposed to look, ive been to www.connections tring.com but i dont find anyuthing there.
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    What's your apps? VB? Access? ASP?

    -- CK

    Comment

    • OuTCasT
      Contributor
      • Jan 2008
      • 374

      #3
      Originally posted by ck9663
      What's your apps? VB? Access? ASP?

      -- CK
      Windows app using sql database.

      [CODE=vb]Provider=Micros oft.Jet.OLEDB.4 .0; Data Source = c:\projects\vb1 \books.mdb"[/CODE]

      this is how i undestand how to connect using an access db and finding the location.
      how would i do this with sql ?

      i want to be able to publish the db with the application.... right now i have to install sql express on the clients machine for it to read and write to the db

      [CODE=vb]Data Source=[COMPUTER NAME]\SQLEXPRESS;Ini tial Catalog=ca2000; Integrated Security=True;P ooling=False[/CODE]

      how does one get it to point to the db in the application/bin folder so when we publish it we can write/read to the db.

      Comment

      • OuTCasT
        Contributor
        • Jan 2008
        • 374

        #4
        wouldnt it be something like this

        [CODE=vb]Provider=SQLOLE DB.1;Integrated Security=SSPI;P ersist Security Info=False;Init ial Catalog=ca2000; Data Source=C:\Users \user\Documents \Visual Studio 2008\Projects\C a2000WINversion \Ca2000WINversi on\bin\Debug\ca 2000.mdf[/CODE]

        Comment

        Working...