[QODBC-Desktop] Sample Code for VB.NET with QODBC
Posted by brad waddell on 12 March 2009 05:21 PM
Sample Code for VB.NET with QODBC
Sample Code of VB.NET to Create DataSet
Note: The following code is the minimal code required to create a DataSet from the SQL statement and attaches the dataset to a DataGrid.
cnQODBC = New System.Data.Odbc.OdbcConnection("DSN=QuickBooks Data")
Please click here for downloading sample VB.Net project.
If you are using a 64-bit system, then you can specify x86 as Target CPU in Visual Studio.
Change project properties | Advanced Compile Options... | Target CPU | x86
If you want to use as a 64-bit, then you need to use QRemote 64-bit DSN “QuickBooks Data 64-bit QRemote” in the connection string.
QODBC Edition Related
The difference between the Desktop and the Server Edition is that for running Service based application Server Edition license is required. The service-based application is active in the Server Edition which allows applications that call through a Windows Service (such as IIS, ColdFusion. MS SQL Server) to use QODBC and QuickBooks. So QODBC Server Edition should be chosen when using .NET.
See also: http://www.qodbc.com/qodbcfree.htm for more about the differences between the Desktop and Server Edition.
IE Hanging Problem
Sometimes one could get the problem that when trying to open the QODBC connection but the IE hangs. To resolve this use QRemote DSN "QuickBooks Data QRemote" instead of "QuickBooks Data" DSN See: How to use QRemote for more.
Please click here for Sample code for ASP C# QODBC connection
Keywords: sample .net, sample, .net, Dot Net, C#,C#.Net ,VB.Net