473,385 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

how to pass parameters from Datagrid to OdbcCommands

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.
Nov 17 '05 #1
1 2058
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Eugene Turin" <tu*****@mail.ru> wrote in message
news:5e**************************@posting.google.c om...
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.

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Derek | last post by:
I have an aspx page where I use a reversebind and templates to edit the entire datagrid at one time. I added a textbox and button to change the parameter criteria and then rerun the databind2...
7
by: Zlatko Matić | last post by:
Let's assume that we have a database on some SQL server (let it be MS SQL Server) and that we want to execute some parameterized query as a pass.through query. How can we pass parameters to the...
0
by: Zlatko Matić | last post by:
Hi everybody! Recently I was struggling with client/server issues in MS Access/PostgreSQL combination. Although Access is intuitive and easy to use desktop database solution, many problems...
1
by: Dion Heskett | last post by:
How can I pass a Class as a parameter to in a method ? i.e. Private myMethod( string pram1, Classobject as pram2) { Classobject.DataSource = reader; Classobject.DataBind(); }
2
by: Quarantine | last post by:
I am still a noob at the whole .NET, but I have a question and hope someone can help me out. I am taking user input, then want to query a database and return the results to either a datagrid, or a...
1
by: Greg Reynolds | last post by:
Hi, I need to create datagrid hyperlink columns with multiple parameters in the URL. In my research on how to do this, it is recommended to create a template column which I have done. The code...
1
by: Mikey G | last post by:
Hi, I created a simple VB.NET 2003 application through Visual Studio that connects to a MySQL database and loads a table into a Dataset, and then displays that table information in a DataGrid on a...
2
by: rn5a | last post by:
A Form has a DataGrid & a Button. The DataGrid's ItemDataBound event calls a sub named 'BindData'. This sub first finds a Label which exists in the ItemTemplate of the TemplateColumn of the...
4
by: hirnis | last post by:
pls anyone tell me that how to pass more parameter into the datagrid with hyperlink column at client side because i required a value of the selected hyperlink cell for fetching another table and also...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.