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
4
votes
2 answers

Saving Dataset to database

I am trying to save a dataset to a database. I got a dataset from another class, Now changes will be made on the form by a user on a datagridview, then the changed Dataset needs to be saved in the database. I am using the below code; Its not…
Saad Farooq
  • 977
  • 2
  • 13
  • 26
4
votes
1 answer

How to get the executing SQL query from a table adapter?

Possible Duplicate: How to get the generated SQL-Statement from a SqlCommand-Object? I would like to know how to retrieve the SQL query that was executed by a Table Adapter for logging purposes. For example: Input: RandomTableAdapter…
Toret
  • 91
  • 1
  • 14
4
votes
2 answers

How to use Npgsql with TableAdapter in C#

I have PostgresQL database, and I develop interface application using C# and Npgsql to connect to the database, how can I assign the Npgsql connection to TableAdapter? Thanks,
Mark
4
votes
5 answers

DataGridView does not refresh after dataset update vb.net

I have a vb.net form with a dataGridView The dataGridView data source is the dgvTableAdapter with this sql statement SELECT membres.ID, membres.refere_par, bands.titre, membres_1.prenom & ' ' & membres_1.nom AS reference_nom FROM ((bands…
pec
  • 614
  • 3
  • 12
  • 28
3
votes
5 answers

How do designer-generated table adapters handle connections

How do table adapters make use of connections? To explain that a bit, do they automatically open and shut connections or if I already have the connection open before calling a tableadapter method, do they use it and leave it open? Regards
Ace Grace
  • 631
  • 1
  • 7
  • 21
3
votes
2 answers

Dataset: How to capture the primary key value returned by SELECT SCOPE_IDENTITY()?

I'm using a dataset. I have a table Adapter called PackageTableAdapter, which contains a method called InsertPackage. INSERT INTO [dbo].[Packages] ([UserID], [Name]) VALUES (@UserID, @Name) //Return the PackageID value for the newly created…
Richard77
  • 20,343
  • 46
  • 150
  • 252
3
votes
3 answers

C# - using TableAdapter to return a single value from stored procedure returns null

I do not understand but my stored procedure which I added to table adapter only returns null value. It is supposed to return a simple integer value. In the preview I had with data set desinger, I could clearly get the integer value that I wanted.…
SEA
  • 167
  • 2
  • 11
3
votes
2 answers

Object reference not set to an instance of an object when adding a table adapter

I successfully connected to my database, however I am not able to add a TableAdapter. Using TableAdapter Configuration Wizard I can use the query builder and everything seems fine, I can see the tables, retrieve the rows, everything. however when I…
A. Dravid
  • 43
  • 1
  • 4
3
votes
2 answers

How to get rid of strongly typed tableadapters and datatables

In our organization we are maintaining a VS 2005 website that relies heavily on strongly typed tableadapters and datatables. Needless to say that it is a maintainability nightmare for many reasons: To generate new table adapters we need to connect…
3
votes
6 answers

Last inserted record ID problems using typed DataSet and DataGridView

I'm using following for a simple database application: SQL Server Compact Edition .sdf file as database, with int primary key IDs. Typed DataSet and BindingSource as data access layer DataGridView for displaying data. My problem is, I'm having…
3
votes
5 answers

Unable to find connection 'MyConnName' for object 'Web.config' in Table Adapter configure Properties

I want to change the query in table adapter but it's not opening & throwing an error "Configure table Adapter Failed" & in property of connectionString it says "Unable to find connection 'ConnStringName' for object 'Web.config'. The connection…
ksrds
  • 136
  • 2
  • 16
3
votes
7 answers

Getting @@IDENTITY from TableAdapter

I am trying to complete a seemingly simple task that has turned into a several hour adventure: Getting @@Identity from TableAdapter.Insert(). Here's my code: protected void submitBtn_Click(object sender, EventArgs e) { …
P.Brian.Mackey
  • 43,228
  • 68
  • 238
  • 348
3
votes
2 answers

how to get the data from the tableAdapter

I'm using a dataset and web service and in my web service method I call and execute the procedures that I have created in the database so my question is I have the result from the database but I didn't know to use or call the data itself. how can I…
Nysa
  • 425
  • 1
  • 5
  • 14
3
votes
4 answers

Calling Oracle SP with TableAdapter very slow

I have a query that runs super fast when executed in the sql editor (oracle): 1ms. The same query (as stored procedure) when executed by a DataSet-TableAdapter takes 2 seconds. I'm just retrieving 20rows. Since I'm using a TableAdapter, the return…
Davide Vosti
  • 2,485
  • 2
  • 22
  • 31
3
votes
2 answers

ORA-01008: not all variables bound (in table adapter with parameterized query)

Environment: Visual Studio 2010 (.NET FrameWork 4) ASP.NET web Application Oracle Database using System.Data.OracleClient I have a web form where a user can enter any or no data into text boxes corresponding to each parameter in my query.if user…
elh4m v
  • 123
  • 1
  • 13
1
2
3
33 34