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

C#

 
GeneralRe: enumeration was modified operation may not execute Pin
perlmunger11-Feb-06 11:10
perlmunger11-Feb-06 11:10 
AnswerRe: enumeration was modified operation may not execute Pin
malharone11-Feb-06 7:31
malharone11-Feb-06 7:31 
GeneralRe: enumeration was modified operation may not execute Pin
Colin Angus Mackay11-Feb-06 13:41
Colin Angus Mackay11-Feb-06 13:41 
GeneralRe: enumeration was modified operation may not execute Pin
malharone11-Feb-06 18:14
malharone11-Feb-06 18:14 
GeneralRe: enumeration was modified operation may not execute Pin
Colin Angus Mackay12-Feb-06 1:34
Colin Angus Mackay12-Feb-06 1:34 
GeneralRe: enumeration was modified operation may not execute Pin
malharone12-Feb-06 5:27
malharone12-Feb-06 5:27 
GeneralRe: enumeration was modified operation may not execute Pin
spirit_of_pak12-Feb-06 17:28
spirit_of_pak12-Feb-06 17:28 
QuestionError Pin
NaNg1524111-Feb-06 3:54
NaNg1524111-Feb-06 3:54 
the problem is in my webservice, but this is in C#, and the problem is more C# related.

the code below is the code i use, it always return false through the Catch, the Catch returns an error found in here[^] (the blue boxes are the absolute paths, you don't need them).
the problem i can't figure out, is why?

if someone can help me i would be very thankful.

yours, NaNg.


[WebMethod]<br />
public bool AddProject(string ProjName, string ProjID)<br />
{<br />
try<br />
{<br />
objCon.Open();<br />
DataSet ds = new DataSet();<br />
objDA = new OleDbDataAdapter(string.Format("Select Count([SID]) from tblProjects Where SPorjID = '{0}' And SProjName = '{1}'", ProjID, ProjName), objCon);<br />
123 -> objDA.Fill(ds, "tblProjects");<br />
if ((int)ds.Tables[0].Rows[0][0] == 0)<br />
{<br />
objCmd = new OleDbCommand(string.Format("Insert into tblProjects(SProjID, SProjName) Values('{0}', '{1}')", ProjID, ProjName), objCon);<br />
objCmd.ExecuteNonQuery();<br />
return true;<br />
}<br />
else<br />
return false;<br />
}<br />
catch (Exception exp)<br />
{<br />
return false;<br />
}<br />
finally<br />
{<br />
objCon.Close();<br />
}<br />
}

AnswerRe: Error Pin
perlmunger11-Feb-06 7:15
perlmunger11-Feb-06 7:15 
GeneralRe: Error Pin
NaNg1524111-Feb-06 8:13
NaNg1524111-Feb-06 8:13 
GeneralRe: Error Pin
NaNg1524111-Feb-06 9:36
NaNg1524111-Feb-06 9:36 
GeneralRe: Error Pin
perlmunger11-Feb-06 11:09
perlmunger11-Feb-06 11:09 
QuestionCreate list with Grid and getting Process info in C#. Pin
Yanshof11-Feb-06 1:37
Yanshof11-Feb-06 1:37 
AnswerSome one can help me with this question please ? Pin
Yanshof11-Feb-06 9:02
Yanshof11-Feb-06 9:02 
AnswerRe: Create list with Grid and getting Process info in C#. Pin
Dave Kreskowiak11-Feb-06 10:51
mveDave Kreskowiak11-Feb-06 10:51 
QuestionHow to browse SQL server from a network? Pin
bouli10-Feb-06 21:46
bouli10-Feb-06 21:46 
AnswerRe: How to browse SQL server from a network? Pin
perlmunger11-Feb-06 6:34
perlmunger11-Feb-06 6:34 
QuestionI need Help Pin
BestArtemis10-Feb-06 21:22
BestArtemis10-Feb-06 21:22 
AnswerRe: I need Help Pin
Wayne Phipps10-Feb-06 21:35
Wayne Phipps10-Feb-06 21:35 
QuestionDLL Problem Pin
Expert Coming10-Feb-06 14:06
Expert Coming10-Feb-06 14:06 
AnswerRe: DLL Problem Pin
Dave Kreskowiak10-Feb-06 14:28
mveDave Kreskowiak10-Feb-06 14:28 
GeneralRe: DLL Problem (How?) Pin
Expert Coming10-Feb-06 14:33
Expert Coming10-Feb-06 14:33 
GeneralRe: DLL Problem (How?) Pin
Dave Kreskowiak10-Feb-06 14:56
mveDave Kreskowiak10-Feb-06 14:56 
GeneralRe: DLL Problem (How?) Pin
kourvoisier10-Feb-06 14:59
kourvoisier10-Feb-06 14:59 
GeneralRe: DLL Problem (How?) Pin
Expert Coming10-Feb-06 15:09
Expert Coming10-Feb-06 15:09 

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.