how to pass parameters from Datagrid to OdbcCommands

E

Eugene Turin

I'm writing a simple app that acts with simple DBF table via
ODBCAdapter.
I've got the idea of working with DataGrid, DataDet and DataAdapter.
I connect to my Adapter DeleteCommand and AddComand.

I call an update method of adapter.
But how to pass the parameters from DataGrid to commands? They must
fill automatically by some way?

If I set parameters of commands mannually - it works fine.
 
N

Nicholas Paldino [.NET/C# MVP]

Eugene,

When you call Update on a DataAdapter that has a stored procedure as a
command, I believe that you can set a column mapping up (through the
TableMappings property, which exposes a DataTableMapping, which in turn
exposes the ColumnMappings property) which will map the stored procedure
parameter to the column in the data table.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top