Click here to Skip to main content
15,885,366 members
Home / Discussions / C#
   

C#

 
GeneralRe: Post-build event command line error Pin
Reddy Prakash18-Dec-08 0:23
Reddy Prakash18-Dec-08 0:23 
GeneralRe: Post-build event command line error Pin
moon_stick18-Dec-08 0:55
moon_stick18-Dec-08 0:55 
GeneralRe: Post-build event command line error Pin
benjymous18-Dec-08 1:31
benjymous18-Dec-08 1:31 
QuestionText rotation Pin
kk.tvm17-Dec-08 23:10
kk.tvm17-Dec-08 23:10 
AnswerRe: Text rotation Pin
#realJSOP17-Dec-08 23:27
mve#realJSOP17-Dec-08 23:27 
AnswerRe: Text rotation Pin
benjymous17-Dec-08 23:27
benjymous17-Dec-08 23:27 
AnswerRe: Text rotation Pin
dan!sh 17-Dec-08 23:43
professional dan!sh 17-Dec-08 23:43 
QuestionSqlBulkCopy Pin
Expert Coming17-Dec-08 23:00
Expert Coming17-Dec-08 23:00 
Not sure if it is a Sql issue or a syntax error of sorts so here it is.

I have a DataTable with a single column Player Name. It is filled with some 20,000 rows. I need to insert this into a Sql database.

I have a Sql database setup with a table called Unknown, it has 2 columns, an Indentity column ID, and a varchar(50) column Player Name.

I copied the data over one-by-one and it took like 15-30 minutes to do, not I am using SqlBulkCopy. The problem is, it simply isn't working. No error, no warnings, no nothing. I have SQL Profiler open and don't see it even hitting the database. Code is attached, what am I doing wrong?

SqlConnection connection = new SqlConnection(Properties.Settings.Default.TibiaSQLConnection);

            connection.Open();

            SqlBulkCopy copier = new SqlBulkCopy(connection);
            copier.BatchSize = 500;
            copier.NotifyAfter = 1000;
            copier.SqlRowsCopied += new SqlRowsCopiedEventHandler(copier_SqlRowsCopied);
            copier.DestinationTableName = "Unknown";
            copier.WriteToServer(dtUnknowns);

            copier.Close();
            connection.Close();


The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo

AnswerRe: SqlBulkCopy Pin
CodingYoshi18-Dec-08 3:25
CodingYoshi18-Dec-08 3:25 
GeneralRe: SqlBulkCopy Pin
Expert Coming18-Dec-08 11:24
Expert Coming18-Dec-08 11:24 
GeneralRe: SqlBulkCopy Pin
Expert Coming18-Dec-08 11:41
Expert Coming18-Dec-08 11:41 
QuestionText Diff library Pin
m-khansari17-Dec-08 22:30
m-khansari17-Dec-08 22:30 
QuestionXML DateTime, .NET DateTime and SQL DateTime troubles Pin
Andres Coder17-Dec-08 19:46
Andres Coder17-Dec-08 19:46 
AnswerRe: XML DateTime, .NET DateTime and SQL DateTime troubles Pin
PIEBALDconsult18-Dec-08 12:09
mvePIEBALDconsult18-Dec-08 12:09 
QuestionHow to control Ms Powerpoint 2007 Slide show using C# 3.5? Pin
salon17-Dec-08 19:40
salon17-Dec-08 19:40 
Question[Message Deleted] Pin
kirandilip17-Dec-08 18:44
kirandilip17-Dec-08 18:44 
AnswerRe: Check Date Difference Pin
Brij17-Dec-08 18:53
mentorBrij17-Dec-08 18:53 
GeneralRe: Check Date Difference Pin
Lev Danielyan17-Dec-08 19:02
Lev Danielyan17-Dec-08 19:02 
AnswerRe: Check Date Difference Pin
Lev Danielyan17-Dec-08 18:53
Lev Danielyan17-Dec-08 18:53 
QuestionHow to insert value in Database from dynamic textbox? Pin
developer.ravish17-Dec-08 17:59
developer.ravish17-Dec-08 17:59 
AnswerRe: How to insert value in Database from dynamic textbox? Pin
Christian Graus17-Dec-08 18:05
protectorChristian Graus17-Dec-08 18:05 
QuestionHiding query string in the url and how to make webiste which runs on https Pin
tauras8117-Dec-08 17:11
tauras8117-Dec-08 17:11 
AnswerRe: Hiding query string in the url and how to make webiste which runs on https Pin
Expert Coming17-Dec-08 17:25
Expert Coming17-Dec-08 17:25 
GeneralRe: Hiding query string in the url and how to make webiste which runs on https Pin
tauras8117-Dec-08 17:32
tauras8117-Dec-08 17:32 
GeneralRe: Hiding query string in the url and how to make webiste which runs on https Pin
N a v a n e e t h17-Dec-08 17:35
N a v a n e e t h17-Dec-08 17:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.