If you open a very large file in Excel it might not open up fully. For instance, I tried opening up a .csv file of 480MB and which had 2.2M records it would not open up completely. The reason is Excel has a limit of 1,048.576 rows and 16, 384 columns it can have in a file.
I am trying to run Queries in MS SQL Server and it comes up with errors if I specify table names or column names in a different case. The query is case-sensitive….!!!!
We find both bool and Boolean types in C#. It just made me wonder if there is any difference between the two types. It appears there is no difference between the two as both Represent the Boolean Type. So bool is just an alias to the System.Boolean type.
If you are using the SQLCMD utility and want to avoid or suppress the column header in the output of SQL Script. You can do it just by setting the Variable SQLCMDHEADERS to -1 by default its 0
As you use StreamReader to manipulate Text files and read one line at a time using Readline() Method you might come across a situation where you are somewhere in the middle of the Stream say on the 5th line and want to go back to the begin of the Stream. You can do that using the Seek Method on the BaseStream of the StreamReader as in this example.
How to retrieve records from table which has null values.
Here is the Script which will list records which has null values for CountryID column.
select * from yourTable where CountryID is null
If I need to get a list of files of a particular type or extension in a given directory, how can I get that list using C# code. Here is an example where the code looks for files in the current directory with .txt extension and writes the list to the console.
Using StreamReader class in C# can be fun and very handy to do some important tasks. Here is an example which will help you to understand how to use the StreamReader to read through a text file and also write it to the console line by line.
Here is an example of using StreamReader and StreamWriter class in C# to Read a number of text files from the source location and writing the contents of all the text files into a single Final Large file.
1. How to get the Count of line Numbers in a file using StreamReader in C#
2. How to get Line Count of a File using StreamReader in C#