Connection to DataBase

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • [Gho]

    #1

    Connection to DataBase

    Hi,
    I make a local database by using Access XP.
    I connect to this file by the following string:

    this.conStr = "Provider=Micro soft.JET.OLEDB. 4.0 ;data
    source= MyDa.mdb";

    What I have to do to be able to have a Password to this
    file, and how to open it ?
  • Andrew Gnenny

    #2
    Re: Connection to DataBase

    Hi,
    Your connection string will be like this:
    "Provider=Micro soft.JET.OLEDB. 4.0 ;data source= MyDa.mdb;User
    ID=someuser;Pas sword=somepassw ord;"
    --
    Andrew Gnenny
    pulsar2003@/no-spam/email.ru (Please remove /no-spam/ for reply)
    X-Unity Test Studio

    Bring the power of unit testing to VS .NET IDE


    "[Gho]" <yousefk@taux01 .nsc.com> wrote in message
    news:020a01c397 a6$66a68420$a00 1280a@phx.gbl.. .[color=blue]
    > Hi,
    > I make a local database by using Access XP.
    > I connect to this file by the following string:
    >
    > this.conStr = "Provider=Micro soft.JET.OLEDB. 4.0 ;data
    > source= MyDa.mdb";
    >
    > What I have to do to be able to have a Password to this
    > file, and how to open it ?[/color]


    Comment

    • [Gho]

      #3
      Re: Connection to DataBase

      I get the following Error:
      "Cannot start your application. The workgroup information
      file is missing or opened exclusively by another.."
      Why?
      the database is closed befor running the application

      [color=blue]
      >-----Original Message-----
      >Hi,
      >Your connection string will be like this:
      >"Provider=Micr osoft.JET.OLEDB .4.0 ;data source=[/color]
      MyDa.mdb;User[color=blue]
      >ID=someuser;Pa ssword=somepass word;"
      >--
      >Andrew Gnenny
      >pulsar2003@/no-spam/email.ru (Please remove /no-spam/ for[/color]
      reply)[color=blue]
      >X-Unity Test Studio
      >http://x-unity.miik.com.ua/teststudio.aspx
      >Bring the power of unit testing to VS .NET IDE
      >
      >
      >"[Gho]" <yousefk@taux01 .nsc.com> wrote in message
      >news:020a01c39 7a6$66a68420$a0 01280a@phx.gbl. ..[color=green]
      >> Hi,
      >> I make a local database by using Access XP.
      >> I connect to this file by the following string:
      >>
      >> this.conStr = "Provider=Micro soft.JET.OLEDB. 4.0 ;data
      >> source= MyDa.mdb";
      >>
      >> What I have to do to be able to have a Password to this
      >> file, and how to open it ?[/color]
      >
      >
      >.
      >[/color]

      Comment

      • Andrew Gnenny

        #4
        Re: Connection to DataBase

        Hi,
        This error occurs when the application cannot find the System.mdw file. On
        Win2000 this file resides at
        Program Files\Common Files\System\
        This may help:
        1. Copy your System.mdw file into the application database folder

        - OR -

        2. Specify "Jet OLEDB:System Database" parameter in your connection string
        Jet OLEDB:System Database=C:\Pro gram Files\Common Files\System\SY STEM.MDW

        3. Optional. Specify the password for the system database
        Jet OLEDB:Database Password=12345

        --
        Andrew Gnenny
        pulsar2003@/no-spam/email.ru (Please remove /no-spam/ for reply)
        X-Unity Test Studio

        Bring the power of unit testing to VS .NET IDE


        "[Gho]" <yousefk@taux01 .nsc.com> wrote in message
        news:06bf01c397 e7$31592070$a00 1280a@phx.gbl.. .[color=blue]
        > I get the following Error:
        > "Cannot start your application. The workgroup information
        > file is missing or opened exclusively by another.."
        > Why?
        > the database is closed befor running the application
        >
        >[color=green]
        > >-----Original Message-----
        > >Hi,
        > >Your connection string will be like this:
        > >"Provider=Micr osoft.JET.OLEDB .4.0 ;data source=[/color]
        > MyDa.mdb;User[color=green]
        > >ID=someuser;Pa ssword=somepass word;"
        > >--
        > >Andrew Gnenny
        > >pulsar2003@/no-spam/email.ru (Please remove /no-spam/ for[/color]
        > reply)[color=green]
        > >X-Unity Test Studio
        > >http://x-unity.miik.com.ua/teststudio.aspx
        > >Bring the power of unit testing to VS .NET IDE
        > >
        > >
        > >"[Gho]" <yousefk@taux01 .nsc.com> wrote in message
        > >news:020a01c39 7a6$66a68420$a0 01280a@phx.gbl. ..[color=darkred]
        > >> Hi,
        > >> I make a local database by using Access XP.
        > >> I connect to this file by the following string:
        > >>
        > >> this.conStr = "Provider=Micro soft.JET.OLEDB. 4.0 ;data
        > >> source= MyDa.mdb";
        > >>
        > >> What I have to do to be able to have a Password to this
        > >> file, and how to open it ?[/color]
        > >
        > >
        > >.
        > >[/color][/color]


        Comment

        • [Gho]

          #5
          Re: Connection to DataBase


          i copied the System10.mdw to my current directory.
          Whats wrong with the following?

          this.conStr = "Provider=Micro soft.JET.OLEDB. 4.0;Jet
          OLEDB:System Database= C:\\System10.md w; data source =
          C:\\SuperIO_Chi ps.mdb;UserID=M ySeflf;Password =MyPass;Workst
          ation ID=VL51het83rOI QQo";


          thanks
          [color=blue]
          >-----Original Message-----
          >Hi,
          >This error occurs when the application cannot find the[/color]
          System.mdw file. On[color=blue]
          >Win2000 this file resides at
          >Program Files\Common Files\System\
          >This may help:
          >1. Copy your System.mdw file into the application[/color]
          database folder[color=blue]
          >
          >- OR -
          >
          >2. Specify "Jet OLEDB:System Database" parameter in your[/color]
          connection string[color=blue]
          >Jet OLEDB:System Database=C:\Pro gram Files\Common[/color]
          Files\System\SY STEM.MDW[color=blue]
          >
          >3. Optional. Specify the password for the system database
          >Jet OLEDB:Database Password=12345
          >
          >--
          >Andrew Gnenny
          >pulsar2003@/no-spam/email.ru (Please remove /no-spam/ for[/color]
          reply)[color=blue]
          >X-Unity Test Studio
          >http://x-unity.miik.com.ua/teststudio.aspx
          >Bring the power of unit testing to VS .NET IDE
          >
          >
          >"[Gho]" <yousefk@taux01 .nsc.com> wrote in message
          >news:06bf01c39 7e7$31592070$a0 01280a@phx.gbl. ..[color=green]
          >> I get the following Error:
          >> "Cannot start your application. The workgroup[/color][/color]
          information[color=blue][color=green]
          >> file is missing or opened exclusively by another.."
          >> Why?
          >> the database is closed befor running the application
          >>
          >>[color=darkred]
          >> >-----Original Message-----
          >> >Hi,
          >> >Your connection string will be like this:
          >> >"Provider=Micr osoft.JET.OLEDB .4.0 ;data source=[/color]
          >> MyDa.mdb;User[color=darkred]
          >> >ID=someuser;Pa ssword=somepass word;"
          >> >--
          >> >Andrew Gnenny
          >> >pulsar2003@/no-spam/email.ru (Please remove /no-spam/[/color][/color][/color]
          for[color=blue][color=green]
          >> reply)[color=darkred]
          >> >X-Unity Test Studio
          >> >http://x-unity.miik.com.ua/teststudio.aspx
          >> >Bring the power of unit testing to VS .NET IDE
          >> >
          >> >
          >> >"[Gho]" <yousefk@taux01 .nsc.com> wrote in message
          >> >news:020a01c39 7a6$66a68420$a0 01280a@phx.gbl. ..
          >> >> Hi,
          >> >> I make a local database by using Access XP.
          >> >> I connect to this file by the following string:
          >> >>
          >> >> this.conStr = "Provider=Micro soft.JET.OLEDB. 4.0 ;data
          >> >> source= MyDa.mdb";
          >> >>
          >> >> What I have to do to be able to have a Password to[/color][/color][/color]
          this[color=blue][color=green][color=darkred]
          >> >> file, and how to open it ?
          >> >
          >> >
          >> >.
          >> >[/color][/color]
          >
          >
          >.
          >[/color]

          Comment

          Working...