Jump to content
Sign in to follow this  
1234hotmaster

need some SQLite help

Recommended Posts

1234hotmaster

hi guys im a newbie autoit user. i used to be a VB.NET and C# coder but when my friend interduced autoit to me i finally began to know those languages are null compared to autoit and autoit is for RAD just like delphi! <3

I used to have a program in VB.NET which was and is still my main project, and it uses SQLite.NET

i noticed autoit has SQLite support also so i thought why not migrate that project into autoit? :)

ive readed all the Autoit3Help.exe manual and searched the whole forum and did alot of googling yet i don't understand how to read a value...

the SQLite code to be executed in VB.NET was:

"SELECT Hash from DB WHERE Hash='" & MD5HASH($file) & "'"

which the MD5HASH generated MD5 checksum of a file. Thanks to the forum i was able to make the MD5 checksum working but the SQLite is all it remains...

can anyone please guide me? i started autoit yesterday and plan to learn it for the next 365 days :mellow:

PS: sorry if my english is bad *ashamed*

Edited by 1234hotmaster

Share this post


Link to post
Share on other sites
ProgAndy

Hello,

SQLite cann be accessed with SQLite.au3. The helpfile should conatain some examples :mellow:

MD5 can be created with Hex(_Crypt_HashFile($sFilePath, $CALG_MD5))


*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

Share this post


Link to post
Share on other sites
1234hotmaster

thanks soo much! but i already readed the examples they didn't help :mellow:

Share this post


Link to post
Share on other sites
1234hotmaster

can anyone help me? i've tried for 6 hours now i'm getting tired :mellow:

Share this post


Link to post
Share on other sites
ProgAndy

Post your code and ask specific questions. Your question is too generic for any other answer than "read the helpfile".


*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

Share this post


Link to post
Share on other sites
1234hotmaster

Excuse me if i made you mad... i'm just really tired of trying :)

This is my code:

dim $c
 _SQLite_startup(@WORKINGDIR & "\sqlite3.dll")
 _SQLite_open(@WORKINGDIR & "\database.sqlite", $SQLITE_OPEN_READWRITE)
_SQLite_Query(@WORKINGDIR & "\database.sqlite", "SELECT Hash FROM DB", $str)
While _SQLite_FetchData($c, 0) = $SQLITE_OK
 _GUICTRLLISTVIEW_ADDITEM($RESULTS, $c , -1, 0)
WEnd
 _SQLite_Close(@WORKINGDIR & "\database.sqlite")

sorry im just new to autoit and really confused i'll get used to it :mellow:

Edited by 1234hotmaster

Share this post


Link to post
Share on other sites
ProgAndy

No, you did not made me mad.

This is pretty much the example from the helpfile for _SQLite_FetchData. Use the example as a basis and experiment with it.

Add a database filename to _SQLite_Open, remove the _SQLite_Exec lines, modify the query ...

If you include SQLite.dll.au3, the DLL will be downloaded if it does not exist in @ScriptDir or @SystemDir


*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

Share this post


Link to post
Share on other sites
1234hotmaster

thanks for replying but the problem is that it's not returning any data. I don't know exactly how those functions and which of them return the Table's Data. I just know these are needed:

_SQLite_Startup
_SQLite_Open
_SQLite_Close

excuse me for taking your time i just need to know Which to use, _SQLite_Exec or _SQLite_Quary and how to use the 3rd perimeter.

Thanks in advance :mellow:

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.