I have an editable Datagrid on a form.
Currently the Datagrid is populated with the all the columns from a table. I only want to display two columns on the grid, however when I restrict the number of columns I can no longer save the details back to the database.
Is it possible to use a SQL Select statments and have an editable Datagrid?
sConnect = "Provider=MSDAORA.1;Password=gbs;User ID=gbs;Data Source=busd;"
OLEConn.ConnectionString = sConnect
cmd.Connection = OLEConn
mstrSQL = "SELECT GroupID, Category, PolicyId, BSDate, Rundate" & _
" FROM ""GBS"".tblDetContribCurrent Where " & _
"(GroupId = " & cGroupDetails.pstrGroupNo & ") "
cmd.CommandText = mstrSQL
da.SelectCommand = cmd
To Save Details
Dim s As OleDb.OleDbCommandBuilder
s = New OleDb.OleDbCommandBuilder(da)