Click here to Skip to main content
15,904,024 members
Home / Discussions / C#
   

C#

 
QuestionDrawing with c# Pin
kourvoisier10-Feb-06 12:29
kourvoisier10-Feb-06 12:29 
AnswerRe: Drawing with c# Pin
M@dHatter10-Feb-06 12:37
M@dHatter10-Feb-06 12:37 
GeneralRe: Drawing with c# Pin
TheJudeDude10-Feb-06 13:47
TheJudeDude10-Feb-06 13:47 
GeneralRe: Drawing with c# Pin
kourvoisier10-Feb-06 14:54
kourvoisier10-Feb-06 14:54 
GeneralRe: Drawing with c# Pin
TheJudeDude10-Feb-06 14:57
TheJudeDude10-Feb-06 14:57 
QuestionWindows Service Interaction Pin
perlmunger10-Feb-06 10:45
perlmunger10-Feb-06 10:45 
AnswerRe: Windows Service Interaction Pin
Ravi Bhavnani10-Feb-06 11:14
professionalRavi Bhavnani10-Feb-06 11:14 
GeneralRe: Windows Service Interaction Pin
perlmunger10-Feb-06 11:30
perlmunger10-Feb-06 11:30 
AnswerRe: Windows Service Interaction Pin
Nicholas Butler11-Feb-06 0:28
sitebuilderNicholas Butler11-Feb-06 0:28 
QuestionWhat is 192.168.1.1 Pin
jinzhecheng10-Feb-06 10:18
jinzhecheng10-Feb-06 10:18 
AnswerRe: What is 192.168.1.1 Pin
Stanciu Vlad10-Feb-06 10:24
Stanciu Vlad10-Feb-06 10:24 
GeneralRe: What is 192.168.1.1 Pin
perlmunger10-Feb-06 10:35
perlmunger10-Feb-06 10:35 
AnswerRe: What is 192.168.1.1 Pin
kourvoisier10-Feb-06 12:06
kourvoisier10-Feb-06 12:06 
QuestionValidate Windows Forms Data Pin
Wayne Phipps10-Feb-06 10:02
Wayne Phipps10-Feb-06 10:02 
AnswerRe: Validate Windows Forms Data Pin
perlmunger10-Feb-06 10:55
perlmunger10-Feb-06 10:55 
GeneralRe: Validate Windows Forms Data Pin
Wayne Phipps10-Feb-06 11:10
Wayne Phipps10-Feb-06 11:10 
GeneralRe: Validate Windows Forms Data Pin
perlmunger10-Feb-06 11:53
perlmunger10-Feb-06 11:53 
QuestionSocket Exception Delay?? Pin
ckaneAV10-Feb-06 9:03
ckaneAV10-Feb-06 9:03 
AnswerRe: Socket Exception Delay?? Pin
Wayne Phipps10-Feb-06 10:12
Wayne Phipps10-Feb-06 10:12 
GeneralRe: Socket Exception Delay?? Pin
ckaneAV10-Feb-06 10:19
ckaneAV10-Feb-06 10:19 
GeneralRe: Socket Exception Delay?? Pin
Wayne Phipps10-Feb-06 11:22
Wayne Phipps10-Feb-06 11:22 
QuestionProblem: No value given for one or more ... Pin
NaNg1524110-Feb-06 8:50
NaNg1524110-Feb-06 8:50 
okay, i'm kind-a new in here, but i have a problem.
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 sais "No Value given for one or more..." (well i hope you know this exception).
the problem i can't figure out, is why?

if someone can help me i would be very thankful.

yours, NaNg.

<br />
    [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 />
            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 />
    }<br />

AnswerRe: Problem: No value given for one or more ... Pin
perlmunger10-Feb-06 10:57
perlmunger10-Feb-06 10:57 
QuestionClearing Combobox Pin
Syed Umar Anis10-Feb-06 8:49
professionalSyed Umar Anis10-Feb-06 8:49 
AnswerRe: Clearing Combobox Pin
perlmunger10-Feb-06 11:02
perlmunger10-Feb-06 11:02 

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.