473,785 Members | 2,767 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

data adaptor not available

Since upgrading from .NET 2003 to .NET 2005, I've had a few problems
adjusting. One, I seem unable to get around is not having the
DataAdaptor available to me from the tool box. It appears I only have
DataSets and TableAdaptors available to me. In the code behind section,
I'm unable to update my information to the database simply because I
don't have the DataAdaptor.upd ate available to me. I attempted
TableAdaptor.up date() but can't seem to get the right parameters to
satisfy it. Has anyone used a method that works to update or add new
records using DataSets and TableAdaptors?

Nov 27 '05 #1
1 1334
Hi,

<bi*********@gm ail.com> wrote in message
news:11******** *************@g 44g2000cwa.goog legroups.com...
Since upgrading from .NET 2003 to .NET 2005, I've had a few problems
adjusting. One, I seem unable to get around is not having the
DataAdaptor available to me from the tool box. It appears I only have
DataSets and TableAdaptors available to me. In the code behind section,
I'm unable to update my information to the database simply because I
don't have the DataAdaptor.upd ate available to me. I attempted
TableAdaptor.up date() but can't seem to get the right parameters to
satisfy it. Has anyone used a method that works to update or add new
records using DataSets and TableAdaptors?


Yes.

First create a DataSource.
- Menu->Data->Show Data Sources->Add New DataSource
- Follow wizard
- You should end with one Typed-DataSet with one or more DataTable('s) and a
TableAdapter for each DataTable.

The Typed-DataSet is shown as a Data Source inside Data Sources window.
You can simple drag a DataTable onto a Form and everything will be setup on
the Form ( DataGridView, BindingNavigato r, BindingSource, TableAdapter,
DataSet). In the code view you should already see all steps required to
Fill and Update using a TableAdapter.

But you can offcourse do it entirely from code:
' Suppose you have a typed DataSet with one
' DataTable named Customers:

Dim ds As New NorthwindDataSe t
Dim ta As New CustomersTableA dapter

ta.Fill( ds.Customers )
ds.Customers.Ad dCustomersRow( "Name0", ".... " )
ds.Customers.Ad dCustomersRow( "Name2", ".... " )
ds.Customers.Ad dCustomersRow( "Name3", ".... " )
ds.Customers(0) .Name = "Name1"
ta.Update( ds.Customers )

An advantage of TableAdapter's is that they can have more then one select
query unlike DataAdapters. When you select a DataSet inside Data Sources
window and click the "show in DataSet designer" button, you can visually see
and configure all DataTable's and TableAdapter's.

TableAdapter's can also support direct update, eg:
CustomerTableAd apter.Insert( "Name4", "..." )

For more information, read:
http://www.msdn.microsoft.com/vbasic...wdtastvs05.asp

Note that you can still use the old DataAdapter/Connection objects from the
Designer, just right click the toolbox and select "Choose Items".

HTH,
Greetings


Nov 27 '05 #2

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

Similar topics

3
2269
by: Stanislaw Salik | last post by:
Hi, Lets suppose we want to use generic algotithms on collections of pointers (both raw and smart). For example, we want to sort a vector of (smart)pointers. We need a comparator that will take two pointers and return a bool. std::vector<std::string *> v; std::sort(v.begin(), v.end(), std::less<int>());
2
1439
by: Matthias | last post by:
Hi, again, I have a problem using containers of pointers (I'm near to the point to drop them alltogether and work on usual containers instead...). The problem is, if I want to perform some action on an element in a normal container (normal means everyhing-but-a-pointer), I can do something like this: for_each( coll.begin(), coll.end(), do_something );
3
2483
by: Matthias Kaeppler | last post by:
Hello, I need to sort a range of pointers with a predicate which applies to the pointees. I tried to use boost::indirect_iterator, however, this will sort the container with the pointees instead the one with the pointers: vector<int> coll; // ... vector<int*> ptrcoll; // ...
1
3301
by: Tony Johansson | last post by:
Hello! I'm reading about design pattern adaptor in the GOF book and there is something that sounds strange. When you use the adaptor design pattern you have these participants. *Target - defines the domain-specific interface that Client uses. * Client
0
2595
by: Tony Johansson | last post by:
Hello!! This is about the adaptor design pattern. If you use the class adaptor its easy to override. It says an object adaptor makes it harder to override Adaptee behavior. It will require subclassing Adaptee and making Adapter refer to the subclass rather then the Adaptee itself. What does this mean? Can you give some easy exaples if you have some?
1
1773
by: | last post by:
Greetings All, I'm trying to access a excel file using the odbc data adaptor but the tables arent showing up. I can get connected to the excel file using the Wizard but when I go to do the odbc adaptor no tables show up in the query wizard why is this? TIA
5
10904
by: Pankaj | last post by:
Hi i am inserting the data into database throught variables. On click event of button m using this code: Dim objCon As New OleDbConnection(CONNECTION) Dim objCmd As New OleDbCommand(SQL, objCon) SQL = "INSERT INTO linkinfo VALUES('" & Sno & "','" & Website & "','" & Path & "')" & _ "('" & Keywords & "','" & MeWebsite & "','" & MePath & "','" &
3
1959
by: PengYu.UT | last post by:
Suppose I want a ring_iterator, which is almost like the vector::iterator. But it will equals begin(), when it passed the end(). It is easy to write an adaptor for it. But I'm wondering if there is any publicly available code for it. Thanks, Peng
3
1338
by: iKiLL | last post by:
Hi all The Code is below but i will give you a brief over view first. I am using C#, SQL Mobile and the CF2.0 with Merge Replication. My Primary Keys are all "uniqueidentifier" types with default value of
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10329
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10092
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7500
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2880
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.