Sign in to follow this  
Followers 0
Mirus

Array or list for database

6 posts in this topic

Hi, i'd like to create a script that create a sort of database. example: i have the code, the number of the product and a description. 

i want that after i write that, the first time, for one  product it will be saved in a database. so, when i'll write the same code it will appear in the list or in the array the description too. (in another cell/column) the number of product is everytime different. please give me some idea, thank you.

Share this post


Link to post
Share on other sites



If you're looking to create a db, take a look at the _SQLite functions in the help file. If you're planning on using an external data source such as SQL or Oracle, you can connect and run queries from your AutoIt script directly. That should give you some direction so you can figure out what you would like to do.

Try coming up with something on your own after reading through the help file. If you get stuck, feel free to post your script here and we can attempt to help.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

yes, i'll read the helpfile and i'll try on my own, i thought and i realized that:

in the imputbox i write the code, the script read the code and see if it is registered in a cell of excel, if it is not it will write that on the last cell of the array on excel (array.resize dim +1) . if it is registered it return on another col of the array the description wrote in excel. after that i'll transfer eveything in a new excel file for adding stuff and print it.

is that possible? im sure that the second part (when i put the array on excel) is possible. i dont want the code or somethjng like that, i'd want to know if it's possible and if you have any idea about that. Thank you.

Share this post


Link to post
Share on other sites

Hello Mirus,

all you suggested is possible, but I would not use Excel as a "temporary" storage to hold data and even look for the data. You could instead either use the tools JLogan mentioned or an internal 2-dimensional array (if you're not planing on storing the data longer than your program runs).

After you've finished entering all of your data you can use the internal _ExcelWrite* functions to fill a new Excel sheet or workbook.


Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post


Link to post
Share on other sites

If you're new to AutoIt3, I'd suggest you use an .ini file along with the Ini* native functions.

Put any reading and writing to/from ini file in function, then you only have to modify those functions if you want to change the way you store data.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

thank you to everyone, i'll try to writing something today and i'll post the result ;D

Share this post


Link to post
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
Sign in to follow this  
Followers 0