Re: How to import fixed-width text file(ragged right) in MS SQL 2005? C#.net handcode



Sundeep,

There are many ways to skin a cat. One of them executing command-line BCP
utility (http://msdn.microsoft.com/en-us/library/ms162802.aspx) from .net.
This is the fastest. Another is reading a file line by line in .net, parsing
it by character positions and writing to a table. There is also SSIS
approach.

Ilya


"Sundeep" <nospam@xxxxxxxxxxxxxxxxxx> wrote in message
news:9741a8cf-6cb5-49b5-8c54-1bcea882e140@xxxxxxxxxxxxxxxxxxxxx
i don't want any wizard system plz.. ,file has to be imported by a user
which has always same format so i need to do coding for that in C#.net(type
of software)

no bulkinsert can't i have string to string copy


From
http://www.developmentnow.com/g/98_2005_1_0_0_386543/How-to-import-fixed-width-text-file-in-MS-SQL-2000.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/


.



Relevant Pages

  • Re: Learning the fretboard..
    ... Sight reading at a higher level entails recognition of musical ... is your default handling of two whole steps along a string, ... -Start with a major triad, in root position, with the root on the ... There is only one way to play this triad. ...
    (rec.music.classical.guitar)
  • Re: Program slow. Garbage Collection
    ... the larger string I only had to build one string and call ToLoweron ... The three different possible approaches discussed so far -- "read the whole file", "read a line at a time as separate strings", "read a line at a time into a pre-allocated buffer" -- all have the bulk of their cost in the same thing: ... Reading a line at a time into separate strings does wind up creating a large number of individual strings. ... Also, these objects may survive long enough to wind up in the older generations of the heap; on the one hand, that alleviates the cost those objects cause for GC operations, but on the other hand you know for sure those objects are still going to get destroyed soon, so it'd be better for them to not wind up in the older generation where they may remain and cause increased memory pressure for a longer time. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Grab for Unix
    ... sat on the mat ... ate the cat ... When only cut-string1 is specified records containing that string mark ...
    (comp.os.vms)
  • Re: Grab for Unix
    ... ate the cat ... When only cut-string1 is specified records containing that string mark ... it sounds like something AWK should be able to handle quite easily. ...
    (comp.os.vms)
  • Re: Cross domain iframe access
    ... and WebKit do not allow to read back the `location' string value ... Such that any attempt to read the - toString - property, or if it can be read then to execute its value, may be the point at which a security exception is thrown. ... Other forms of direct access to the - location - object certainly can stand as a demonstration that reading its value is not subject to any security restrictions. ...
    (comp.lang.javascript)