Click here to Skip to main content
15,893,814 members
Home / Discussions / C#
   

C#

 
GeneralSqlParameter problem Pin
Deian22-Apr-08 3:53
Deian22-Apr-08 3:53 
GeneralRe: SqlParameter problem Pin
Blue_Boy22-Apr-08 4:00
Blue_Boy22-Apr-08 4:00 
GeneralRe: SqlParameter problem Pin
Deian22-Apr-08 4:14
Deian22-Apr-08 4:14 
GeneralRe: SqlParameter problem Pin
Blue_Boy22-Apr-08 4:26
Blue_Boy22-Apr-08 4:26 
GeneralRe: SqlParameter problem Pin
Deian22-Apr-08 4:27
Deian22-Apr-08 4:27 
GeneralRe: SqlParameter problem Pin
Blue_Boy22-Apr-08 4:33
Blue_Boy22-Apr-08 4:33 
GeneralRe: SqlParameter problem Pin
Colin Angus Mackay22-Apr-08 10:28
Colin Angus Mackay22-Apr-08 10:28 
GeneralRe: SqlParameter problem Pin
Colin Angus Mackay22-Apr-08 10:27
Colin Angus Mackay22-Apr-08 10:27 
Deian wrote:
sqlCmd.Parameters.AddWithValue("@id", nCustomerID.ToString());


Don't all ToString() on nCustomerID

Also, it is good practice to put the calls to Dispose in a finally block so that they get called even if an exception is thrown. At the moment, the objects won't be disposed when the exception is thrown.

Other than that I don't really see much wrong with the code.

Upcoming FREE developer events:
* Developer Day Scotland

Recent blog posts:
* Introduction to LINQ to XML (Part 1) - (Part 2)

My website | Blog

GeneralRe: SqlParameter problem Pin
Deian22-Apr-08 20:34
Deian22-Apr-08 20:34 
GeneralRe: SqlParameter problem Pin
Colin Angus Mackay22-Apr-08 22:10
Colin Angus Mackay22-Apr-08 22:10 
GeneralRe: SqlParameter problem Pin
Deian22-Apr-08 22:30
Deian22-Apr-08 22:30 
QuestionDataGridView... Deleting/finding a row from/in the underlying DataSource (DataTable) Ideas anyone? Pin
blakey40422-Apr-08 3:45
blakey40422-Apr-08 3:45 
AnswerRe: DataGridView... Deleting/finding a row from/in the underlying DataSource (DataTable) Ideas anyone? Pin
Blue_Boy22-Apr-08 4:40
Blue_Boy22-Apr-08 4:40 
GeneralRe: DataGridView... Deleting/finding a row from/in the underlying DataSource (DataTable) Ideas anyone? Pin
blakey40422-Apr-08 4:59
blakey40422-Apr-08 4:59 
GeneralSolution for anyone interested... Pin
blakey40422-Apr-08 5:06
blakey40422-Apr-08 5:06 
QuestionThreadStart issue Pin
merh22-Apr-08 3:45
merh22-Apr-08 3:45 
GeneralRe: ThreadStart issue Pin
Spacix One22-Apr-08 3:47
Spacix One22-Apr-08 3:47 
GeneralRe: ThreadStart issue Pin
merh22-Apr-08 3:56
merh22-Apr-08 3:56 
GeneralRe: ThreadStart issue Pin
Spacix One22-Apr-08 4:08
Spacix One22-Apr-08 4:08 
GeneralEvents in c# Pin
M4R22-Apr-08 3:25
M4R22-Apr-08 3:25 
GeneralRe: Events in c# Pin
Not Active22-Apr-08 3:33
mentorNot Active22-Apr-08 3:33 
JokeRe: Events in c# Pin
Guffa22-Apr-08 3:42
Guffa22-Apr-08 3:42 
GeneralRe: Events in c# Pin
Guffa22-Apr-08 3:35
Guffa22-Apr-08 3:35 
RantRe: Events in c# Pin
Spacix One22-Apr-08 3:45
Spacix One22-Apr-08 3:45 
GeneralRe: Events in c# Pin
CPallini22-Apr-08 5:45
mveCPallini22-Apr-08 5:45 

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.