Jump to content

SQLite semi Embedded database functionality in AutoIt


ptrex
 Share

Recommended Posts

I will like to work on an agreed version the post #108 does not work in my environnement XP/Sp2 Office XP.

I you can simplified the script that reproduce the problem that will help me. B)

hi,

did you change owc11 to owc10 in objcreate? - for Office Xp

best, randall

Link to comment
Share on other sites

@JPM

See my signature "Excel Grid in AutoIT" This is a symplified version of the problem.

Should run on all OFfice versions.

In the GUI there is an Excel Object when maximizing it jumps.

Also try clicking in the Object when maximized

@blink314

I changed the Excel Object create to be fixed numbers and it works but this is mildly distressing

The world isn' t perfect I know. But it works and you should only apple the fixed number approach to the Excel Object. The rest can stay as it is.

BTW did you apply tha other changes (GUICtrlSetStyle ( -1, $WS_VISIBLE )) to get the onject visible in the TABS ? And did it solve the problem ?

Link to comment
Share on other sites

Link to comment
Share on other sites

Yeah I got the excel object to work with tabs... but I think I'm going to leave it off the tabs for now. I went through and cleaned up the GUI code this morning. It doesnt look much different... just a little cleaner programmatically. This afternoon I plan on working on Views or storing SQL commands within the database.

Kevin

Link to comment
Share on other sites

ptrex or randallc: does the excelcom udf work through objects or are you still importing from excel via csv? The reason is I think i'm going to foget csv. Too many different formats and Excel doesnt support leading zeros well. (http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm#CSVAndExcel) How does the udf import?

Kevin

Link to comment
Share on other sites

I've added data logging to every major database change (SELECT's are not logged).

GUI still giving problems, but the underlying code seems to work. I had a little trouble with the SQL tab.

Kevin

As of 5:15PM EST, I uploaded a quick fix... there was a missing IF statment around line 1215 or so.

Database_1.au3

Edited by blink314
Link to comment
Share on other sites

Hi,

1. ExcelCOM I designed to work with object, so the routines buried inside are OK. [so csv is not "used"; just a save or open file option]

2. BUT, my philosophy was to access the object as though it were in autoIt", by using the workbook as a filename with a full path, so it won't work on your object as it stands.

3. i have adjusted the "ExcelGrid" of @ptrex to work with a filename, using embedded excelgrid (not owc, so 63000rows only), but needs modification of the ExcelCOM to accept it being open in 2 separate places at once; (crashes when it tries to set the window as visible in the hidden 2nd Excel . Application) - fixable, but not today!

Best, Randall)

Edited by randallc
Link to comment
Share on other sites

at least i managed to call sqlite3_open/close from autoit, i'm still haveing trouble calling sqlite3_get_table.

with these functions working basic sqlite usage is possible...

#include <array.au3>
; declare function sqlite3_open cdecl lib "sqlite3.dll" alias "sqlite3_open" (zFilename as asciiz, hDB as long) as long
$dll = DllOpen("sqlite3.dll")
if $dll == -1 Then
    ConsoleWrite("DLLOpen Error")
    Exit
EndIf
$r = DllCall($dll,"int","sqlite3_open","str","my.db","long_ptr",0)
if @error > 0 Then
    ConsoleWrite("Error: " & @error)
EndIf
_ArrayDisplay($r,"sqlite3_open")
DllClose($dll)

i have to look into more examples but this wont happen bevore weekend.

so everybody who is interested give it a try B)

CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map
Link to comment
Share on other sites

@blink314

the last version is giving an error in line 1518. COM error.

Sorry my fault no errors.

It' s nearly midnight I will give it a review tomorrow.

@picasso

If you use the search of this forum there is an other example of using DLL call with SQLite.

Maybe one of the references in my 1st post is linking this. They had the same problem you have.Never got it to work properly. Have a look this might help you out.

see you all tomorrow.

Edited by ptrex
Link to comment
Share on other sites

Hi,

See postb 132.

It looks as though it would be easy to let my commands use an object name interchangeably with filename if needed; let me know; though I'm not sure I would have any other circumstance where I would use that...

I looked at "SaveAs" from the GUI embedded sheet, to give it a filepath name, as a workaround, but it seems to mess up when saving from there.

Best, Randall

Link to comment
Share on other sites

@blink314

In my post 119 I asked you to add the "guictrlsetstyle(-1,$ws_visible)" for each control that is not showing correctly on the TABs to solve some GUI problems.

In your last version this is not done ?

Because so many changes and new functions are added, it might be a good idea to add some TO DO list in the 1st post. So that we all can keep track of where we are.

Do you agree on this ?

The TO DO list is 2 folded : one for the Bugs to fix, and an other for the features to add.

Let me know if you all agree and sent me an overview of bugs and future features to add.

Thanks

PS please add on line 152, 159 and 310 the command "guictrlsetstyle(-1,$ws_visible)" to solve the GUI problems.

Kevin the ListView for the NEW Fields is not showing, can you check if your dynamic Height, width etc is correct for this control.

Please upload the new version after modifying.

And could you add a version number in this variavble $GUIText = "SQLite GUI" like 1.3.2 or something so we can keep track of the changes.

Just some recommondations to keep life simple for everyone.

Till later

Some good scrores !!

Instead of always telling the bad things. This is what I realy like :

- The Excel COM seems to behave pretty well in the GUI. So I am more now in favour in the XLS com, than for the LV. (Good choise so far)

- Columns in the XLS com auto resize. Very nice, saves a lot of clicking

- Introduction of the SQL Log table. Realy clever thinking of you Kevin.

- What I also like is 1 XLS Grid for tables and for SQL queries. Very handy.

I still have a list of to do around but let first focus on problem solving.

Edited by ptrex
Link to comment
Share on other sites

I agree with most of what you said and will get around to it. Today will probably be a slow day SQLite-wise because we are moving one of the flight sims around base today. I will work on it where I can but make no promises.

THe ListView has not been touched since I added the ExcelCOM. Soon I will tackle getting it to work correctly. As far as bug/feature list... I wouldnt mind a consolidated bug list. Feature-wise we are approaching the end of the road for where I'm taking the currently implemented sections. Unless you start posting some of your ideas and I decide to implement them! Soon I will be working on the front end, which I cant promise will do what other people want it to do anyway.

One big area for me is making sure the SQL tab is fully functional. As long as this tab works as expected the user can do anything they want with the database.

Regarding the control issues, I thought you were only talking about the excel object. I'll go back and add to the others.

Kevin

Link to comment
Share on other sites

As far as bug/feature

I will start making a Bug and Feature list in post #1

I can only start adding/changing features if you formally stop developing. Because at the moment you take the lead and I follow. I you want me to add/change things, I need to take the lead and you follow.

This way I want to prevent that we end up with 2 different versions in this early stage.

One big area for me is making sure the SQL tab is fully functional

I did some advanced tests on it, and it all seems to work.

I am pleased to have you on the SQLite team, Kevin it's nice cooperating with you B)

Let me know what your next plan is, and we' ll take it from there.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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