Merci d'avance à celui qui sera m'en dire plus.
Bon Dimanche à toutes et tous.

Code : Tout sélectionner
Procedure DB_Init_Tables(); Init Tables
Protected plFile.l
Protected psSQLRequest.s
Protected psSQLError.s
Protected Buffer.s
Protected SNumFacture_0.s
UseSQLiteDatabase()
If FileSize(#PB_Compiler_FilePath+"Bot_Memory.sqlite") < 0
plFile = CreateFile(#PB_Any, #PB_Compiler_FilePath+"Bot_Memory.sqlite")
If plFile
CloseFile(plFile)
EndIf
EndIf
glDBSQLite = OpenDatabase(#PB_Any, #PB_Compiler_FilePath+"Bot_Memory.sqlite", "", "", #PB_Database_SQLite)
If glDBSQLite = 0
MessageRequester("Ancilla", DatabaseError())
End
Else ;If plFile
psSQLRequest = "CREATE TABLE IF NOT EXISTS contacts (" +
"IDcontacts INTEGER PRIMARY KEY AUTOINCREMENT Not NULL, " +
"nom TEXT," +
"prenom TEXT," +
"age TEXT," +
"yeux TEXT," +
"cheveux TEXT," +
"taille TEXT," +
"poids TEXT," +
"sexe TEXT," +
"peau TEXT," +
"sante TEXT," +
"tenue TEXT," +
"lien TEXT," +
"emploi TEXT," +
"aime TEXT," +
"deteste TEXT," +
"couleur_preferee TEXT," +
"plat_prefere TEXT," +
"boisson_preferee TEXT," +
"animal_prefere TEXT," +
"fleur_preferee TEXT," +
"caractere TEXT," +
"argent TEXT," +
"contact_photo BLOB," +
"smiley BLOB," +
"contact_photo_size INTEGER," +
"smiley_size INTEGER" +
")"
DatabaseUpdate( glDBSQLite, psSQLRequest)
psSQLError = DatabaseError()
psSQLRequest = "CREATE TABLE If Not EXISTS culture (IDculture INTEGER PRIMARY KEY, date TEXT, personnalite TEXT, titre TEXT, type TEXT, sujet TEXT)"
DatabaseUpdate( glDBSQLite, psSQLRequest)
psSQLError = DatabaseError()
psSQLRequest = "CREATE TABLE IF NOT EXISTS infos_bot (" +
"IDinfos_bot INTEGER PRIMARY KEY AUTOINCREMENT Not NULL, " +
"nom TEXT," +
"prenom TEXT," +
"age TEXT," +
"yeux TEXT," +
"cheveux TEXT," +
"taille TEXT," +
"poids TEXT," +
"sexe TEXT," +
"peau TEXT," +
"sante TEXT," +
"tenue TEXT," +
"lien TEXT," +
"emploi TEXT," +
"aime TEXT," +
"deteste TEXT," +
"couleur_preferee TEXT," +
"plat_prefere TEXT," +
"boisson_preferee TEXT," +
"animal_prefere TEXT," +
"fleur_preferee TEXT," +
"caractere TEXT," +
"argent TEXT," +
"contact_photo BLOB," +
"smiley BLOB," +
"contact_photo_size INTEGER," +
"smiley_size INTEGER" +
")"
DatabaseUpdate( glDBSQLite, psSQLRequest)
psSQLError = DatabaseError()
psSQLRequest = "CREATE TABLE IF NOT EXISTS langage (" +
"IDlangage INTEGER PRIMARY KEY AUTOINCREMENT Not NULL, " +
"mot TEXT," +
"def1 TEXT," +
"def2 TEXT," +
"def3 TEXT," +
"def4 TEXT," +
"def5 TEXT," +
"def6 TEXT," +
"def7 TEXT," +
"def8 TEXT," +
"def9 TEXT," +
"def10 TEXT," +
"syno1 TEXT," +
"syno2 TEXT," +
"syno3 TEXT," +
"syno4 TEXT," +
"syno5 TEXT," +
"syno6 TEXT," +
"syno7 TEXT," +
"syno8 TEXT," +
"syno9 TEXT," +
"syno10 TEXT," +
"antonyme TEXT," +
"genre TEXT," +
"mode TEXT," +
"temps TEXT," +
"groupe TEXT," +
"pronom TEXT," +
"m_f_n TEXT" +
")"
DatabaseUpdate( glDBSQLite, psSQLRequest)
psSQLError = DatabaseError()
; Il y a t'il eu une erreur ?
If psSQLError <> ""
MessageRequester("Ancilla - DB_Init_Tables()", psSQLError)
EndIf
EndIf