If all of the values are of numerical types such as int
, decimal
, bigint
, etc. then you don't need to enclose them in single quotes.
This code works (I just tested it)
dSQL = string.Format(
"INSERT INTO inventory ( id, pksize, Description, supplier_id, UnitCost, UnitList," +
" Qty, UPC, dept, subdept, upc_pack_size, supplier_item, bqu_id)" +
" VALUES ({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12})",
id, pksize, desc, supplierID, cost, list, qty, UPC, dept, subdept, UPCpkSize, supplierItem,
redemption);
You were missing the starting and closing braces in your code.