I have moved from VB6 to purebasic and am trying to write the contents of a editorgadget to a SQLite database the procedure I am using works , but when the editorgadget contains indented formated PB code (I am writing a code library) it does not insert into the database.
Also if I input the same code into the SQLite database externally the code saves in the database but is ignored when I load up in PB
I have been using PB for a week
I feel I am making a basic error so I hope someone can help.
Below is the procedure i am using to create the query to insert into the database...
Code: Select all
Procedure PMRecordInsert()
InsertCAT = "'" + GetGadgetText(#ComboBoxCATEGORY) + "',"
InsertDESC = "'" + GetGadgetText(#StringDESCRIPTION) + "',"
InsertCODE = "'" + GetGadgetText(#EditorCODE) + "'"
;Debug InsertCODE
UseSQLiteDatabase()
OpenDatabase(#Database, SQLiteDatabaseName$, User$, Password$)
PMinsertString = "insert into PBCodeData values(null," + InsertCAT + InsertDESC + InsertCODE + ")"
DatabaseUpdate(#Database, PMinsertString)
CloseDatabase(#Database)
ClearGadgetItemList(#ListIconSUMMARY)
;Debug PMinsertString
PMLoadDB()
EndProcedure
Advice greatly appreciated....
audio2
[edit by Rings, set codetags and a usefull topic]