sqldataadapter - Insert DataTable rows to DataBaseTables using DataAdapter: leave out one column in DataTable -


i have datatable named dtpurchaseproduct has columns

  • dtcolpurchaseproduct_no
  • dtcolninvoiceno
  • dtcolnproductno
  • dtcolnproductname
  • dtcolnquantity
  • dtcolnprice

these bound datagridview except dtcolnproductno because product names required seen

and have databasetable named purchaseproduct has columns

  • purchaseproduct_no
  • invoiceno
  • productno
  • quantity
  • price

now after allowing user add/update/delete datatable rows through textboxes want insert these rows databasetable dataadapter

is possible that? don't have select command , columns not same don't have database column dtlcolnproductname

string qry = "select * purchaseproduct 0 = 1";         sa = new sqldataadapter(qry, conn);         dataset = new dataset();         sa.fill(dataset);         dataset.tables[0].columns.add("dtcolnpurchaseproductproductname",typeof(string)); 

Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -