[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 is the minimal code required to create a DataSet from the SQL statement and attach the dataset to a DataGrid.
cnQODBC = New System.Data.Odbc.OdbcConnection("DSN=QuickBooks Data")
Please click here to download a sample VB.Net project.
Using a 64-bit system, you can specify x86 as Target CPU in Visual Studio.
Change project properties | Advanced Compile Options... | Target CPU | x86
To use it as a 64-bit, 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 when opening 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 the Sample code for the ASP C# QODBC connection.
Keywords: sample .net, sample, .net, Dot Net, C#,C#.Net ,VB.Net