Results 1 to 40 of 43

Thread: "not all code paths return a value"[Resolved]

Threaded View

  1. #1

    Thread Starter
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    "not all code paths return a value"[Resolved]

    What's wrong here ? It shows zigzag line under "PopulateMainCat" and the error msg says : "not all code paths return a value"

    VB Code:
    1. public object PopulateMainCat(string MainTableCat)
    2. {
    3. OpenDB();
    4. DataSet ds =new DataSet();
    5. string sqlstr ="SELECT * FROM " + MainTableCat + "";   
    6. OleDbDataAdapter adp =new OleDb.OleDbDataAdapter(sqlstr,MyConnection);
    7.  
    8. adp.Fill(ds,MainTableCat);
    9. foreach(DataRow dr in ds.Tables[MainTableCat].Rows)
    10. {
    11. return dr[1];
    12. }
    13. DBSpace.CloseDB.CloseDB1();
    14. }
    Last edited by Pirate; Jun 27th, 2003 at 10:44 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width