Simple question: path of My Storage

Discussion in 'Questions (Windows Mobile)' started by RB Smissaert, Dec 4, 2008.

  1. RB Smissaert

    RB Smissaert Well-Known Member Licensed User

    Just starting today with Basic4PPC and trying out the SQL sample app.
    I have put the SQLite database file (Northwind.sl3) in My Storage instead of the application folder (AppPath) and for some reason I can't access the file there:
    This is the code to open the SQLite connection:
    Con.Open("Data Source = " & "\My Storage" & "\SQLite\Northwind.sl3")
    But it doesn't recognize that path and consequently it makes a new SQLite file.
    I have run the Folder browser sample application to see how the path should be and that is as above. Any idea what I am doing wrong here?

    RBS
     
  2. RB Smissaert

    RB Smissaert Well-Known Member Licensed User

    Added info

    I forgot to say that I am coding for a Windows Mobile 6.1 (or 6.2?) phone the Samsung Omnia.

    RBS
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    It doesn't matter too much but instead of:
    Code:
    Con.Open("Data Source = " & "\My Storage" & "\SQLite\Northwind.sl3")
    You can write:
    Code:
    Con.Open("Data Source =  \My Storage\SQLite\Northwind.sl3")
    I recommend you to use an OpenDialog, manually choose the required file and see (with a msgbox) the exact path.
     
  4. RB Smissaert

    RB Smissaert Well-Known Member Licensed User

    Thanks, I have this all sorted now and it was a simple mistake not to copy all the compiled files every time. I only had copied the file SQL.exe and I understand now that I need to copy the dll and the config file as well after every re-compile.

    RBS
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice