Questions tagged [tableadapter]

a .Net component, that fills a dataset with data from the database.

TableAdapter is a component, that fills a with data from the database.

505 questions
3
votes
1 answer

Paremeters in TableAdapter not accepted

I'm currently trying to set up my TableAdapters, but it doesn't allow me to use parameters (what makes it quite useless) - When I create a new Query SELECT users.* FROM users WHERE name LIKE @name It tells me there is a SQL-Error near…
F.P
  • 17,421
  • 34
  • 123
  • 189
3
votes
1 answer

Retrieving Data from a query on multiple tables in C#

Alrighty, so I have a C# program I'm working on and I'm running into a problem when trying to query my database. I have three tables (don't think about names, their generalized for the purpose of this question) - CUSTOMER, CUSTORD, &…
Nick Roberts
  • 245
  • 4
  • 12
3
votes
1 answer

C# TableAdapter doesn't insert and update

I have a database called DB.mdf, in my program I use this code to insert a new row in this database: DBDataSet ds = new DBDataSet(); DBDataSetTableAdapters.IPTableAdapter ipadap = new…
chianta
  • 123
  • 1
  • 2
  • 12
3
votes
1 answer

How To Set a Value to a TableAdapter Parameter

Goal I want to be able to have two ComboBoxes where one is the parent or owner of the second one. This means that whenever I select a value in the first ComboBox, the second ComboBox will filter it's results to display the corresponding values…
Alex
  • 4,821
  • 16
  • 65
  • 106
3
votes
0 answers

C# TableAdapter and SqlTransaction produces an error

it's been a long time since the last time I played with TableAdapter I want to use transactions, but that code generates an error Element ExecuteNonQuery requires the command to have a transaction when the connection assigned to the command is…
Tony
  • 12,405
  • 36
  • 126
  • 226
3
votes
3 answers

asp.net InsertCommand to return latest insert ID

I'm unable to retrieve the latest inserted id from my SQL Server 2000 db using a typed dataset in asp.NET I have created a tableadapter and I ticked the "Refresh datatable" and "Generate Insert, Update and Delete statements". This auto-generates the…
3
votes
5 answers

Strongly typed dataset wont fill, table mappings problem? c#.net 2.0

You've been excellent with my other questions previously - so here I am again, in need of some help! I've got a query which joins three tables and a strongly typed dataset which has the columns defined for everything which comes back from the query.…
Gareth
  • 624
  • 3
  • 10
  • 26
2
votes
2 answers

Modify TableAdapter Commands at Runtime

Is it possible to modify the SELECT, UPDATE, DELETE, and INSERT commands for a tableadapter at runtime? What I want to do is set the commands for the tableadapter based on the connection type (SQL Server or Access) the user selects when the…
user1297044
  • 21
  • 1
  • 3
2
votes
2 answers

Updating MS Access Database from Datagridview

I am trying to update an ms access database from a datagridview. The datagridview is populated on a button click and the database is updated when any cell is modified. The code example I have been using populates on form load and uses the…
Peter Roche
  • 335
  • 2
  • 6
  • 18
2
votes
1 answer

Access/Pass variable between windows form and DataSet TableAdapter SQL where clause

In Visual Studio 2010, I have a windows forms application frmMain.cs with a ComboBox. From the form itself I can access its value with cmbxYear.SelectedValue. I also have a DataSet.xsd file to bind to an rdlc report to a TableAdapter to present view…
Baxter
  • 5,633
  • 24
  • 69
  • 105
2
votes
1 answer

Is there any reason to dispose of a table adapter?

In many cases when working with different types of data objects it's important to dispose of them to make sure that they don't leave a database connection open. However, table adapters don't seem vulnerable to this problem because they are built on…
Paul Keister
  • 12,851
  • 5
  • 46
  • 75
2
votes
2 answers

Quick way to insert the same record as copy using Tableadapter

I have a datatable with a bunch of fields, and it's filled data by tableadapter. Usually, records that need to be inserted are a little bit different (only id). I don't want user to retypes everything again so, is there a quick way to insert current…
sovantha
  • 259
  • 3
  • 16
2
votes
2 answers

Relaxing Constraints for a data table adapter

I'm trying to relax my constraints while using a data table adapter, but I'm getting a Object reference not set to an instance of an object error. It happens on the line that says ds.DataSet.EnforceConstraints = false; Generally, I would like to…
Maxx
  • 3,925
  • 8
  • 33
  • 38
2
votes
1 answer

VB.NET: Why aren't BindingSources and TableAdapters working? DataAdapter alternative?

I've been working on a windows forms application, written in vb.net for several months now. I've had a LOT of problems with my binding sources and table adapters not updating the connected access (.accdb) database. Sometimes it works, sometimes it…
2
votes
1 answer

How to serialize .NET Table Adapter

I need to serialize a .NET table adapter. Serializing a data adapter and the data set is not a problem but i seem unable to serialize the table adapter. Looking at the type its typically specific to whatever you name it..like if i create a Invoice…
leifre
  • 35
  • 1
  • 1
  • 5
1 2
3
33 34