Announcement

Collapse
No announcement yet.

Suggestions about list's

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Suggestions about list's

    After almost completing my games catalogue with sqlite, I have found out that when you have built the apz you can’t save the .db file when you have Add, Edit or Delete an entry because the apz reads from Autoplay\\Docs every time it runs.
    I want to create a games list to catalogue all my games.
    How can I do this, I want to build the apz and be able to Add, Edit and Delete entry’s.

  • #2
    You'll need to use the App Data folders or the Program Data folders to store your database if you want it updateable.

    Comment


    • #3
      Originally posted by Shrek View Post
      You'll need to use the App Data folders or the Program Data folders to store your database if you want it updateable.
      Well he can use any folder what is view-able and writable by the standard user so I would say best bet what will work on all versions of windows so far is using the Document folder, Create a Folder in there like {SofwareName}/App Data/ well this is how I do it as I sometimes also cashe updates to this folder if there user changable changes like user based themes and so on, but ya using the Document folder is a good bet to be always acceable had problems with both App Data and Program Data folders on none admin accounts.

      Help File:
      PHP Code:
      My_Docs Shell.GetFolder(SHF_MYDOCUMENTS); 
      Plugins or Sources MokoX
      BunnyHop Here

      Comment


      • #4
        Thanks for the help

        I have changed the destination to

        C:\Users\Brian\Document\
        This is my code
        Code:
        ---- ORIGINAL ---- 
        if not Folder.DoesExist("C:\Users\Brian\Documents\Games")then
          Folder.Create("C:\Users\Brian\Documents\Games");
        end
        File.Copy("\\AutoPlay\\Docs\\GameList.db", "C:\Users\Brian\Documents\Games", true, true, false, true, nil);
        
        --My_Docs = Shell.GetFolder (SHF_MYDOCUMENTS
        
        sDatabaseFile = _SourceFolder .. "\\AutoPlay\\Docs\\GameList.db";

        Using the code above don't create Adding Shell get folder gives me an error and

        Also how would I do it so it saves to all users not just mine as

        C:\Users\Brian\Documents

        Comment


        • #5
          Please ignore my last post

          This is my new code I placed, It Creates the folder and copies the file there.
          It still don't Save if I Add, Edit or Delete entrys.

          PHP Code:
          if not Folder.DoesExist("C:\\Users\\Brian\\Documents\\My ZX Spectrum Catalogue Games")then
            Folder
          .Create("C:\\Users\\Brian\\Documents\\My ZX Spectrum Catalogue Games");
          end
          File
          .Copy("\\AutoPlay\\Docs\\GameList.db""C:\\Users\\Brian\\Documents\\My ZX Spectrum Catalogue Games"truetruefalsetruenil);
          My_Docs Shell.GetFolder(SHF_MYDOCUMENTS);

          sDatabaseFile _SourceFolder .. "\\AutoPlay\\Docs\\GameList.db"

          What am I doing wrong

          I also would like to set-up for all users not just me, what would the code be for that.

          Comment


          • #6
            Originally posted by kingzooly View Post
            Well he can use any folder what is view-able and writable by the standard user so I would say best bet what will work on all versions of windows so far is using the Document folder, Create a Folder in there like {SofwareName}/App Data/ well this is how I do it as I sometimes also cashe updates to this folder if there user changable changes like user based themes and so on, but ya using the Document folder is a good bet to be always acceable had problems with both App Data and Program Data folders on none admin accounts.

            Help File:
            PHP Code:
            My_Docs Shell.GetFolder(SHF_MYDOCUMENTS); 
            The folders I mentioned are in all Windows versions and that is the recommended way to store non user files because My Documents is for the users documents and it is rude to assume that the user would want you poking around in their own personal files muh the same way as your application pictures dont go in the users My Pictures.

            Comment


            • #7
              Originally posted by nitrobry View Post
              I also would like to set-up for all users not just me, what would the code be for that.
              Then don't use the users My documents folder.

              Comment


              • #8
                Originally posted by Shrek View Post
                The folders I mentioned are in all Windows versions and that is the recommended way to store non user files because My Documents is for the users documents and it is rude to assume that the user would want you poking around in their own personal files muh the same way as your application pictures dont go in the users My Pictures.
                Like I said very clearly I had problems with both of them folders in the past so the document folder was a good means to work but he is saying he is having problems still so I don't know, need more details really.
                Plugins or Sources MokoX
                BunnyHop Here

                Comment


                • #9
                  I don't know why you had issues as Shell.GetFolder maps to the correct folder across Windows versions.

                  Comment


                  • #10
                    Originally posted by Shrek View Post
                    I don't know why you had issues as Shell.GetFolder maps to the correct folder across Windows versions.
                    It was not about that action it was them two folders you stated, it was back in early stages of win7 but since I had access problems I always use Documents folder now, it also shows the end user I not hiding any thing from them.
                    Plugins or Sources MokoX
                    BunnyHop Here

                    Comment


                    • #11
                      I've never had issues with accessing the App Data folders nor had issues working out where they are across different editions of Windows due to Shell.GetFolder dealing with it for me but it is rude to use the users documents folder as your dumping ground because you can't sort out folder permissions and it's not a recommended way of doing things.

                      Comment


                      • #12
                        Thank for the help but still have problems with it.
                        When I have built the application and run it. I add new entrys, close the application, and when I start the application again my new entry's are never saved.

                        I have tried different ways but cant figure it out.
                        When this has been corrected then my apz is finished.

                        Shrek can you take a look at my apz please.

                        Comment


                        • #13
                          Sure, attach it or PM it.

                          Comment


                          • #14
                            It really depends on what your app does, many games or tools these days do use the documents folder, deff you want to let the end user to be able to access the data outside your app, and just because you have not had a problem does not mean others don't.
                            Plugins or Sources MokoX
                            BunnyHop Here

                            Comment


                            • #15
                              Once again thanks for the help.
                              I now have it working.

                              Comment

                              Working...
                              X