Question

I have a very simple application that connects to QuickBooks, runs a customer query, then disconnects. In my dev environment (Windows 7, x64) everything works as expected. When spinning up a fresh VM (again with Windows 7, x64), I get a COM exception with HRESULT 80040154. This error has been reproduced on various other machines, but I've also had success on various other machines. I can't seem to find the common denominator here. I've ensured QBFC is installed and my assemblies are all compiled targeting the x86 platform.

Here is my connection code. The COM exception throws when I try to create an instance of QBSessionManager.

QBSessionManager qbs = new QBSessionManager();
IMsgSetRequest requests = qbs.CreateMsgSetRequest("US", 8, 0);
requests.Attributes.OnError = ENRqOnError.roeContinue;

qbs.OpenConnection2("Application Name", "Application Name", ENConnectionType.ctLocalQBD);
qbs.BeginSession(string.Empty, ENOpenMode.omDontCare);

Any ideas? This is my first QB SDK application, so please let me know if I've perhaps missed an obvious step.

Was it helpful?

Solution

This was resolved by installing QBFC11. Even though my project references QBFC12, it is apparent that QBFC11 must also be installed for the connection to succeed. I will chalk this up to inexperience with the QuickBooks SDK on my end.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top