December 2012

Loading data from a file into a SQL Server table using C# classes SqlBulkCopy and StreamReader

By Nicholas Geiger One of the ways that data can be loaded from a file into SQL Server is to create a .NET application that uses the C# classes SqlBulkCopy and StreamReader. Below is an example of how. This application gets multiple lines of data from the file Data.txt and uploads them to the SQL […]

Read more →

Inserting with C# Gridview

By Nicholas Geiger As many may have learned, the GridView class in the .NET 3.5 framework has little support for inserting rows. I have not found any improvement in .NET 4.0 framework either. My solution for the .NET 4.0 framework is below. In the example, adding new rows can be initiated by clicking the Add […]

Read more →

ASP.NET Custom Pager

By Nicholas Geiger I find the GridView control to be quite useful. Yet, for larger tables of bindable data, I dislike the built-in pager that comes with the GridView control. The only method that I am aware of to get that pager to work properly is to supply it with all viewable results from the […]

Read more →

Passing Tables of Data Between SQL Server Procedures

By Nicholas Geiger In the past, I wanted to pass tables of data between SQL Server procedures. However, some of the methods that I found then were not ideal. For instances, it can be done using cursors, user defined table types, and XML variables. Yet all these had limitations that I disliked. XML variables requires […]

Read more →

T-SQL Function to Count Business Days

By Nicholas Geiger I imagine there are many companies that need to have code that determines a date that is so many business days after another date. I searched some of the web for such code, but what I found is either buggy code or code that used a potentially large data table to determine […]

Read more →

Getting ORA-8103 When Reading from a Cursor

I came across this when using Oracle’s partition exchange. After doing the partition exchange, I truncated the data from the now unnecessary table. However, we found in the application logs that at that time, an ORA-8103 was raised when reading from a cursor. ORA-08103 is “object no longer exists” which doesn’t seem to fit the […]

Read more →