Click here to Skip to main content
15,560,367 members
Home / Discussions / C#
   

C#

 
GeneralRe: Post-build event command line error Pin
Reddy Prakash18-Dec-08 1:23
Reddy Prakash18-Dec-08 1:23 
GeneralRe: Post-build event command line error Pin
moon_stick18-Dec-08 1:55
moon_stick18-Dec-08 1:55 
GeneralRe: Post-build event command line error Pin
benjymous18-Dec-08 2:31
benjymous18-Dec-08 2:31 
QuestionText rotation Pin
kk.tvm18-Dec-08 0:10
kk.tvm18-Dec-08 0:10 
AnswerRe: Text rotation Pin
#realJSOP18-Dec-08 0:27
mva#realJSOP18-Dec-08 0:27 
AnswerRe: Text rotation Pin
benjymous18-Dec-08 0:27
benjymous18-Dec-08 0:27 
AnswerRe: Text rotation Pin
dan!sh 18-Dec-08 0:43
professional dan!sh 18-Dec-08 0:43 
QuestionSqlBulkCopy Pin
Expert Coming18-Dec-08 0:00
Expert Coming18-Dec-08 0: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 4:25
CodingYoshi18-Dec-08 4:25 
GeneralRe: SqlBulkCopy Pin
Expert Coming18-Dec-08 12:24
Expert Coming18-Dec-08 12:24 
GeneralRe: SqlBulkCopy Pin
Expert Coming18-Dec-08 12:41
Expert Coming18-Dec-08 12:41 
QuestionText Diff library Pin
m-khansari17-Dec-08 23:30
m-khansari17-Dec-08 23:30 
QuestionXML DateTime, .NET DateTime and SQL DateTime troubles Pin
Andres Coder17-Dec-08 20:46
Andres Coder17-Dec-08 20:46 
AnswerRe: XML DateTime, .NET DateTime and SQL DateTime troubles Pin
PIEBALDconsult18-Dec-08 13:09
professionalPIEBALDconsult18-Dec-08 13:09 
QuestionHow to control Ms Powerpoint 2007 Slide show using C# 3.5? Pin
salon17-Dec-08 20:40
salon17-Dec-08 20:40 
Question[Message Deleted] Pin
kirandilip17-Dec-08 19:44
kirandilip17-Dec-08 19:44 
AnswerRe: Check Date Difference Pin
Brij17-Dec-08 19:53
mentorBrij17-Dec-08 19:53 
GeneralRe: Check Date Difference Pin
Lev Danielyan17-Dec-08 20:02
Lev Danielyan17-Dec-08 20:02 
AnswerRe: Check Date Difference Pin
Lev Danielyan17-Dec-08 19:53
Lev Danielyan17-Dec-08 19:53 
QuestionHow to insert value in Database from dynamic textbox? Pin
developer.ravish17-Dec-08 18:59
developer.ravish17-Dec-08 18:59 
AnswerRe: How to insert value in Database from dynamic textbox? Pin
Christian Graus17-Dec-08 19:05
mveChristian Graus17-Dec-08 19:05 
QuestionHiding query string in the url and how to make webiste which runs on https Pin
tauras8117-Dec-08 18:11
tauras8117-Dec-08 18:11 
AnswerRe: Hiding query string in the url and how to make webiste which runs on https Pin
Expert Coming17-Dec-08 18:25
Expert Coming17-Dec-08 18:25 
GeneralRe: Hiding query string in the url and how to make webiste which runs on https Pin
tauras8117-Dec-08 18:32
tauras8117-Dec-08 18: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 18:35
N a v a n e e t h17-Dec-08 18: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.