System import but can't find function - stumped please help

This is a discussion on System import but can't find function - stumped please help within the C# Programming forums, part of the General Programming Boards category; Hello I've been debugging this for about an hour now would be really grateful if someone could lend a hand ...

  1. #1
    Living to Learn
    Join Date
    Feb 2006
    Location
    Aberdeen, UK
    Posts
    33

    Exclamation System import but can't find function - stumped please help

    Hello I've been debugging this for about an hour now would be really grateful if someone could lend a hand with this. I'm getting errors saying a method can't find a function associated with it, but I've used the same thing throughout the application and it didn't used to cause problems until now. I've been told errors like these can have their root far away from the flagged line of code. Here's the error:

    Code:
    Compiler Error Message: CS0117: 'System.Data.OleDb.OleDbCommand' does not contain a definition for 'ExecutenonOverv'
    
    Source Error:
    
     
    
    Line 33:         String sql = "INSERT into products (PID, Name, Price, Stock) values(" + PIDStr + "," + NameStr + "," + PriceStr + "," + StockStr + ")";
    Line 34:         OleDbCommand command = new OleDbCommand(sql, oleconn);
    Line 35:         int rowsAffected = (int)command.ExecutenonOverv();
    Line 36:         Session["PID"] = PIDTxt.Text;
    Line 37:         Session["Name"] = NameTxt.Text;
     
    
    Source File: c:\Documents and Settings\H\workspace\Voipshop\products.aspx.cs    Line: 35
    I've attached the two files. One is the main file and the other is the code file, the products_aspx_cs.txt is the one with the problem. Due to the board's extension limitations I can't post the files with their default extensions.

    I'd really appreciate the advice.

    Thanks.
    Attached Files Attached Files
    OS: Windows XP
    Compiler: Bloodshed Dev C++, MS Visual Web Developer Express 2005
    Simulator: Cygwin

    Current Projects:
    File Tree Listing using Linked Lists: Under Puzzlement
    Command Line Chess Game in C - Design Phase

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    Compiler Error Message: CS0117: 'System.Data.OleDb.OleDbCommand' does not contain a definition for 'ExecutenonOverv'
    Your compiler is correct. There is no function ExecutenonOverv. Where did you get that word from ? Look up OleDbCommand in your helpfile. The method is named ExecuteNonQuery.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  3. #3
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    I've been told errors like these can have their root far away from the flagged line of code.
    If the definition has a typo, then using the "right" name will be the error. But that's very unlikely when using system libraries.

    Errors can have sources far away from their occurrence, but generally it's still best to look at the place the compiler reports firs.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #4
    Living to Learn
    Join Date
    Feb 2006
    Location
    Aberdeen, UK
    Posts
    33
    Thanks. I went through the whole file and although I did not find the source of the problem, I did retype everything and it worked then. Somaybe it was a typo. Thanks, lesson learned which I'm glad for. H.
    OS: Windows XP
    Compiler: Bloodshed Dev C++, MS Visual Web Developer Express 2005
    Simulator: Cygwin

    Current Projects:
    File Tree Listing using Linked Lists: Under Puzzlement
    Command Line Chess Game in C - Design Phase

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 04:06 PM
  2. In over my head
    By Shelnutt2 in forum C Programming
    Replies: 1
    Last Post: 07-08-2008, 07:54 PM
  3. <Gulp>
    By kryptkat in forum Windows Programming
    Replies: 7
    Last Post: 01-14-2006, 01:03 PM
  4. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-30-2005, 12:21 AM
  5. structure vs class
    By sana in forum C++ Programming
    Replies: 13
    Last Post: 12-02-2002, 07:18 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21