[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Undefined SQLite error


Hello everyone,
I'm back with my gb.db2 error in one of my applications.
I've identified the function that's causing the problem in gb.db2, not
gb.db.
Here it is in full, so you can find it in the project code I'm
attaching.

First, the console view of SQL
QFont::fromString: Invalid description 'Noto Sans,11,-
1,5,400,0,0,0,0,0,0,0,0,0,0,1'
QFont::fromString: Invalid description 'Hack,11,-
1,5,400,0,0,0,0,0,0,0,0,0,0,1'
QFont::fromString: Invalid description 'Noto Sans,11,-
1,5,400,0,0,0,0,0,0,0,0,0,0,1'
QFont::fromString: Invalid description 'Noto Sans,11,-
1,5,400,0,0,0,0,0,0,0,0,0,0,1'
gb.db.sqlite3: PRAGMA empty_result_callbacks = ON
gb.db.sqlite3: PRAGMA full_column_names = ON
gb.db.sqlite3: SELECT * FROM hautparleur ORDER BY mms ASC
gb.db.sqlite3: SELECT * FROM hautparleur ORDER BY mms ASC
gb.db.sqlite3: PRAGMA empty_result_callbacks = ON
gb.db.sqlite3: PRAGMA full_column_names = ON
gb.db.sqlite3: SELECT * FROM hautparleur ORDER BY numero ASC
gb.db.sqlite3: SELECT * FROM hautparleur ORDER BY numero ASC
gb.db.sqlite3: PRAGMA empty_result_callbacks = ON
gb.db.sqlite3: PRAGMA full_column_names = ON
gb.db.sqlite3: SELECT * FROM hautparleur ORDER BY numero ASC
gb.db.sqlite3: SELECT * FROM hautparleur ORDER BY numero ASC
gb.sdl2.audio: warning: MOD support not available
gb.sdl2.audio: warning: FLAC support not available
gb.db.sqlite3: PRAGMA empty_result_callbacks = ON
gb.db.sqlite3: PRAGMA full_column_names = ON
gb.db.sqlite3: SELECT * FROM hautparleur ORDER BY numero ASC
gb.db.sqlite3: PRAGMA empty_result_callbacks = ON
gb.db.sqlite3: PRAGMA full_column_names = ON
gb.db.sqlite3: SELECT * FROM hautparleur ORDER BY numero ASC
gb.db.sqlite3: SELECT * FROM hautparleur ORDER BY numero ASC
gb.db.sqlite3: SELECT tbl_name FROM (SELECT tbl_name FROM sqlite_master
WHERE Type = 'table' UNION SELECT tbl_name FROM sqlite_temp_master
WHERE type = 'table')
gb.db.sqlite3: PRAGMA index_list('hautparleur')
gb.db.sqlite3: PRAGMA table_info('hautparleur')
gb.db.sqlite3: PRAGMA table_info('hautparleur')
gb.db.sqlite3: PRAGMA table_info('hautparleur')
gb.db.sqlite3: SELECT sql FROM sqlite_master WHERE type = 'table' AND
tbl_name = 'hautparleur'
gb.db.sqlite3: PRAGMA index_list('hautparleur')
gb.db.sqlite3: PRAGMA table_info('hautparleur')
gb.db.sqlite3: PRAGMA index_list('hautparleur')
gb.db.sqlite3: PRAGMA table_info('hautparleur')
gb.db.sqlite3: PRAGMA table_info('hautparleur')
gb.db.sqlite3: SELECT sql FROM sqlite_master WHERE type = 'table' AND
tbl_name = 'hautparleur'
gb.db.sqlite3: PRAGMA index_list('hautparleur')
gb.db.sqlite3: PRAGMA table_info('hautparleur')
gb.db.sqlite3: PRAGMA index_list('hautparleur')
gb.db.sqlite3: PRAGMA table_info('hautparleur')
gb.db.sqlite3: PRAGMA table_info('hautparleur')
gb.db.sqlite3: SELECT sql FROM sqlite_master WHERE type = 'table' AND
tbl_name = 'hautparleur'
gb.db.sqlite3: PRAGMA index_list('hautparleur')
gb.db.sqlite3: PRAGMA table_info('hautparleur')
gb.db.sqlite3: PRAGMA index_list('hautparleur')
gb.db.sqlite3: PRAGMA table_info('hautparleur')
gb.db.sqlite3: SELECT * FROM hautparleur ORDER BY numero ASC
gb.db.sqlite3: BEGIN
gb.db.sqlite3: COMMIT
gb.db.sqlite3: BEGIN
gb.db.sqlite3: COMMIT
gb.db.sqlite3: SELECT * FROM hautparleur ORDER BY numero ASC
gb.db.sqlite3: PRAGMA empty_result_callbacks = ON
gb.db.sqlite3: PRAGMA full_column_names = ON
gb.db.sqlite3: SELECT * FROM hautparleur ORDER BY numero ASC
gb.db.sqlite3: SELECT * FROM hautparleur ORDER BY numero ASC
gb.db.sqlite3: PRAGMA empty_result_callbacks = ON
gb.db.sqlite3: PRAGMA full_column_names = ON
gb.db.sqlite3: SELECT * FROM hautparleur ORDER BY numero ASC
gb.db.sqlite3: PRAGMA empty_result_callbacks = ON
gb.db.sqlite3: PRAGMA full_column_names = ON
gb.db.sqlite3: BEGIN
gb.db.sqlite3: DELETE FROM "maTable"
gb.db.sqlite3: COMMIT
gb.db.sqlite3: SELECT * FROM maTable
gb.db.sqlite3: BEGIN
gb.db.sqlite3: PRAGMA table_info('maTable')
gb.db.sqlite3: COMMIT
gb.db.sqlite3: BEGIN
gb.db.sqlite3: DELETE FROM "maTable"
gb.db.sqlite3: COMMIT

Some images :


The function that causes trouble :

Private Sub decoupeCalc()

Dim surf, epais As Float
Dim i As Integer
Dim angle As Float
Dim der As Integer
Dim largp, hautp, longLp, longHp As Float

epais = TextBox1.Value
nbrePl = Round(Xm / epais, 0)
TextBox3.Value = CInt(nbrePl)
rapp = CFloat(Val(TextBox2.text))

If db.Current.Opened = False Then
db.Current.Open
Endif

Try hResultat = DB.Current.Exec("SELECT * FROM maTable")

If Error Then
Message("Exec select * from maTable")
Endif

If hResultat.Count = 0 Then 'contrôle si base vide
' If hResultat.Available = False Then
'************ Champs de la base de données des planches pour un haut-
parleur ************
For i = 0 To CInt(nbrePl - 1)
db.Current.Begin
Try hResultat = DB.Current.Create("maTable") 'création de la table avec
ses infos
db.Current.Commit

If Error Then
Message("create maTable début de la boucle")
Endif

If m <> 1 Then
surf = MVar.sd * (Cosh(m * i * epais) + T * Sinh(m * i * epais))
Else
surf = MVar.sd / (Cosh(m * i * epais) + T * Sinh(m * i * epais))
Endif

hResultat!Planche = i
hResultat!Surf = CFloat(surf)
hResultat!Diametre = CFloat(((4 * surf / Pi()) ^ 0.5))
hResultat!Rayon = CFloat((((4 * surf / Pi()) ^ 0.5) / 2))
hResultat!Distance = i * epais
hResultat!Largeur = Sqr(surf / rapp) / 2
hResultat!Hauteur = Sqr(surf * rapp) / 2

If i = 0 Then
angle = ATan(CFloat(hResultat!Largeur) / epais)
hResultat!pasL = CFloat(hResultat!Largeur) / Sin(angle)
hResultat!pasH = CFloat(hResultat!Hauteur) / Sin(angle)
hResultat!longL = 0
hResultat!longH = 0
Else
angle = ATan((CFloat(hResultat!Largeur) - CFloat(largp)) / epais)
hResultat!pasL = (CFloat(hResultat!Largeur) - CFloat(largp)) /
Sin(angle)
angle = ATan((CFloat(hResultat!Hauteur) - CFloat(hautp)) / epais)
hResultat!pasH = (CFloat(hResultat!Hauteur) - CFloat(hautp)) /
Sin(angle)
hResultat!longL = CFloat(hResultat!pasL) + CFloat(longLp)
hResultat!longH = CFloat(hResultat!pasH) + CFloat(longHp)
End If

der = i
Try hResultat.Update()
If Error Then

Endif

Try hResultat = DB.Current.Exec("SELECT * FROM maTable") 'lecture base
pour récupération dernière info
If Error Then
Message("exec select")
Endif
largp = hResultat!Largeur
hautp = hResultat!Hauteur
longLp = hResultat!longL
longHp = hResultat!longH
Next

' dernière planche
Try hResultat = MConn.hConn.Create("maTable")
If Error Then
Message("create")
Endif
hResultat!Planche = der + 1
hResultat!Surf = CFloat(Sc)
hResultat!Diametre = CFloat(((4 * Sc / Pi()) ^ 0.5))
hResultat!Rayon = CFloat((((4 * Sc / Pi()) ^ 0.5) / 2))
hResultat!Distance = CFloat(Xm)
hResultat!Largeur = CFloat((((Sc / rapp) ^ 0.5) / 2))
hResultat!Hauteur = CFloat((((Sc * rapp) ^ 0.5) / 2))

angle = ATan((CFloat(hResultat!Largeur) - CFloat(largp)) / epais)
hResultat!pasL = (CFloat(hResultat!Largeur) - CFloat(largp)) /
Sin(angle)

angle = ATan((CFloat(hResultat!Hauteur) - CFloat(hautp)) / epais)
hResultat!pasH = (CFloat(hResultat!Hauteur) - CFloat(hautp)) /
Sin(angle)
hResultat!longL = CFloat(hResultat!pasL) + CFloat(longLp)
hResultat!longH = CFloat(hResultat!pasH) + CFloat(longHp)

Try hResultat.Update()
If Error Then
message("update")
Endif
Wait 0.5
DGV1Affichage()

Endif

If Error Then

Endif

Catch
Message.Error(Str(Error.Class) & ", code : " & Error.Code & ", " &
Str(Error.Backtrace) & " à " & Error.Where & " | " & Error.Text)

End

I do insist this works fine with gb.db and don't with gb.db2

-- 
Philippe Valarcher <philippe.valarcher@xxxxxxx>

PNG image

PNG image

Attachment: ProjetTest-1.2.4.tar.7z
Description: application/7z-compressed


Follow-Ups:
Re: Undefined SQLite errorJorge Carrión <shordi@xxxxxxxxx>
Re: Undefined SQLite errorBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>