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

C#

 
AnswerRe: Write Assembly code in C# Pin
snouto28-May-10 10:48
snouto28-May-10 10:48 
AnswerRe: Write Assembly code in C# Pin
Henry Minute28-May-10 11:49
Henry Minute28-May-10 11:49 
AnswerRe: Write Assembly code in C# Pin
AspDotNetDev28-May-10 14:18
protectorAspDotNetDev28-May-10 14:18 
QuestionInsert byte[] to database Pin
dataminers28-May-10 1:49
dataminers28-May-10 1:49 
AnswerMessage Closed Pin
28-May-10 1:53
stancrm28-May-10 1:53 
GeneralRe: Insert byte[] to database Pin
dataminers28-May-10 2:11
dataminers28-May-10 2:11 
GeneralRe: Insert byte[] to database Pin
PIEBALDconsult28-May-10 3:49
mvePIEBALDconsult28-May-10 3:49 
AnswerRe: Insert byte[] to database Pin
Pete O'Hanlon28-May-10 2:48
mvePete O'Hanlon28-May-10 2:48 
First of all, please don't use sql like this. As you are using SQL Server, you should really use command parameters (this helps circumvent SQL Injection Attacks). Then you could set the data easily, as detailed here:
using (SqlCommand cmd = new SqlCommand("MyFile(FileId, BinaryFile) VALUES(@fileid, @file", connection)
{
  cmd.Parameters.AddWithValue("@fileid", fileid);
  cmd.Parameters.AddWithValue("@file", file) ; 
  cmd.ExecuteNonQuery();
}

"WPF has many lovers. It's a veritable porn star!" - Josh Smith

As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.


My blog | My articles | MoXAML PowerToys | Onyx



AnswerRe: Insert byte[] to database Pin
T M Gray28-May-10 5:20
T M Gray28-May-10 5:20 
AnswerRe: Insert byte[] to database Pin
Matt Meyer28-May-10 7:41
Matt Meyer28-May-10 7:41 
AnswerRe: Insert byte[] to database Pin
AspDotNetDev28-May-10 16:41
protectorAspDotNetDev28-May-10 16:41 
QuestionDisable Intrupt In Critical section Pin
shahramkeyboard28-May-10 0:38
shahramkeyboard28-May-10 0:38 
AnswerRe: Disable Intrupt In Critical section Pin
harold aptroot28-May-10 0:46
harold aptroot28-May-10 0:46 
GeneralRe: Disable Intrupt In Critical section Pin
Pete O'Hanlon28-May-10 1:10
mvePete O'Hanlon28-May-10 1:10 
GeneralRe: Disable Intrupt In Critical section Pin
Luc Pattyn28-May-10 2:17
sitebuilderLuc Pattyn28-May-10 2:17 
GeneralRe: Disable Intrupt In Critical section Pin
Pete O'Hanlon28-May-10 2:26
mvePete O'Hanlon28-May-10 2:26 
AnswerRe: Disable Intrupt In Critical section Pin
Luc Pattyn28-May-10 2:16
sitebuilderLuc Pattyn28-May-10 2:16 
GeneralRe: Disable Intrupt In Critical section PinPopular
Pete O'Hanlon28-May-10 2:54
mvePete O'Hanlon28-May-10 2:54 
GeneralRe: Disable Intrupt In Critical section Pin
Luc Pattyn28-May-10 4:27
sitebuilderLuc Pattyn28-May-10 4:27 
QuestionRetrieve and display server drives and folders on a client. Pin
Calla28-May-10 0:21
Calla28-May-10 0:21 
AnswerRe: Retrieve and display server drives and folders on a client. Pin
Calla28-May-10 3:25
Calla28-May-10 3:25 
QuestionProgram to start when windows starts Pin
Enobong Adahada27-May-10 21:32
Enobong Adahada27-May-10 21:32 
AnswerRe: Program to start when windows starts Pin
MayukhSen27-May-10 21:44
MayukhSen27-May-10 21:44 
AnswerRe: Program to start when windows starts Pin
Nuri Ismail27-May-10 21:44
Nuri Ismail27-May-10 21:44 
AnswerRe: Program to start when windows starts Pin
PIEBALDconsult28-May-10 3:50
mvePIEBALDconsult28-May-10 3:50 

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.