473,702 Members | 2,670 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mittels DataSet bzw. DataTable Daten von SQL Server nach Access importieren

Hi Leute,

hier mein kleines Problem:
Ich möchte die Tabellen eines SQL Servers auslesen und anschließend
die Daten der Tabellen in die Tabellen der Access Datenbank schreiben!
(Die Access Datenbank und die Tabellen sind vorhanden)
Doch irgendwie will das ganze einfach nicht funktionieren!! !

Vielleicht könnt ja Ihr mir irgendwie helfen.

MfG Martin

Mein Source:
//Get all User Tabels from the SQL server
DataSet dsGetAllSQLTabl es = new DataSet();
dsGetAllSQLTabl es = getSQLDataset(" SELECT Name FROM sysobjects WHERE
type = 'U' ORDER BY name");

//running through all tables
foreach (DataRow row in dsGetAllSQLTabl es.Tables[0].Rows)

Console.WriteLi ne("SELECT * FROM " + row["Name"].ToString());

DataTable dsGetAllTableCo ntent = new DataTable();
dsGetAllTableCo ntent = getSQLDataTable ("SELECT * FROM " +

//INSERT, UPDATE, DELETE the dataset of the Access database
//with the SQL Adapter
OleDbDataAdapte r adapterAccessTa ble = getAccessAdapte r("SELECT
* FROM " + row["Name"].ToString());
adapterAccessTa ble.Update(dsGe tAllTableConten t);

catch (Exception ex)
Console.WriteLi ne(ex.Message);

Sep 5 '06 #1
0 2480

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

Similar topics

by: Chet Cromer | last post by:
I have a table in my SQL Server that I am loading into a datatable. I am then saving the dataset that this table is a member of (it's the only table in the dataset) to an XML file so that I can use it offline in another part of my program. The code I use for this is: ds.WriteXML("c:\clients.xml") 'DS is my dataset object
by: JIM.H. | last post by:
Hello, Can I send a dataset as a parameter into stored procedure and import data to a table in the stored procedure? Thanks, Jim.
by: marcel.stallmach | last post by:
Hallo, ich bin ehrlich schon am verzweifeln. Ich habe eine lokale Anwendung (Access) von wo aus eine HttpSendRequest an eine Website gesendet wird. Im HttpSendRequest werden die Daten per POST übermittelt. Die Website die aufgerufen wird ist eine ASPX-Seite und soll nun die geposteten Daten auslesen.
by: Datatable Dataset Datagrid help | last post by:
Hi I am somewhat confused, I am new at VB.net I use XML data, I have a datagrid, I created a datatable so that I can create a custom format like true is this graphic false is this graphic and others. One of the custom format is as follows: dsmessages_dt.Columns.Add("Image", GetType(Image)) I had a problem of when I used a checkbox in the grid that was bound to the datatable that it would not update my dataset. So I created another...
by: P K | last post by:
Hello, I have a dataset which is already loaded with data in one table. so dataset.tables("data") exists and has data. Now, I have to add another table to the dataset. The source for this table is a XMLDoc. So I have the XML in a XMLDoc and I need to create a table in the dataset which would read xml from the XMLDoc . So in essence I need something like
by: mark blackall | last post by:
Hi all, I am new to vb.net and I am trying to use the vb.net components, rather than relying on the VB6 compatibility stuff with which I am more familiar. However, I seem to have fallen at the first hurdle. I have created a dataset linked to a single SQL table and would like to iterate through the records in it, it, changing one of the fields as I go, but I can't seem to find a way of doing this. I guess all the records are in a...
by: Scotty | last post by:
I get stuck to write an update, insert and delete command, i am looking for some help to start Whats the best way to update 2 tables toe the database (Access) below my code used to load my data.(2 tables) Do someone has a good sample code to help me? Many thanks in advance, Marc.
by: Joseph Geretz | last post by:
I'm a bit puzzled by the current recommendation not to send Datasets or Datatables between application tiers. http://support.microsoft.com/kb/306134 http://msdn2.microsoft.com/en-us/library/ms996381.aspx Formerly, with classic Microsoft DNA architecture, the ADO Recordset was a primary transport medium, recommended for transmitting data between application tiers. In fact, there are whole books written on the subject.
by: creamy | last post by:
Hi Guys, There is the access DB, and the SQL server. I'm building an application that can insert a new person, and details, into a DB. (simple stuff?!) i'm however using a typed dataset created in visual studio to an OleDb datasource. i then use the insert function to try to insert into the DB. the problem is it keeps raising errors depending on the DB chosen (access or SQL) . if i create the dataset with access, it inserts only to...
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...
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...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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...
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();...
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...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.