This is really driving me crazy... I do not see what my issue is.
data[] is an array of strings already specified.
private void updateDB(string[] data)
{
m_dbConnection = new SQLiteConnection("Data Source=MyGameList.sqlite;Version=3;");
m_dbConnection.Open();
SQLiteCommand command = new SQLiteCommand(@"Update gamelist set Name=@name, directory=@directory, url=@url, graphics=@graphics, graphicDrop=@graphicDrop, adapter=@adapter,
adapterDrop=@adapterDrop, resolution=@resolution, resolutionDrop=@resolutionDrop, x=@xr, y=@yr, windowBorderless=@windowBorderless,
OvrService=@OvrService, Aero=@Aero, Notes=@Notes where Name=@name", m_dbConnection);
command.Parameters.Add(new SQLiteParameter("@name", data[0]));
command.Parameters.Add(new SQLiteParameter("@directory", data[1]));
command.Parameters.Add(new SQLiteParameter("@url", data[2]));
command.Parameters.Add(new SQLiteParameter("@graphics", data[3]));
command.Parameters.Add(new SQLiteParameter("@graphicDrop", data[4]));
command.Parameters.Add(new SQLiteParameter("@adapter", data[5]));
command.Parameters.Add(new SQLiteParameter("@adapterDrop", data[6]));
command.Parameters.Add(new SQLiteParameter("@resolution", data[7]));
command.Parameters.Add(new SQLiteParameter("@resolutionDrop", data[8]));
command.Parameters.Add(new SQLiteParameter("@xr", data[9]));
command.Parameters.Add(new SQLiteParameter("@yr", data[10]));
command.Parameters.Add(new SQLiteParameter("@windowBoderless", data[11]));
command.Parameters.Add(new SQLiteParameter("@OvrService", data[12]));
command.Parameters.Add(new SQLiteParameter("@Aero", data[13]));
command.Parameters.Add(new SQLiteParameter("@Notes", data[14]));
try
{
command.ExecuteNonQuery();
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
m_dbConnection.Close();
}
I checked the spelling and format of each parameter and it still gives me:
Unknown Error:
Insufficient Parameters supplied to the command.
Thanks for any insight