Click here to Skip to main content
15,889,651 members
Home / Discussions / C#
   

C#

 
AnswerRe: Calls a method c# Pin
Richard MacCutchan8-Apr-16 2:49
mveRichard MacCutchan8-Apr-16 2:49 
AnswerRe: Calls a method c# Pin
Rahul Hanumant Chavan8-Apr-16 21:31
professionalRahul Hanumant Chavan8-Apr-16 21:31 
QuestionSpeed up code Pin
GrooverFromHolland8-Apr-16 0:37
GrooverFromHolland8-Apr-16 0:37 
AnswerRe: Speed up code Pin
OriginalGriff8-Apr-16 1:12
mveOriginalGriff8-Apr-16 1:12 
AnswerRe: Speed up code PinPopular
Sascha Lefèvre8-Apr-16 1:20
professionalSascha Lefèvre8-Apr-16 1:20 
GeneralRe: Speed up code Pin
OriginalGriff8-Apr-16 1:34
mveOriginalGriff8-Apr-16 1:34 
GeneralRe: Speed up code Pin
GrooverFromHolland8-Apr-16 1:52
GrooverFromHolland8-Apr-16 1:52 
GeneralRe: Speed up code Pin
Sascha Lefèvre8-Apr-16 2:41
professionalSascha Lefèvre8-Apr-16 2:41 
To be honest, I didn't spend too much thought on the fact that you're using SqlCe. (If you're planning on using this application for several years you might want to consider using a different database because SqlCe is "in deprecation state", meaning that there won't be any new versions and support is running out soon-ish.)

I don't really know about the restrictions of SqlCe compared to SQL Server, but Google seems to tell me that SqlCe does not only not support bulk copy but also doesn't support batch statements, which I was originally thinking about. FYI, in "real" database systems you can execute multiple statements at once by sending them as one command-text ("batch"), separated with a semi-colon, e.g. this could be executed with a single command on SQL Server:
SQL
UPDATE myTable SET col1 = @p1 WHERE id = @p2;
UPDATE myTable SET col1 = @p3 WHERE id = @p4;
UPDATE myTable SET col1 = @p5 WHERE id = @p6;


But SqlCe should at least allow you to execute multiple commands (each with one update-statement) within one transaction, which would be the next best solution and should also speed up the process greatly so that you wouldn't have to resort to creating a separate thread for that.

I found two projects which might be helpful (though the former suggestion shouldn't be hard to implement):

1) SQL Compact Bulk Insert Library - Home[^] (Apparently only for inserting, not updating)

2) GitHub - lokiworld/Lyare.SqlServerCe.MultiQuery: An extension to the Microsoft SQL Server Compact Edition client library, which simulates the support of the multiple statements in a single command.[^]
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

GeneralRe: Speed up code Pin
Eddy Vluggen8-Apr-16 2:54
professionalEddy Vluggen8-Apr-16 2:54 
AnswerRe: Speed up code Pin
Gerry Schmitz8-Apr-16 7:24
mveGerry Schmitz8-Apr-16 7:24 
GeneralRe: Speed up code Pin
GrooverFromHolland18-Apr-16 23:59
GrooverFromHolland18-Apr-16 23:59 
GeneralRe: Speed up code Pin
Gerry Schmitz19-Apr-16 4:58
mveGerry Schmitz19-Apr-16 4:58 
AnswerRe: Speed up code Pin
Patrice T9-Apr-16 0:01
mvePatrice T9-Apr-16 0:01 
GeneralRe: Speed up code Pin
GrooverFromHolland9-Apr-16 1:56
GrooverFromHolland9-Apr-16 1:56 
GeneralRe: Speed up code Pin
Patrice T9-Apr-16 5:09
mvePatrice T9-Apr-16 5:09 
Question.NET Remoting connection timing out after many invocations Pin
RichardGrimmer7-Apr-16 20:30
RichardGrimmer7-Apr-16 20:30 
AnswerRe: .NET Remoting connection timing out after many invocations Pin
Richard Andrew x648-Apr-16 3:42
professionalRichard Andrew x648-Apr-16 3:42 
AnswerRe: .NET Remoting connection timing out after many invocations Pin
Dikshitar V.9-Apr-16 10:23
Dikshitar V.9-Apr-16 10:23 
QuestionLocal Service to monitor a folder on desktop Pin
Blubbo7-Apr-16 9:40
Blubbo7-Apr-16 9:40 
AnswerRe: Local Service to monitor a folder on desktop Pin
Richard Deeming7-Apr-16 10:25
mveRichard Deeming7-Apr-16 10:25 
GeneralRe: Local Service to monitor a folder on desktop Pin
Blubbo8-Apr-16 1:26
Blubbo8-Apr-16 1:26 
GeneralRe: Local Service to monitor a folder on desktop Pin
Richard Deeming8-Apr-16 1:46
mveRichard Deeming8-Apr-16 1:46 
GeneralRe: Local Service to monitor a folder on desktop Pin
Blubbo8-Apr-16 2:50
Blubbo8-Apr-16 2:50 
GeneralRe: Local Service to monitor a folder on desktop Pin
Eddy Vluggen8-Apr-16 2:57
professionalEddy Vluggen8-Apr-16 2:57 
GeneralRe: Local Service to monitor a folder on desktop Pin
Richard Deeming8-Apr-16 3:00
mveRichard Deeming8-Apr-16 3:00 

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.