🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.pl.comp.lang.csharp
Article #9938

Re: Odbc -> DataSet -> SqlClient

#9938
From: Grzegorz Danowski
Date: Thu, 10 Nov 2005 22:20
29 lines
1982 bytes
Użytkownik "Przemek" <psmolich@gazeta.pl> napisał w wiadomości 
news:dkvgo9$1nn$1@inews.gazeta.pl...
> Mam pytanie, jak poniższego DataSet'a utworzonego OdbcDataAdapterem (z 
> pliku tekstowego)
>
> OdbcConnection fileConn = new OdbcConnection(@"[...]");
> OdbcDataAdapter fileDA1 = new OdbcDataAdapter("SELECT [...]FROM `t1.txt`", 
> fileConn);
> OdbcDataAdapter fileDA2 = new OdbcDataAdapter("SELECT [...]FROM `t1.txt`", 
> fileConn);
> fileConn.Open();
> DataSet fileDS = new DataSet();

Dodaj tutaj jeszcze:
fileDA2.AcceptChangesDuringFill = false;
fileDA1.AcceptChangesDuringFill = false;

> fileDA1.Fill(fileDS, "Tabela_1");
> fileDA2.Fill(fileDS, "Tabela_2");
> fileConn.Close();
>
> wyeksportować do MSSQL Servera?

Teraz korzystając z drugiego DataAdaptera będziesz mógł wysłać dane do innej 
bazy (sprawdzone w praktyce). Ale zasadniczo do przenoszenie danych na SQL 
Server lepiej jest skorzystać z DTS-ów - będzie dużo szybciej.

Pozdrawiam
Grzegorz 
Technical Details
Message-ID: <dl0h3t$5tk$1@inews.gazeta.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
References: <dkvgo9$1nn$1@inews.gazeta.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: "Grzegorz Danowski" <gdn__na@serwerze__poczta.onet.pl>
Newsgroups: alt.pl.comp.lang.csharp
Subject: Re: Odbc -> DataSet -> SqlClient
Date: Thu, 10 Nov 2005 23:20:41 +0100
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 30
Message-ID: <dl0h3t$5tk$1@inews.gazeta.pl>
References: <dkvgo9$1nn$1@inews.gazeta.pl>
Reply-To: "Grzegorz Danowski" <gdn__na@serwerze__poczta.onet.pl>
NNTP-Posting-Host: ntwklan-62-233-197-214.devs.futuro.pl
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1131661245 6068 62.233.197.214 (10 Nov 2005 22:20:45 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Thu, 10 Nov 2005 22:20:45 +0000 (UTC)
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-Priority: 3
X-User: grzegorz_danowski
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit