Showing posts with label line. Show all posts
Showing posts with label line. Show all posts

Wednesday, March 28, 2012

Importing text file into database

Hello Everyone,

I would like to import a text file which contains one string (a large integer) per line not separated by commas or anything else except a carriage return. Does anyone know of an easy way to store this in a database file? I'm open to suggestions if there is more than one way to save this kind of information within a database. I have SQL server 2005 developer edition if that helps in any way. I'm also starting to learn about Linq so if there is some other way you would store this information for that purpose I would love to hear about that as well. C# code is preferable, but I can use the automatic translators if that's all you have. By the way, I'm a newbie to this subject (if you couldn't tell). Thanks in advance.

Robert

check out

- BCP

- Bulk Insert

|||

Your answer looks promising after a review of the information about it. I'll try it out and if it works then close this post. Thanks for your suggestion.

Robert

|||

Hello Everyone,

I did try this and I was amazed to find out that you can import plain text files straight into excel or access. Obviously with an access database in hand using it with SQL server 2005 should be straightforward. Thanks for your help.

Robert

Friday, March 23, 2012

Importing MS ACCESS db into MS Sql Server 2000

I have a ms access database on say c:\database.mdb
I have a sql server 2000 running too.
I want to use some command line tool , like isql or osql to convert this database into a sql sever database.
How can I achieve this ?
Thanks in advance.
Alok.You can use SQL server's DTS tool to import MS access database to SQL server.
If not you can use MS Access Upsizing wizard to upgrade to SQL server.|||As I mentioned , I need to do it through command line.
If you give me a sample code , that would be great.|||After creating the DTS package run DTSRUN utility from command prompt to execute the package. Refer to SQL server books online for DTS topics and DTSRUN topic for more information.