Click here to Skip to main content
15,886,806 members
Home / Discussions / C#
   

C#

 
Questionreport viewer problem Pin
ali- kanju220-Dec-09 18:21
ali- kanju220-Dec-09 18:21 
AnswerRe: report viewer problem Pin
NarendraSinghJTV20-Dec-09 20:18
NarendraSinghJTV20-Dec-09 20:18 
QuestionAdvantages in 32-bit Windows 7 -vs- 64-bit Windows 7 for Azure development Pin
stringtheory_x20-Dec-09 16:48
stringtheory_x20-Dec-09 16:48 
AnswerRe: Advantages in 32-bit Windows 7 -vs- 64-bit Windows 7 for Azure development Pin
Saksida Bojan20-Dec-09 18:30
Saksida Bojan20-Dec-09 18:30 
QuestionClearing of database. Pin
codenoobie20-Dec-09 15:34
codenoobie20-Dec-09 15:34 
AnswerRe: Clearing of database. Pin
Rod Kemp20-Dec-09 16:13
Rod Kemp20-Dec-09 16:13 
GeneralRe: Clearing of database. Pin
codenoobie20-Dec-09 22:18
codenoobie20-Dec-09 22:18 
GeneralRe: Clearing of database. Pin
Rod Kemp21-Dec-09 0:54
Rod Kemp21-Dec-09 0:54 
OK basic SQL Language lesson, the command;
DELETE FROM LOCATION

Will clear ALL the data from the table LOCATION, if this is all you want to happen use the following SqlCeCommand code;
SqlCeCommand cmd = conn.CreateCommand();
cmd.CommandText = "DELETE FROM LOCATION";


However the query you have in your code is;
DELETE FROM LOCATION WHERE No = @No

Take note of the "@No" value, this is a parameter that you need to supply a value for.
What this is saying is to delete the records from the LOCATION table where the No field is equal to the @No parameter. This is why the error message you are receiving is "SqlCeException was mishandled (A parameter is missing. [ Parameter ordinal = 1 ] )", this is telling you that you have not supplied a value for the first parameter in your query, which is "@No"

If you use;
SqlCeCommand cmd = conn.CreateCommand();
cmd.CommandText = "DELETE from LOCATION where No = @No";
cmd.Parameters.AddWithValue("@No", Value); //Change the "Value" to a value of the No field in your LOCATION table

This will only delete the records from the LOCATION table where the No field is equal to the value you supply for the @No parameter.
GeneralRe: Clearing of database. Pin
codenoobie2-Jan-10 15:25
codenoobie2-Jan-10 15:25 
Questiondisplay (render) html in forms Pin
Jayapal Chandran20-Dec-09 7:47
Jayapal Chandran20-Dec-09 7:47 
AnswerRe: display (render) html in forms Pin
o m n i20-Dec-09 8:12
o m n i20-Dec-09 8:12 
QuestionRe: display (render) html in forms Pin
Jayapal Chandran20-Dec-09 8:21
Jayapal Chandran20-Dec-09 8:21 
AnswerRe: display (render) html in forms [modified] Pin
Luc Pattyn20-Dec-09 9:01
sitebuilderLuc Pattyn20-Dec-09 9:01 
GeneralRe: display (render) html in forms Pin
Jayapal Chandran20-Dec-09 9:16
Jayapal Chandran20-Dec-09 9:16 
GeneralRe: display (render) html in forms Pin
Luc Pattyn20-Dec-09 9:38
sitebuilderLuc Pattyn20-Dec-09 9:38 
GeneralRe: display (render) html in forms Pin
Jayapal Chandran20-Dec-09 11:04
Jayapal Chandran20-Dec-09 11:04 
AnswerRe: display (render) html in forms Pin
#realJSOP20-Dec-09 9:55
mve#realJSOP20-Dec-09 9:55 
GeneralRe: display (render) html in forms Pin
Jayapal Chandran20-Dec-09 11:05
Jayapal Chandran20-Dec-09 11:05 
QuestionNullable<> Pin
hotthoughtguy20-Dec-09 7:20
hotthoughtguy20-Dec-09 7:20 
AnswerRe: Nullable<> Pin
Luc Pattyn20-Dec-09 7:24
sitebuilderLuc Pattyn20-Dec-09 7:24 
GeneralRe: Nullable<> Pin
hotthoughtguy20-Dec-09 7:29
hotthoughtguy20-Dec-09 7:29 
AnswerRe: Nullable<> Pin
Gideon Engelberth20-Dec-09 18:02
Gideon Engelberth20-Dec-09 18:02 
QuestionDisable resize cursor when on window border Pin
o m n i20-Dec-09 7:12
o m n i20-Dec-09 7:12 
AnswerRe: Disable resize cursor when on window border Pin
Luc Pattyn20-Dec-09 7:25
sitebuilderLuc Pattyn20-Dec-09 7:25 
GeneralRe: Disable resize cursor when on window border Pin
o m n i20-Dec-09 8:10
o m n i20-Dec-09 8:10 

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.