Jump to content

save\load persistent data


Recommended Posts

can you please give me your suggestions, based on your experience, for keeping/loading data to script.

already tried:

using excel files - working good but very slow

using txt files - very complicate to convert it to 2D array (but working fast ...) and save them again from 2D array.

i cant use external database because it should run on different computers.

those tables are small so every fast solution will do.

thanks!

Link to comment
Share on other sites

I don't understand. You are using excel and text files to store your data, but then you say you can't use an external database (which is what your excel and text files are).

You can either store your data in arrays, which are created in your computer's memory and will be lost when the program closes or you have to store the data in an external file.

Please explain how you want to proceed.

#include <ByteMe.au3>

Link to comment
Share on other sites

Switch to an SQLite database. They are interoperable on any hardware/software platform you can dream of, from smartphones to datacenters.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

thanks for reply!

i meant external database like SQL\mySQL, sorry for the mix up.

my goal is to load array from file edit it somehow (with gui) and save them back for future use.

can i use multiple ini files? or just one per script? because maybe this can be solution for me. (use iniread/iniwrite)

Link to comment
Share on other sites

SQLite is included in the AutoIt-distribution. It only needs a dll (available via sqlite.dll.au3) and the databse file, just read the helpfile.

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

thank you all,

i need only 4-5 tables contains 10 rows each (max) .

i don't think it worth using SQLite (base on the fact it will take me some time to learn how to use it) :huh2:

in additional there is no need to manipulate those rows only save them, and no connections between the tables.

Edited by hezi
Link to comment
Share on other sites

That doesn't matter how complex the beast is. SQLite is easy to use, doesn't need installation nor maintainance or orther administration, is safe, small, fast, reliable, portable, maintained and free for any use.

An SQLite DB is a single portable file you can carry on Unix-powered datacenters or your smartphone or your laptop. You can query/change it with either dedicated application(s) or third-party managers (my first choice is SQLite Expert )

You should give it a try rather than a bunch of unrelated files with ad hoc organization.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

That doesn't matter how complex the beast is. SQLite is easy to use, doesn't need installation nor maintainance or orther administration, is safe, small, fast, reliable, portable, maintained and free for any use.

An SQLite DB is a single portable file you can carry on Unix-powered datacenters or your smartphone or your laptop. You can query/change it with either dedicated application(s) or third-party managers (my first choice is SQLite Expert )

You should give it a try rather than a bunch of unrelated files with ad hoc organization.

thanks,

actually i started learning it and it not that complicate. it very easy,

I thought it require installation and extra configuration but i see it very simple and easy (for basic tasks ..open DB,read/write etc) im sure it has more complicate abilities but for now it will do

i got a good answer!

thanks!

Link to comment
Share on other sites

If you need some help getting the correct description for your tables, or for querying them, or for any other purpose you're not familiar with, just ask.

You know, an embedded DB engine like SQLite is a fantastic way to organize, store, query, update application-related data whatever the volume and constraints.

It's just a real pleasure to see it used because the vast majority of applications which would highly benefit of its unique characteristics use instead painful and/or buggy ways.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...