Jump to content

3.3.14.3 SQLite Error 2


Recommended Posts

I just upgraded to the new 3.3.14.3 yesterday and I am testing out my scripts that use SQLite since that had a change.

I can't seem to get even the simplest of scripts to work now.  I keep getting an error 2 with any Query.

I still have a standalone version of the 3.3.14.2 where this script works fine.

Any idea what needs to be changed to get this to work in the new version?

I even downloaded the most recent sqlite3.dll file from the link provided in the new help file.

 

#include <SQLite.au3>

FileInstall(".\Includes\SQlite3.dll", @TempDir & "\SQlite3.dll", 1)
$sMaskConn = @ScriptDir & "\SQLite_Test.db"


;Connect to the SQLite Db
    _SQLite_Startup(@TempDir & "\SQlite3.dll", False, 1)
    If @error Then
        ConsoleWrite("Error " & @error & " while connecting to SQLite database" & @CRLF)
        Exit
    EndIf
    $hMaskDB = _SQLite_Open($sMaskConn, $SQLITE_OPEN_READWRITE)
    If @error Then
        ConsoleWrite("SQLite Open Error = " & @error & ", Extended = " & @extended & @CRLF)
        Exit
    EndIf


;Find any records with missing data
    $sSQLite = "Select MaskID, Start_Dt from MaskData where ProdID is NULL"
    Local $hQueryRet, $aRow, $sMissingID, $aMissingID[0][2]

    _SQLite_Query($hMaskDB, $sSQLite, $hQueryRet)
    If @error Then
        ConsoleWrite("Query generated error " & @error & @CRLF)
        Exit
    EndIf

    While _SQLite_FetchData($hQueryRet, $aRow) = $SQLITE_OK
        If $sMissingID = "" Then
            $sMissingID = $aRow[0] & "|" & $aRow[1]
        Else
            $sMissingID &= @CRLF & $aRow[0] & "|" & $aRow[1]
        EndIf
    WEnd
    _SQLite_QueryFinalize($hQueryRet)
    _ArrayAdd($aMissingID, $sMissingID, 0, "|", @CRLF)

    _ArrayDisplay($aMissingID, "Missing ID's")

 

Attached the simple .db that i built for this sample script.

 

SQLite_Test.db

Link to comment
Share on other sites

  • Moderators

BigDaddyO,

It is a problem in _ArrayAdd - mea culpa. It is already fixed and you can download and replace the Array library as explained here:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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...