locked
Path Problem!!! RRS feed

  • Question

  • User-320330690 posted

    Hello Seniors..

    I Am Getting A Very Strange Problem

    Everything Was Fine Until I Edited Some Part Of My Project On VS 2010 Beta On My Laptop

    Now I Again Switched Back To My Developing System.(VS 2005).

    So Heres The Problem...

    My Connection String Is Like This

    string conn = (@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|test.mdb;Jet OLEDB:Database Password=123");

    Earlier It Was Working Fine And Was Reading Data From App_Data Folder

    Now Everytime It Gives Me Runtime Error

    Could not find file 'C:\Users\Stribon\Documents\test_be.mdb'.

    am i doing any mistake or any bug..

    earlier it was working fine

     

    Saturday, November 6, 2010 3:18 AM

Answers

  • User-320330690 posted

    Thanx Everyone For Replying, I Got The Solution

    Actually My Database Was Linked So It Was Always Pointing To Somewhere Else

    Now Ok 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, November 6, 2010 9:46 AM

All replies

  • User-1199946673 posted

    string conn = (@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|test.mdb;Jet OLEDB:Database Password=123");

    Earlier It Was Working Fine And Was Reading Data From App_Data Folder

     

    |DataDirectory| is ponting to the App_Data folder, but....

    'C:\Users\Stribon\Documents\test_be.mdb'

     I don't see the App_Data folder in this path!

    Saturday, November 6, 2010 7:06 AM
  • User-1199946673 posted

    string conn = (@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|test.mdb;Jet OLEDB:Database Password=123");

    Earlier It Was Working Fine And Was Reading Data From App_Data Folder

     

    |DataDirectory| is ponting to the App_Data folder, but....

    'C:\Users\Stribon\Documents\test_be.mdb'

     I don't see the App_Data folder in this path!

    Saturday, November 6, 2010 7:06 AM
  • User-320330690 posted

    i have also used the same connection string but its not pointing to App_Data folder

    istead of that its pointing to  'C:\Users\Stribon\Documents\test_be.mdb'

    note a "_be " extension has been added to filename

    hope now u understand my problem

    Saturday, November 6, 2010 7:13 AM
  • User-320330690 posted

    Please Someone Help, Its Really Very Urgent

    |DataDirectory| In Connection String Not Expanding To App_Data Folder, Its Pointing To

    'C:\Users\Stribon\Documents\test_be.mdb'

     

    Saturday, November 6, 2010 9:14 AM
  • User-320330690 posted

    Thanx Everyone For Replying, I Got The Solution

    Actually My Database Was Linked So It Was Always Pointing To Somewhere Else

    Now Ok 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, November 6, 2010 9:46 AM