Here is my problem, I've got an object that I am initializing at the beginning of my program:
ShipPostageConn.CreateInstance(__uuidof(Connection));
This connnection is going to be going to be closed and opened many times to different databases...I think this is my problem. After I get done with one database and I want to close it, it closes okay, but once it goes out of my function, it gives an Access error. I think it's having a hard time freeing this pointer. It doesn't error in any of my code but in the libraries that MFC uses. Something else that was really weird was I had a combo box and I tried to make it "enabled"...it would work okay before I sent my SQL statement across the command pointer, but if I tried to "enable" my combobox AFTER I sent my SQL statment, my app would give an access violation. The reason I know that it is this particular pointer is because I have another similar pointer that stays connected through the whole program and I don't have any problem with it. The program gives the access error after I have connected to the Database and exit out of my function using the ShipPostageConn pointer. Is there some way that I can set that object to NULL? Something like:
ShipPostageConn.CreateInstance(NULL);
so that I can free it up? Any and all help is greatly appreciated. I probably sound a bit muddled right now, that's cause I've been working on this thing all day and my mind is mush...I'm sure ya'll understand that.
Niky Williams
NTS Marketing
ShipPostageConn.CreateInstance(__uuidof(Connection));
This connnection is going to be going to be closed and opened many times to different databases...I think this is my problem. After I get done with one database and I want to close it, it closes okay, but once it goes out of my function, it gives an Access error. I think it's having a hard time freeing this pointer. It doesn't error in any of my code but in the libraries that MFC uses. Something else that was really weird was I had a combo box and I tried to make it "enabled"...it would work okay before I sent my SQL statement across the command pointer, but if I tried to "enable" my combobox AFTER I sent my SQL statment, my app would give an access violation. The reason I know that it is this particular pointer is because I have another similar pointer that stays connected through the whole program and I don't have any problem with it. The program gives the access error after I have connected to the Database and exit out of my function using the ShipPostageConn pointer. Is there some way that I can set that object to NULL? Something like:
ShipPostageConn.CreateInstance(NULL);
so that I can free it up? Any and all help is greatly appreciated. I probably sound a bit muddled right now, that's cause I've been working on this thing all day and my mind is mush...I'm sure ya'll understand that.
Niky Williams
NTS Marketing