S
Stefan
Can someone possibly tell me why my delete statement in sql is not
deleting anything.
Table1:
CurUser | Inventory
John Stalls, Machine
John Stalls, Pinball
John Stalls, Golf
Harry Simpson, Tires
Harry Simpson, Boats
//--------------------------------------------------------------//
String FileName = System.IO.Directory.GetCurrentDirectory() +
"\\test.db";
string ConnectionString = string.Format(@"Data
Source={0};Version=3;New=False", FileName);
SQLiteConnection conn = new SQLiteConnection(ConnectionString);
conn.Open();
SQLiteCommand cmd = conn.CreateCommand();
cmd.CommandText = "DELETE FROM Table1 WHERE CurUser = John Stalls";
cmd.ExecuteNonQuery();
conn.Close();
//--------------------------------------------------------------//
My understanding is that when I execute the command, all the rown with
the user name "John Stalls" should be deleted. But actually nothing
happens when I issue the command.
Thanks
--
deleting anything.
Table1:
CurUser | Inventory
John Stalls, Machine
John Stalls, Pinball
John Stalls, Golf
Harry Simpson, Tires
Harry Simpson, Boats
//--------------------------------------------------------------//
String FileName = System.IO.Directory.GetCurrentDirectory() +
"\\test.db";
string ConnectionString = string.Format(@"Data
Source={0};Version=3;New=False", FileName);
SQLiteConnection conn = new SQLiteConnection(ConnectionString);
conn.Open();
SQLiteCommand cmd = conn.CreateCommand();
cmd.CommandText = "DELETE FROM Table1 WHERE CurUser = John Stalls";
cmd.ExecuteNonQuery();
conn.Close();
//--------------------------------------------------------------//
My understanding is that when I execute the command, all the rown with
the user name "John Stalls" should be deleted. But actually nothing
happens when I issue the command.
Thanks
--