CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> .NET

 SqlBulkCopy count

Print topic Send  topic

Author Message
kescott


Posts: 49
Posted: 10/20/2008, 7:28 AM

I want to count the number of rows inserted in a SqlBulkCopy function.

Here's a code snippet, from

http://www.sqlteam.com/article/use-sqlbulkcopy-to-quick...t-to-sql-server

static void CopyData(DataTable sourceTable, SqlConnection destConnection)  
{  
    // new method: SQLBulkCopy:  
    using (SqlBulkCopy s = new SqlBulkCopy(destConnection))  
    {  
        s.DestinationTableName = "SalesCopy";  
        s.NotifyAfter = 10000;  
        s.SqlRowsCopied += new SqlRowsCopiedEventHandler(s_SqlRowsCopied);  
        s.WriteToServer(sourceTable);  
        s.Close();  
    }  
}


I want a label on my page to grab the value of the "s.SqlRowsCopied" to the label EmployeesRowsCopied.Text. Any ideas how this can be done?
_________________
B.S. of Computer Science
Class of 2005
Norfolk State University
Norfolk, VA
http://www.nsu.edu
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.