473,394 Members | 1,742 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,394 software developers and data experts.

Mapping oledb data to odbc target


Given: Data.oledb source, and a Data.odbc target

The oledb data is read into a dataset.

(1)

Is there an easy way to copy that dataset to the target datasource ( I
can look through the dataset and do INSERT statements, but is there a
single command to copy the data to a table ) ?

(2)

Is there a dataset object for odbc ?

(3)

Does .net have a native ado.net interface to as/400/db2 databases?

--

Go SeaHawks! Beat Saints!
Nov 16 '05 #1
1 1383
> Is there an easy way to copy that dataset to the target datasource ( I
can look through the dataset and do INSERT statements, but is there a
single command to copy the data to a table ) ?
If you're talking One Sql Statement ---
<--- You'll need to write the oneshot command as the actual database
underlying the ODBC provider could be god knows what. Even then very few
databases support the ability to persist everything from a datatable like
structure into tables - Sql Server does - XML DML

Now if you're looking for a one shot command as far as your C# code goes

Create a new DataTable,
DataTable.ImportRow (From the other datatable in a loop)
DataAdapter.Update(thisnewDatatable)

<--- remember the above will use COmmandBuilder to generate your Sql - so it
won't be pretty and won't work in every single case on the planet (i.e. if
there are PK's missing or weird joins ).

(2)

Is there a dataset object for odbc ? Yes, System.Data.DataSet is not for a provider, it's common all over.
(3)

Does .net have a native ado.net interface to as/400/db2 databases? .... I think for Db2 it does, but I really don't know :-/// !! But there are
many other ultra smart folks on this group who will know for sure. How 'bout
google? :)
- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik


"Josef Schneider" <us*@cord.blah> wrote in message
news:34*************@individual.net...
Given: Data.oledb source, and a Data.odbc target

The oledb data is read into a dataset.

(1)

Is there an easy way to copy that dataset to the target datasource ( I
can look through the dataset and do INSERT statements, but is there a
single command to copy the data to a table ) ?

(2)

Is there a dataset object for odbc ?

(3)

Does .net have a native ado.net interface to as/400/db2 databases?

--

Go SeaHawks! Beat Saints!

Nov 16 '05 #2

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

Similar topics

2
by: J. Marshall Latham | last post by:
I have a simple page trying to enter three pieces of information into a database using ODBC on a web site that has .NET Framework 1.0, so I have to use this Microsoft.Data.Odbc.dll which has been...
1
by: Josef Schneider | last post by:
Given: Data.oledb source, and a Data.odbc target The oledb data is read into a dataset. (1) Is there an easy way to copy that dataset to the target datasource ( I can look through the...
1
by: Chak | last post by:
Does Dot Net have a OleDB data provider specific to DB2 ?
1
by: matt (ziba) | last post by:
using the Microsoft.Data.Odbc component instead of System.Data.Odbc how do u get a row count using the Microsoft.Data.Odbc.OdbcDataReader ?? and is it best to use Microsoft.Data.Odbc OR...
0
by: Andy Lee | last post by:
System.Data.Odbc namespace is only available in .NET framework 1.1 while Microsoft.Data.Odbc is available in .NET framework 1.0. I heard that the System.Data.Odbc is exact the same as...
1
by: Brian Henry | last post by:
I have an access database, and one of the fields in the table I am inserting into has a date/time data type. What is the correct OleDb data type to insert the date and time that it is at the moment...
0
by: Brian Hanson | last post by:
Hi, I have an unusual problem that just showed its ugly head at a pretty bad time. I have an asp.net (VB) app that takes data from an Excel sheet and puts it into SQL Server. I get the data...
3
by: Chris | last post by:
Hi all, I am trying to use System.Data.ODBC to insert a file into a binary field in SQL Server 2000. Now, before you yell at me, the reason I am doing this is that I am only writing intitial...
0
by: JeffP | last post by:
Error at Open() - Driver does not support this function I've tried the OLEdb driver with similar failure, different error but basically I cannot Open using the Foxpro driver(s) Any clues? ...
1
by: yimma216 | last post by:
Hi I have been trying to get the data display on the datagrid after selecting a customer. With the same connection it populates the selection right. But just do not seem to extract the following...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.