this is so simple, but i keep getting "System Error". I have a simple multi-column table and i want to insert some file information into it.
temp = "INSERT INTO Versions ([Date],FileID,StorageLocation,ArchiveSize,LocalVersion,LastWriteTick)" +
" VALUES ('" + fi.LastWriteTime.ToString() +
"','" + fileID.ToString() +
"',@filename" + //filename +
",'" + fi.Length.ToString() +
"','" + localVersion.ToString() +
"','" + fi2.LastWriteTime.Ticks.ToString() +
cmd = new OdbcCommand(temp,cn);
System.Data.Odbc.OdbcParameter param = new OdbcParameter("@filename",OdbcType.Text,filename.Length);
param.Value = filename;
I wanted to use a parameter because I filename could potentially have single quote in it, which would mess up my commandtext.
I am also using the odbc because in the future i want to allow MSDE as well as Access.