Click here to Skip to main content
15,908,172 members
Home / Discussions / C#
   

C#

 
QuestionApplication not terminating with Application.exit Pin
Nitin19817-Feb-07 7:22
Nitin19817-Feb-07 7:22 
AnswerRe: Application not terminating with Application.exit Pin
Shy Agam7-Feb-07 7:44
Shy Agam7-Feb-07 7:44 
GeneralHow to terminate the application completely Pin
Nitin19818-Feb-07 0:50
Nitin19818-Feb-07 0:50 
GeneralRe: How to terminate the application completely Pin
Shy Agam8-Feb-07 2:02
Shy Agam8-Feb-07 2:02 
Questionburn data Pin
karname7-Feb-07 7:17
karname7-Feb-07 7:17 
AnswerRe: burn data Pin
Ravi Bhavnani7-Feb-07 7:41
professionalRavi Bhavnani7-Feb-07 7:41 
QuestionSQL Statment Pin
microuser_20007-Feb-07 7:15
microuser_20007-Feb-07 7:15 
AnswerRe: SQL Statment Pin
Pete O'Hanlon7-Feb-07 8:50
mvePete O'Hanlon7-Feb-07 8:50 
OK this is obviously a SQL Server statement, so why aren't you using the Sql... classes? They don't use the ODBC classes, so are more performant (plus they will avoid this error).

Also, you should probably use a Stored Procedure to do this and remove the gaping security hole you have here. Don't use direct text statements because they are wide open to SQL Injection attacks.

BTW - you missed the most important piece of information about your error - the actual error code. This error is fairly generic, and the error code (the 800... one) is useful for identifying the actual error that triggered it.

One final thought - don't use @@IDENTITY. This is not guaranteed to return you the last identity because if you have a trigger on the table that performs an insert into a different table with an identity column on it, @@IDENTITY will return the identity of that table instead. Use SCOPE_IDENTITY() instead.


the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer

Deja View - the feeling that you've seen this post before.

GeneralRe: SQL Statment Pin
microuser_20007-Feb-07 10:40
microuser_20007-Feb-07 10:40 
GeneralRe: SQL Statment Pin
Colin Angus Mackay7-Feb-07 12:06
Colin Angus Mackay7-Feb-07 12:06 
GeneralRe: SQL Statment Pin
microuser_20008-Feb-07 9:36
microuser_20008-Feb-07 9:36 
GeneralRe: SQL Statment Pin
Colin Angus Mackay8-Feb-07 11:09
Colin Angus Mackay8-Feb-07 11:09 
GeneralRe: SQL Statment Pin
microuser_20008-Feb-07 11:21
microuser_20008-Feb-07 11:21 
Questionis it possible to use a value type in a generic method constraint? Pin
michal.kreslik7-Feb-07 7:14
michal.kreslik7-Feb-07 7:14 
AnswerRe: is it possible to use a value type in a generic method constraint? Pin
Judah Gabriel Himango7-Feb-07 7:41
sponsorJudah Gabriel Himango7-Feb-07 7:41 
GeneralRe: is it possible to use a value type in a generic method constraint? Pin
michal.kreslik7-Feb-07 8:05
michal.kreslik7-Feb-07 8:05 
GeneralRe: is it possible to use a value type in a generic method constraint? Pin
Judah Gabriel Himango7-Feb-07 8:55
sponsorJudah Gabriel Himango7-Feb-07 8:55 
GeneralRe: is it possible to use a value type in a generic method constraint? Pin
michal.kreslik7-Feb-07 9:11
michal.kreslik7-Feb-07 9:11 
GeneralRe: is it possible to use a value type in a generic method constraint? Pin
Judah Gabriel Himango7-Feb-07 9:27
sponsorJudah Gabriel Himango7-Feb-07 9:27 
GeneralRe: is it possible to use a value type in a generic method constraint? Pin
michal.kreslik7-Feb-07 10:44
michal.kreslik7-Feb-07 10:44 
QuestionHow to capture Datagrid Header Text events? Pin
sundar1567-Feb-07 6:59
sundar1567-Feb-07 6:59 
AnswerRe: How to capture Datagrid Header Text events? Pin
Ravi Bhavnani7-Feb-07 7:07
professionalRavi Bhavnani7-Feb-07 7:07 
QuestionHow to add file onto txbbox? [modified] Pin
Eyungwah7-Feb-07 6:47
Eyungwah7-Feb-07 6:47 
AnswerRe: How to add file onto txbbox? Pin
Ravi Bhavnani7-Feb-07 6:57
professionalRavi Bhavnani7-Feb-07 6:57 
QuestionBufferedGraphicsContext Pin
Jim Warburton7-Feb-07 6:34
Jim Warburton7-Feb-07 6:34 

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.