Hi,
Can someone please tell me why I am getting the following error: Error 1 - Unable to Prepare Statement
I have 2 properties in the window:
FinalHexadecimal As String
FinalRgb As String
Hers is my code to insert into the database:
[code] // SET THE VARIABLE VALUES
FinalHexadecimal = ("&c" + ColoursWindow.Hex1Field.text + ColoursWindow.Hex2Field.text + ColoursWindow.Hex3Field.text)
FinalRgb = “RGB(” + ColoursWindow.RField.text +"," + ColoursWindow.GField.text + “,” + ColoursWindow.BField.text + “)”
// PREPARE THE STATEMENT
Dim ps As SQLitePreparedStatement = db.Prepare(“INSERT INTO Colours (Hex, Rgb) VALUES (?, ?);”)
// BIND THE VARIABLE’S VALUES
ps.BindType(0, SQLitePreparedStatement.SQLITE_TEXT)
ps.BindType(1, SQLitePreparedStatement.SQLITE_TEXT)
ps.Bind(0, FinalHexadecimal)
ps.Bind(1, FinalRgb)
// INSERT THE VALUES INTO THE DATABASE
ps.SQLExecute[/code]
Could it be something to do with the “id” Primary Key Integer NOT NULL ?
Here is a screenshot of my database:
Thank you all in advance.