Click here to Skip to main content
15,911,531 members
Home / Discussions / C#
   

C#

 
GeneralRe: Philisophical question Pin
Vikram A Punathambekar16-Jan-09 1:47
Vikram A Punathambekar16-Jan-09 1:47 
GeneralRe: Philisophical question Pin
Gary Wheeler16-Jan-09 1:52
Gary Wheeler16-Jan-09 1:52 
QuestionSybase Binary Columns [modified] Pin
mobius11100115-Jan-09 4:25
mobius11100115-Jan-09 4:25 
AnswerRe: Sybase Binary Columns [modified] Pin
Dave Kreskowiak15-Jan-09 4:49
mveDave Kreskowiak15-Jan-09 4:49 
GeneralRe: Sybase Binary Columns Pin
mobius11100115-Jan-09 10:09
mobius11100115-Jan-09 10:09 
GeneralRe: Sybase Binary Columns Pin
Dave Kreskowiak15-Jan-09 10:40
mveDave Kreskowiak15-Jan-09 10:40 
GeneralRe: Sybase Binary Columns Pin
mobius11100116-Jan-09 2:50
mobius11100116-Jan-09 2:50 
GeneralRe: Sybase Binary Columns Pin
Dave Kreskowiak16-Jan-09 11:36
mveDave Kreskowiak16-Jan-09 11:36 
mobius111001 wrote:
byte[] data = new byte[33];
// function call to fill byte array here
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Clear();
command.Parameters.AddWithValue( "@binData", data );
command.CommandText = "InsertBinData";
Command.ExecuteNonQuery();


Don't use AddWithValue. Use the full technique of creating a Parameter object, setting it's database type and direction properly and then assign the value to it and add it to the collection. Here, you're assuming that the object will correctly guess the correct database type to use, when, in fact, it can get it wrong.


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




GeneralRe: Sybase Binary Columns Pin
mobius11100121-Jan-09 5:37
mobius11100121-Jan-09 5:37 
QuestionHow to import data from rtf file to datatable Pin
srinivasadithya15-Jan-09 4:11
srinivasadithya15-Jan-09 4:11 
AnswerRe: How to import data from rtf file to datatable Pin
Jani Giannoudis15-Jan-09 12:56
mvaJani Giannoudis15-Jan-09 12:56 
QuestionRe: How to import data from rtf file to datatable Pin
srinivasadithya16-Jan-09 8:19
srinivasadithya16-Jan-09 8:19 
AnswerRe: How to import data from rtf file to datatable Pin
Jani Giannoudis16-Jan-09 9:06
mvaJani Giannoudis16-Jan-09 9:06 
QuestionRegarding Asynchoronous Multithreading Pin
tasumisra15-Jan-09 3:48
tasumisra15-Jan-09 3:48 
AnswerRe: Regarding Asynchoronous Multithreading Pin
SeMartens15-Jan-09 3:49
SeMartens15-Jan-09 3:49 
GeneralRe: Regarding Asynchoronous Multithreading Pin
tasumisra15-Jan-09 3:57
tasumisra15-Jan-09 3:57 
QuestionHow to get the instance that called a method. Pin
DaveyM6915-Jan-09 3:19
professionalDaveyM6915-Jan-09 3:19 
AnswerRe: How to get the instance that called a method. Pin
benjymous15-Jan-09 3:38
benjymous15-Jan-09 3:38 
GeneralRe: How to get the instance that called a method. Pin
DaveyM6915-Jan-09 3:42
professionalDaveyM6915-Jan-09 3:42 
AnswerRe: How to get the instance that called a method. Pin
Tim Groven15-Jan-09 3:42
Tim Groven15-Jan-09 3:42 
GeneralRe: How to get the instance that called a method. Pin
DaveyM6915-Jan-09 3:50
professionalDaveyM6915-Jan-09 3:50 
AnswerRe: How to get the instance that called a method. Pin
musefan15-Jan-09 3:55
musefan15-Jan-09 3:55 
GeneralRe: How to get the instance that called a method. Pin
DaveyM6915-Jan-09 4:21
professionalDaveyM6915-Jan-09 4:21 
AnswerRe: How to get the instance that called a method. Pin
Pete O'Hanlon15-Jan-09 4:02
mvePete O'Hanlon15-Jan-09 4:02 
GeneralRe: How to get the instance that called a method. Pin
DaveyM6915-Jan-09 4:03
professionalDaveyM6915-Jan-09 4:03 

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.