Mike I’m wondering why you don’t use the constants?
E.g.
[code]Sub EggProdTable_SQLInsert(inDateCollected as String, inNumOfEggsCollected as integer, inWhoCollectedEggs as string, inNameOfHen as string, inNestingBoxID as string)
Dim ThisDateIs as New Date
Dim SQLInsertStatement As String = “insert into EggProdTable (DateCollected,RecordDate,NumOfEggsCollected,WhoCollectedEggs,NameOfHenLaid,NestingBoxID) values (?, ?, ?, ?, ?, ?)”
Dim prepInsert As SQLitePreparedStatement = SQLiteDB.Prepare(SQLInsertStatement)
// Set Bind Mappings for DB Table Columns
Const DateCollected = 0
Const RecordDate = 1
Const NumOfEggsCollected = 2
Const WhoCollectedEggs = 3
Const NameOfHenLaid = 4
Const NestingBoxID = 5
prepInsert.BindType(DateCollected, SQLitePreparedStatement.SQLITE_TEXT)
prepInsert.BindType(RecordDate, SQLitePreparedStatement.SQLITE_TEXT)
prepInsert.BindType(NumOfEggsCollected, SQLitePreparedStatement.SQLITE_INTEGER)
prepInsert.BindType(WhoCollectedEggs, SQLitePreparedStatement.SQLITE_TEXT)
prepInsert.BindType(NameOfHen, SQLitePreparedStatement.SQLITE_TEXT)
prepInsert.BindType(NestingBoxID, SQLitePreparedStatement.SQLITE_TEXT)
// Use Passed Values to Submit into our Table
prepInsert.Bind(DateCollected, inDateCollected)
prepInsert.Bind(RecordDate, ThisDateIs.SQLDateTime)
prepInsert.Bind(NumOfEggsCollected, inNumOfEggsCollected)
prepInsert.Bind(WhoCollectedEggs, inWhoCollectedEggs)
prepInsert.Bind(NameOfHenLaid, idNameOfHen)
prepInsert.Bind(NestingBoxID, inNestingBoxID)
// Execute Prepared SQL Statements
prepInsert.SQLExecute
End Sub[/code]