Click here to Skip to main content
16,003,319 members
Home / Discussions / C#
   

C#

 
GeneralRe: ReadFileEx OVERLAPPED LocalAlloc wows Pin
gdwinslow7-Jun-04 16:23
gdwinslow7-Jun-04 16:23 
GeneralRe: ReadFileEx OVERLAPPED LocalAlloc wows Pin
Heath Stewart8-Jun-04 2:55
protectorHeath Stewart8-Jun-04 2:55 
GeneralRe: ReadFileEx OVERLAPPED LocalAlloc wows Pin
Guy Winslow8-Jun-04 11:17
Guy Winslow8-Jun-04 11:17 
GeneralRe: ReadFileEx OVERLAPPED LocalAlloc wows Pin
Heath Stewart8-Jun-04 11:26
protectorHeath Stewart8-Jun-04 11:26 
GeneralRe: ReadFileEx OVERLAPPED LocalAlloc wows Pin
Guy Winslow8-Jun-04 12:42
Guy Winslow8-Jun-04 12:42 
GeneralRe: ReadFileEx OVERLAPPED LocalAlloc wows Pin
Heath Stewart8-Jun-04 17:15
protectorHeath Stewart8-Jun-04 17:15 
Generalsql server ce 2.0, image data type Pin
khchan7-Jun-04 6:45
khchan7-Jun-04 6:45 
GeneralRe: sql server ce 2.0, image data type Pin
Heath Stewart7-Jun-04 6:51
protectorHeath Stewart7-Jun-04 6:51 
Use parameterized queries, which is better to use anyway that concatentating strings together, which is error prone and can lead to security holes if you don't check user input correctly (parameterized queries have many other benefits over what you're doing, which is the old, insecure way).
SqlCeCommand addPic = conn.CreateCommand();
addPic.CommandText = "INSERT INTO photoTable (Photo) VALUES(@Photo)";
SqlCeParameter picParam = addPic.Parameters.Add("@Photo", SqlDbType.Image);
picParam.Value = GetPhoto(photoFilePath);
This query is much less prone to error and makes binary data possible to work with, unlike string concatenation.

 

Microsoft MVP, Visual C#
My Articles
GeneralHardcoded filepaths c# Pin
frank217-Jun-04 6:34
frank217-Jun-04 6:34 
GeneralRe: Hardcoded filepaths c# Pin
Heath Stewart7-Jun-04 6:44
protectorHeath Stewart7-Jun-04 6:44 
Generaldataset update on form closing Pin
C#Coder677-Jun-04 6:07
C#Coder677-Jun-04 6:07 
GeneralRe: dataset update on form closing Pin
Heath Stewart7-Jun-04 6:16
protectorHeath Stewart7-Jun-04 6:16 
GeneralVS2K3 doesn't copy file reference Pin
CBoland7-Jun-04 5:58
CBoland7-Jun-04 5:58 
GeneralRe: VS2K3 doesn't copy file reference Pin
Heath Stewart7-Jun-04 6:09
protectorHeath Stewart7-Jun-04 6:09 
GeneralRe: VS2K3 doesn't copy file reference Pin
CBoland7-Jun-04 8:45
CBoland7-Jun-04 8:45 
GeneralRe: VS2K3 doesn't copy file reference Pin
Heath Stewart7-Jun-04 8:47
protectorHeath Stewart7-Jun-04 8:47 
GeneralThreading and errors Pin
Russell Jones7-Jun-04 5:44
Russell Jones7-Jun-04 5:44 
GeneralRe: Threading and errors Pin
Heath Stewart7-Jun-04 6:20
protectorHeath Stewart7-Jun-04 6:20 
Generaldatasets, databinding and dataviews Pin
HappyPaws7-Jun-04 4:42
HappyPaws7-Jun-04 4:42 
GeneralRe: datasets, databinding and dataviews Pin
Heath Stewart7-Jun-04 5:21
protectorHeath Stewart7-Jun-04 5:21 
GeneralRe: datasets, databinding and dataviews Pin
HappyPaws7-Jun-04 7:43
HappyPaws7-Jun-04 7:43 
GeneralRe: datasets, databinding and dataviews Pin
Heath Stewart7-Jun-04 8:31
protectorHeath Stewart7-Jun-04 8:31 
GeneralRe: datasets, databinding and dataviews Pin
HappyPaws8-Jun-04 2:39
HappyPaws8-Jun-04 2:39 
GeneralRe: datasets, databinding and dataviews Pin
Heath Stewart8-Jun-04 3:13
protectorHeath Stewart8-Jun-04 3:13 
GeneralUpdate Stored Procedure throws Exception "Expects Parameter..." Pin
STW7-Jun-04 3:05
STW7-Jun-04 3:05 

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.