473,394 Members | 1,699 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.

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 dsGetAllSQLTables = new DataSet();
dsGetAllSQLTables = getSQLDataset("SELECT Name FROM sysobjects WHERE
type = 'U' ORDER BY name");

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

try
{
Console.WriteLine("SELECT * FROM " + row["Name"].ToString());

DataTable dsGetAllTableContent = new DataTable();
dsGetAllTableContent = getSQLDataTable("SELECT * FROM " +
row["Name"].ToString());

//INSERT, UPDATE, DELETE the dataset of the Access database
//with the SQL Adapter
OleDbDataAdapter adapterAccessTable = getAccessAdapter("SELECT
* FROM " + row["Name"].ToString());
adapterAccessTable.Update(dsGetAllTableContent);

}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}

Sep 5 '06 #1
0 2466

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

Similar topics

3
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...
15
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.
1
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...
3
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...
3
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...
3
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...
2
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...
15
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 ...
1
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...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.