-
October 18th, 2012, 12:00 PM
#1
How Big of a File Can I Process?
Hey everybody.
I'm looking into doing a project in which I would have to import some text files into a MSSQL database. I tried opening one of the files in notepad to take a look at its format and Notepad said it couldn't open it because it was too big. So I tried to open the file with WordPad and it's too big for WordPad I think because the blue busy circle spins forever. I had to run task mangager to stop WordPad, it turns out that WordPad was not responding. So too big for either app to open it seems. Looking at properties of the file, i see that the file size is 0.99 GB. Will I be able to import this file into a table with C#?
-
October 18th, 2012, 12:41 PM
#2
Re: How Big of a File Can I Process?
Take a look at the IO.Stream classes such as FileStream. I believe all the internal counters use Int64, which is very, very big (Int32 max = 2GB). We have used Stream classes on files over 2GB with no problems.
-
October 18th, 2012, 05:06 PM
#3
Re: How Big of a File Can I Process?
-
October 25th, 2012, 03:10 PM
#4
Re: How Big of a File Can I Process?
If you read a file as a stream, it can be as large as you like. I searched for a size limit to MS SQL's nvarchar, and couldn't find one.
When it comes to displaying your text, you will be limited unless the editor supports paging (not all of the file is held in memory at once). The RichTextBox control can hold about 2gb.
-
October 26th, 2012, 12:00 PM
#5
Re: How Big of a File Can I Process?
max indicates that the maximum storage size is 2^31-1 bytes (2 GB).
Ref from MSDN: char and varchar (Transact-SQL)
SQL storage is a different arena than IO.Stream.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|