loading the data

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?QVZM?=

    loading the data

    Hi,
    I've a requirement to load the data froma csv file to sql server table
    programaticlly. .
    I'm working with .net 1.1..so i can't use sqlbulkcopy concept..

    which is the best approach to load the daat wrt performance...

    as of now, i'm planning to populate into a dataset and loop through the
    dataset
    record by record and update into the db..is there any other alternative?
  • George Ter-Saakov

    #2
    Re: loading the data

    If the CSV file on SQL Server then you can use BULK INSERT statement.
    Second option would be to use bcp utility and run it from your .NET
    application.

    It only makes sense if you have thousands of records. If you have not that
    many then simply loop through and use INSERT statement.

    Beware that your Sql Transaction Log file will grow very fast. And it might
    take a long time for SQL server since it needs to relocate (grow) Log file.
    So if you can set your Recovery option in DB (in Sql server) as Simple. Then
    Log file will not grow much.


    George


    "AVL" <AVL@discussion s.microsoft.com wrote in message
    news:80C4E381-5FED-4651-A2D2-94D3A324B67E@mi crosoft.com...
    Hi,
    I've a requirement to load the data froma csv file to sql server table
    programaticlly. .
    I'm working with .net 1.1..so i can't use sqlbulkcopy concept..
    >
    which is the best approach to load the daat wrt performance...
    >
    as of now, i'm planning to populate into a dataset and loop through the
    dataset
    record by record and update into the db..is there any other alternative?

    Comment

    Working...