Hi guys,
I've written a class that creates a connection to an MS Access database and I've included several methods that will carry out SQL update, insert functions etc.
The problem is that whenever I call one of these methods from an external class, a General Error is thrown. The class structure is basically as follows -
A constructor method that establishes a connection to the Access database. This method is functioning normally. I've tested the connection by carrying out update/select statements in this method and they've been implemented without any problems. I've created a global Connection variable that is initialised in this method so that the other methods can use the it (as opposed to having each method set up a connection and carry out its tasks).
An update method that takes a String variable as a parameter and uses this as part of a SQL Update command
An insert method that takes a String variable as a parameter and uses this as part of a SQL INSERT command
As I said, the problem seems to be that any statements/commands called on the Connection outside of the constructor method (where the connection is established) are resulting in a General Error.
I'd appreciate any help that anyone here could provide. If you need me to post any code, no problem.
Thanks




Reply With Quote