Groups | Blog | Home
all groups > sql server programming > october 2004 >

sql server programming : How to import data from an Access-Database


nieurig
10/25/2004 11:06:03 PM
Hi Folks,
i need to copy data from a Access-Database to a SQL-Server-
Database. Using a C#-Programm (reading data with
OleDBDataReader and writing them with OleDbDataAdapter)
takes more than 3 hours. I need a quicker solution.

If i copy the data into Access by using

select * into newTable from oldTable

it runs only 1 minute.

Now like to connect SQL-Server to a Access-Database (not
Access to SQL-Server !!!) to get the data using the shown
statement. Into Access i could create a "linked table", to
get data from an external database.
How can I do this at SQL-Server?

Thanks in advance for any help.
biswajit das
10/25/2004 11:56:20 PM
Hi

you can use the DTS wizard or call through it from c#
programing.
it help you so fast and safe the data security
anonymous NO[at]SPAM discussions.microsoft.com
10/26/2004 1:27:25 AM
Thanks to all.

[quoted text, click to view]
Yes I will send the given Statement vom C# and now I know
what i have to send to the database.

Thanks a lot, your hint save a lot of time.
Dejan Sarka
10/26/2004 8:13:49 AM
[quoted text, click to view]

Check the linked servers, for example start with sp_addlinkedserver
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts
_sp_adda_8gqa.asp). You will find useful examples there.

--
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com

Uri Dimant
10/26/2004 8:19:33 AM
Hi
Another way is
SELECT *
FROM OPENDATASOURCE(
'Microsoft.Jet.OLEDB.4.0',
'Data Source="d:\northwind.mdb";
User ID=Admin;Password='
)...Customers






[quoted text, click to view]

AddThis Social Bookmark Button