Results 1 to 40 of 42

Thread: [02/03] Problems with a DA Class

Threaded View

  1. #1

    Thread Starter
    Addicted Member ddmeightball's Avatar
    Join Date
    Nov 2004
    Location
    Nebraska
    Posts
    183

    [02/03] Problems with a DA Class

    Hello,

    I am trying to write a data access class that will write a food order to a microsoft access database. I am having problems with writing to the database.

    I am only able to write one piece of an order to the access database, even though there are multiple items in the arrraylist. When I choose to Place Order(write the items in the arraylist to the DA Class) I get the error

    System.InvalidOperationException: ExecuteNonQuery: Connection property has not been initialized.
    I understand that it says the connection has not been intialized, but I dont understand why I am getting this error. On line 57 of my Order class I call the OrderDA.Intialize method to initialize the connection. It seems like it can do it once, since it writes the first item of the arraylist. To me it seems like a problem with my connection but I cant see it.

    Below is my code in a zip file, I have also included the access database that I am using, if that will help.
    Last edited by ddmeightball; Jun 1st, 2006 at 08:35 PM.
    Otaku no Kamisama – God of the Geeks

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