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
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.System.InvalidOperationException: ExecuteNonQuery: Connection property has not been initialized.
Below is my code in a zip file, I have also included the access database that I am using, if that will help.




Reply With Quote