Jay Young Member Licensed User Longtime User Jul 17, 2015 #1 i am getting a (missing parameter) in the following sqlite insert into statement newID in int the rest of the variables are string SQLTASK.ExecNonQuery2("INSERT INTO eventbook VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)", Array As Object(newID, &"'"& StartTime, &"'"& EndTime, &"'"& lblMonth, &"'"& lblDay, &"'"& lblYear, &"'"& entSubject, &"'"& evtNotes, &"'"& usernameSCH &"'"&)) Last edited: Jul 17, 2015
i am getting a (missing parameter) in the following sqlite insert into statement newID in int the rest of the variables are string SQLTASK.ExecNonQuery2("INSERT INTO eventbook VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)", Array As Object(newID, &"'"& StartTime, &"'"& EndTime, &"'"& lblMonth, &"'"& lblDay, &"'"& lblYear, &"'"& entSubject, &"'"& evtNotes, &"'"& usernameSCH &"'"&))
E edgar_ortiz Active Member Licensed User Longtime User Jul 17, 2015 #2 Hi Jay, Your problem is that you only SEND two parameters (NewID and "a concatenation of data"), that's because "&" concatenates And consider : You Don't need to quote the parameters Regards, Edgar Upvote 0
Hi Jay, Your problem is that you only SEND two parameters (NewID and "a concatenation of data"), that's because "&" concatenates And consider : You Don't need to quote the parameters Regards, Edgar
mangojack Expert Licensed User Longtime User Jul 17, 2015 #3 Try this .. Code: Copy SQLTASK.ExecNonQuery2("INSERT INTO eventbook VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)", Array As Object(newID, StartTime, EndTime, lblMonth.Text, lblDay.Text, lblYear.Text, entSubject, evtNotes, usernameSCH )) As @edgar_ortiz stated with .ExecNonQuery2 you dont have to use quotes within the array. I am presuming lblMonth ... Day ...and Year are views , so you have to include the .Text property. Upvote 0
Try this .. Code: Copy SQLTASK.ExecNonQuery2("INSERT INTO eventbook VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)", Array As Object(newID, StartTime, EndTime, lblMonth.Text, lblDay.Text, lblYear.Text, entSubject, evtNotes, usernameSCH )) As @edgar_ortiz stated with .ExecNonQuery2 you dont have to use quotes within the array. I am presuming lblMonth ... Day ...and Year are views , so you have to include the .Text property.
Jay Young Member Licensed User Longtime User Jul 17, 2015 #4 thanks, I was trying to concatenate everything. Upvote 0