Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
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 
QuestionListView OwnerDraw and Custom Background Pin
PicklesTheClown10-Feb-06 8:28
PicklesTheClown10-Feb-06 8:28 
QuestionUnable to get a Profile custom (object) collection to bind to GridView,etc (IList objects)? Pin
kloepper10-Feb-06 8:00
kloepper10-Feb-06 8:00 
QuestionDispalying decimal value in the textbox Pin
zaboboa10-Feb-06 7:41
zaboboa10-Feb-06 7:41 
AnswerRe: Dispalying decimal value in the textbox Pin
Dave Kreskowiak10-Feb-06 7:45
mveDave Kreskowiak10-Feb-06 7:45 
GeneralRe: Dispalying decimal value in the textbox Pin
zaboboa10-Feb-06 7:51
zaboboa10-Feb-06 7:51 
GeneralRe: Dispalying decimal value in the textbox Pin
Dave Kreskowiak10-Feb-06 9:10
mveDave Kreskowiak10-Feb-06 9:10 
GeneralRe: Dispalying decimal value in the textbox Pin
User 665810-Feb-06 9:35
User 665810-Feb-06 9:35 
GeneralRe: Dispalying decimal value in the textbox Pin
Dave Kreskowiak10-Feb-06 12:13
mveDave Kreskowiak10-Feb-06 12:13 
GeneralRe: Dispalying decimal value in the textbox Pin
User 665811-Feb-06 2:51
User 665811-Feb-06 2:51 
QuestionTopmost Form Pin
PHDENG8110-Feb-06 7:35
PHDENG8110-Feb-06 7:35 
AnswerRe: Topmost Form Pin
NaNg1524110-Feb-06 8:56
NaNg1524110-Feb-06 8:56 
GeneralRe: Topmost Form Pin
Dave Kreskowiak10-Feb-06 9:03
mveDave Kreskowiak10-Feb-06 9:03 
GeneralRe: Topmost Form Pin
NaNg1524110-Feb-06 9:19
NaNg1524110-Feb-06 9:19 
GeneralRe: Topmost Form Pin
PHDENG8110-Feb-06 9:31
PHDENG8110-Feb-06 9:31 

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.