Results 1 to 4 of 4

Thread: OLEDB connection string problem pls help

  1. #1

    Thread Starter
    Addicted Member CoMMiE's Avatar
    Join Date
    Jul 2000
    Location
    Malaysia, Kuala Lumpur
    Posts
    179

    OLEDB connection string problem pls help

    Hi
    The following connection OLEDB connection string return an Error:

    Dim strConnection As OleDbConnection
    strConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source='"_
    & Environment.CurrentDirectory & "'\Test.mdb;")

    Can anyone please point out to me whats wrong?

    Thanks

  2. #2
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    hi

    Whats the error?

    perphaps shd try:

    Code:
    System.IO.Directory.GetCurrentDirectory.ToString

  3. #3
    Addicted Member
    Join Date
    Mar 2001
    Location
    Devon, UK
    Posts
    181
    Firstly you don't need to put your data source within ' '.

    strConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source= Environment.CurrentDirectory & "\Test.mdb;")
    Wind and waves resolves all problems.

  4. #4
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089
    missed that

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width