Quickbooks isn't compatible with the version of qbXML that I expect - quickbooks
I have a homemade C++ app built using the Quickbooks SDK version 13.
The purpose of the app is to allow me to talk to Quickbooks by receiving an XML string from a network port. I'm able to communicate using qbXML version 2.1. It's talking to Quickbooks Enterprise version 16. I'm surprised, then, that when I run a host query...
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="2.1"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<HostQueryRq></HostQueryRq>
</QBXMLMsgsRq>
</QBXML>
...that the output is this:
<?xml version="1.0" ?>
<QBXML>
<QBXMLMsgsRs>
<HostQueryRs statusCode="0" statusSeverity="Info" statusMessage="Status OK">
<HostRet>
<ProductName>Intuit QuickBooks Enterprise Solutions: Manufacturing and Wholesale 16.0</ProductName>
<MajorVersion>26</MajorVersion>
<MinorVersion>0</MinorVersion>
<SupportedQBXMLVersion>1.0</SupportedQBXMLVersion>
<SupportedQBXMLVersion>1.1</SupportedQBXMLVersion>
<SupportedQBXMLVersion>2.0</SupportedQBXMLVersion>
<SupportedQBXMLVersion>2.1</SupportedQBXMLVersion>
</HostRet>
</HostQueryRs>
</QBXMLMsgsRs>
</QBXML>
Version 13 of the SDK is obviously supposed to be able to use version 13 of qbXML, and Quickbooks Enterprise 16 is supposed to be compatible with qbXML higher than 2.1. There is a feature of qbXML that I need to use that is only available after qbXML 2.1. These release notes from Intuit state that Quickbooks Enterprise 14.0 is compatible with qbXML versions 13.0, 12.0, 11.0, 10.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.1, 4.0, 3.0, 2.1, 2.0, 1.1, and 1.0. Of course, later versions like 16 would also be compatible with those.
Why is Quickbooks telling me it can only use qbXML 2.1? What can I do to use a newer version?
Edit: Sorry I forgot to mention before that changing <?qbxml version="2.1"?> to <?qbxml version="13.0"?> or any value above 2.1 returns an error of 80040428 which means "The current request processor does not support the request." Also, if I use <?qbxml version="2.0"?>, I still get <SupportedQBXMLVersion>2.1</SupportedQBXMLVersion>.
Why is Quickbooks telling me it can only use qbXML 2.1?
Because you're only using 2.1. Just use a different version. 2.1 is about 15 years old.
Change this:
<?qbxml version="2.1"?>
To something like this:
<?qbxml version="13.0"?>
Why is Quickbooks telling me it can only use qbXML 2.1?
I had the same issue. I was using code that I had lifted from the SDK located in C:\Program Files (x86)\Intuit\IDN\QBSDK13.0\samples\qbdt\cpp\qbxml\sdktest and was getting the same results of supported qbXML versions 1.0 through 2.1.
The sdktest code imports the QBXMLRP.dll (see below) which only supports versions 1.0 through 2.1:
/*---------------------------------------------------------------------------
* FILE: SDKTest.cpp
*
* Description:
* QBXMLRP API tester. Run "sdktest -h" to learn how to use it.
*
* Created On: 09/09/2001
*
* Copyright (c) 2001-2013 Intuit Inc. All rights reserved.
* Use is subject to the terms specified at:
* http://developer.intuit.com/legal/devsite_tos.html
*
*/
#include <ctype.h>
#include <ctime>
#include <fstream>
#include <atlbase.h>
#include <iostream>
#include <string>
using namespace std;
#import "QBXMLRP.dll" // this supports only up to v 2.1
The QuickBooks SDK Programmer's Guide states:
Starting with SDK 3.0, a new Request Processor is available, QBXMLRP2Lib.RequestProcessor2. Only this new Request Processor supports event subscription and other new features of SDK 3.0. Backwards compatibility with the old Request Processor is maintained in the new one.
In order to use the newer QBXMLRP2Lib:
in Visual Studio
I had to create a new CLR c++/cli project
Named it QBXmlConsole
Using the browse feature, located, then added the reference to Interopt.QBXMLRP2
Added something resembling the simplistic example below to the project's QBXmlConsole.cpp file
Now when I run, for instance, QBXmlConsole.exe < "\Program Files (x86)\Intuit\IDN\QBSDK13.0\samples\xmlfiles\HostQueryRq.xml", I get supported versions 1.0 through 13.0. If you run into issues check out the SDK's hostquery example. Hope it helps.
/** QBXmlConsole.cpp **/
#include "pch.h"
using namespace System;
using namespace Interop::QBXMLRP2; // supports all version of qbXML
int main(array<System::String ^> ^args)
{
String^ ticket;
String^ request;
String^ response;
String^ line;
int err = 0;
while ((line = Console::ReadLine()) != nullptr) {
if (line->StartsWith("<!--")) {
continue;
}
request = request + line + "\n";
}
Console::WriteLine("Processing XML:");
Console::WriteLine(request);
Console::WriteLine("--");
Interop::QBXMLRP2::IRequestProcessor6^ rqPtr = gcnew Interop::QBXMLRP2::RequestProcessor3;
try {
rqPtr->OpenConnection2("123", "QBXmlConsole", Interop::QBXMLRP2::QBXMLRPConnectionType::localQBD);
ticket = rqPtr->BeginSession("", Interop::QBXMLRP2::QBFileMode::qbFileOpenDoNotCare);
response = rqPtr->ProcessRequest(ticket, request);
rqPtr->EndSession(ticket);
rqPtr->CloseConnection();
}
catch (Runtime::InteropServices::COMException^) {
response = "Handled exception: " + rqPtr->GetQBLastError();
err = 1;
}
Console::Write(response);
Console::WriteLine("Query complete");
return err;
}
Edit: I suppose it is entirely possible that instead of importing the QBXMLRP.dll that you could try to just import the Interopt.QBXMLRP2Lib.dll, but that is something I did not try.
It sound like you have an older version of the SDK installed on the machine if you get the 80040428 error when using above 2.1. You may want to uninstall and reinstall the 13.0 SDK. I haven't used the HostQueryRq so not sure if that's the issue. This is how I get the supported versions:
IRequestProcessor5 rp = new RequestProcessor3();
rp.OpenConnection2("AppID", "AppName", QBXMLRPConnectionType.localQBD);
string ticket = rp.BeginSession("", QBFileMode.qbFileOpenDoNotCare);
string[] versions = (string[])rp.QBXMLVersionsForSession[ticket];
Related
Why does my code crash when libvlc_media_new_path() is called?
after several days of trying myself to solve my problem I would like to kindly ask for your help: I am trying to make the libvlc / SDL 2.0 tutorial working. I am coding in Visual Studio 2022 in x86 C++ Console. I have linked the libvlc library path and include path and have added the libvlc.lib file in my project linker settings. The program compiles without error and crashes when libvlc_media_new_path is called. You see all different formats of path I have used in my minimal reproducible example below: My sources: I downloaded the vlc master from Github to get the headers / include directory. I downloaded the vlc-3.0.17.4-win32 release and from there took the libvlc.dll. From the libvlc.dll I created the lib file following a visual studio command prompt procedure. What i noticed is that the function libvlc_media_new_path() only takes the path as an argument now. All examples i find in the internet are with the libvlc instance AND the path as arguments. Thank you so much for your help! #include <stdlib.h> #include "vlc/vlc.h" int main(int argc, char* argv[]) { libvlc_instance_t* libvlc; libvlc_media_t* m; libvlc_media_player_t* mp; libvlc = libvlc_new(0, NULL); if (NULL == libvlc) { printf("LibVLC initialization failure.\n"); return EXIT_FAILURE; } m = libvlc_media_new_path("/1.mp4"); //m = libvlc_media_new_path("C:\\Programmieren\\PACA\\1.mp4"); //m = libvlc_media_new_path("C:/Programmieren/PACA/1.mp4"); //m = libvlc_media_new_path("C://Programmieren//PACA//1.mp4"); //m = libvlc_media_new_path("C:\Programmieren\PACA\1.mp4"); //m = libvlc_media_new_path("file:///C:/Programmieren/PACA/1.mp4"); mp = libvlc_media_player_new_from_media(libvlc, m); return 0; }
If you go to Github and click on the Tags link, you can get the headers for version 3.0.17.4. In there you will see that libvlc_media_new_path takes an instance as an argument. The other option would be to get or build the 3.0.18 DLL.
Can't get started with JNA
I've just installed Apache NetBeans IDE 11.1, JDK 13, openjfx-13, and JNA-platform-5.4.0, on Win10 x64. I can't get to first base using JNA. The following code flags Native in the import statement for com.sun.jna.Native as an unknown symbol. The call to Native.load and the import statements are taken directly from https://github.com/java-native-access/jna/blob/master/www/GettingStarted.md This screen shot shows the project library list 1: package jrailroad; import com.sun.javafx.PlatformUtil; import com.sun.jna.platform.win32.Kernel32; import com.sun.jna.platform.win32.Kernel32Util; import com.sun.jna.Native; public class ComPort { // class ComPort public int os; public static final int OS_WINDOWS = 0; // a Windows platform public Kernel32 k32 = null; ComPort() { // ComPort.ComPort os = -1; if (PlatformUtil.isWindows()) { // windows os = OS_WINDOWS; k32 = (Kernel32) Native.load("kernel32", Kernel32.class); } // windows } // ComPort.ComPort } // class ComPort
As the Getting Started link that you posted states, Java Native Access (JNA) has a single component, jna.jar; the supporting native library (jnidispatch) is included in the jar file. ... Begin by downloading the latest release of JNA and referencing jna.jar in your project's CLASSPATH. You did not include jna.jar, but rather you included the user-contributed mappings to various platforms, jna-platform.jar. The link you noted in your comment includes links to both of these files: JNA jna-5.4.0.jar This is the core artifact of JNA and contains only the binding library and the core helper classes. JNA Platform jna-platform-5.4.0.jar This artifact holds cross-platform mappings and mappings for a number of commonly used platform functions, including a large number of Win32 mappings as well as a set of utility classes that simplify native access. And as mentioned in the comments, manually including jar files quickly becomes unsustainable when your dependencies have dependencies themselves. You should learn how to use a package manager such as Maven, Gradle, or Ivy. Your IDE has a process for this, just search for, e.g., "netbeans maven" for more guidance.
Xilinx SDK is not updated by μblaze parameters
I have modified the "system.mhs" file as follows : begin microblaze // some lines of code PARAMETER C_PVR = 2 PARAMETER C_PVR_USER1 = 0x02 PARAMETER C_PVR_USER2 = 0x0bb35 //some lines of code End when i build the hardware in Xps and export to xilinx SDK i do not see these parameters updated in xparameters.h. any hints ?
A clean and rebuild of the standalone BSP project refreshes the xparameters.h file and updates it by the required parameters Problem solved !!!
Meaning of CsvProvider error "The given key was not present in the dictionary" when trying to load sample file?
I am having trouble loading the csv files with FSharp.Data csv provider provided by fslab, including the sample adwords.csv file. What does this error below mean? Also, when I hover over the code in the Visual studio editor it mentions that "The given key was not present in the dictionary" Problem example: #load "packages/FsLab/FsLab.fsx" open System.IO open FSharp.Data "adwords.csv" |> File.ReadAllLines let test = CsvProvider<"adwords.csv">.GetSample() The output: > val it : string [] = [|"Criteria ID,Name,Canonical Name,Parent ID,Country Code,Target Type,Status"; "1000010,Abu Dhabi,"Abu Dhabi,Abu Dhabi,United Arab Emirates",9041082,AE,City,Active"; "1000011,Ajman,"Ajman,Ajman,United Arab Emirates",9047096,AE,City,Active"; "1000012,Al Ain,"Al Ain,Abu Dhabi,United Arab Emirates",9041082,AE,City,Active"; "1000013,Dubai,"Dubai,Dubai,United Arab Emirates",9041083,AE,City,Active"; "2004,Afghanistan,Afghanistan,,AF,Country,Active"|] > >System.MethodAccessException: Attempt by method '<StartupCode$FSI_0007>.$FSI_0007.main#()' to access method 'FSharp.Data.Runtime.CsvFile`1<System.__Canon>.Create(System.Func`3<System.Object,System.String[],System.__Canon>, at <StartupCode$FSI_0007>.$FSI_0007.main#() in C:\test.fsx:line 11 Stopped due to error I ran into this problem with my own files, so I grabbed this sample file from here: https://raw.githubusercontent.com/fsharp/FSharp.Data/master/tests/FSharp.Data.Tests/Data/Adwords.csv Debug info: If I delete the FSharp.Data library folder (v 2.3.0) and replace with version 2.2.5 it works correctly with no error. If I don't use the FsLab.fsx script and instead use #I "packages/FSharp.Data/lib/net40 #r "FSharp.Data.dll" then everything works. The path to the FsLab.fsx script is correct, it runs when I send the line to fsi. The F# version is 14.0.23413.0. The version of FSharp.Data downloaded by FSlab is FSharp.Data.2.3.0. I have no other references in the .fsx script. I am using Visual Studio Community edition 14.0.24720.00 Update 1. .NET version 4.6.01038 I am realizing now that I am not getting the popup asking if I want to allow the .dll like I think I used to get when I used this before.
There is nothing wrong with the file. This for example works: #load #"..\..\FSLAB\packages\FsLab\FsLab.fsx" open System.IO open FSharp.Data [<Literal>] let csvFile = #"C:\tmp\adwords.csv" File.Exists csvFile type Csv = CsvProvider<csvFile> let csv = Csv.Load(csvFile) csv.Rows There is something wrong with your FsLab of FSharp.Data installation or type providers security maybe. Try the following, specify the path to the file directly. If it still doesn't work just nuget FSharp.Data and try using the csv type provider directly in a new project. Other info is also helpful. VS version, FSLab version, wha other references you have. etc. EDIT: Thanks for the debug info. That's actually quite helpful. VS2015 Update 1 broke two things, the Binding Redirect for Fsharp and the type providers (that might have been FSharp Tools, I forgot). I would upgrade to Update 2. If that's not possible please check if your FSharp.Data.TypeProviders.dll is in C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.0.0\Type Providers. As referencing the dlls directly works, it's probably a version mismatch issue. My FsLab install predates VS2015 Update 1 and 2, so will see if it behaves differently with a new download.
There is some issue with the installation of FSharp.Data currently bundled with FsLab (as of June 2016). This issue is with version 2.3.0. If you instead use FSharp.Data 2.2.5 the code works as expected. Delete the packages/FSharp.Data folder and replace with version 2.2.5. I did it from an old installation but you could do it from Nuget
TChart lite component features
Does TChart lite component included in RAD Studio XE4 environment support GDI+ rendering or not ? Feature matrix doesnt tak about it. http://www.steema.com/featurematrix/vcl Searching in installation directory I found file VCLTee.TeeGDIPlus.hpp containing declaration of class TGDIPlusCanvas. If yes then how to enable it ?
To activate GDIPlus in C++Builder applications, add the header to the .h: #include <VclTee.TeeGDIPlus.hpp> And then create the Canvas directly: Chart1->Canvas = new TGDIPlusCanvas(); or through a variable: TGDIPlusCanvas *myGDIPlus = new TGDIPlusCanvas(); Chart1->Canvas = myGDIPlus;