passing parameters to tableadaptor from code

Hi All,

I have an app that updates an Access Database. I created an Update Command using the VE designer. In the filter column for the datacolumn I need to select - its an ID column - I wrote =rowindex. This is a variable that needs to be retrieved from code. Is there a way to pass this info from the application at runtime to the tableadaptor? Or must the Update command be built from within the code using querybuilder?

Thanks in advance.

Jeff

[471 byte] By [jeffg90] at [2007-12-24]
# 1
jeffg90 wrote:
Is there a way to pass this info from the application at runtime to the tableadaptor?

Yes, you can build the string with the neccessary criteria (see next question) or you can use the select method to filter the table

jeffg90 wrote:
Or must the Update command be built from within the code using querybuilder?

You can actually build the select command on the fly during runtime and then set that string = to the adapter.updatecommand.text

DMan1 at 2007-8-31 > top of Msdn Tech,Windows Forms,Windows Forms Data Controls and Databinding...
# 2
TABLEadapters don't have updatecommand.text. You are perhaps thinking of sqlDATAadapters. So the next question would be... how much of a mess is made mixing those two type of adapters together.
JeffofCompuPro at 2007-8-31 > top of Msdn Tech,Windows Forms,Windows Forms Data Controls and Databinding...