Revision History


ODBC Driver .Net Library


Download 1.41 Mb.
Pdf ko'rish
bet7/14
Sana03.02.2023
Hajmi1.41 Mb.
#1148516
1   2   3   4   5   6   7   8   9   10   ...   14
Bog'liq
Lacerte SDK Developer Instructions

ODBC Driver
.Net Library
Data Access
Read access to tables 1-7
Yes
Yes
Write access to tables 1-7
Yes
Limited fields are exposed for write
Read / write tax detail
Yes
No
Access method
SQL through ADO/ADO.Net Bulk retrieval as XML, In future treat Lacerte 
client as business objects through COM 
Interface
Integration
Standard ADO / 
ADO
.Net or 
similar framework
Yes
No
Programmatic access through 
classes/interfaces
No
Yes


Lacerte Software Development Kit Developer Instructions 
pg. 9
Suitable for DB-aware 
products
Yes
No
Features
Create New Client
No
Yes
Installing Lacerte SDK
Note : If you already have a prior version of the SDK installed, you must remove it by going to control 
panel (Add or Remove programs) to get the version uninstalled by right click -> Select Uninstall -> 
Lacerte SDK (XX Bit).
For 32 bit installation:
For 64 bit installation:


Lacerte Software Development Kit Developer Instructions 
pg. 10
  
1. Download SDK installer visiting the 
Intuit Developer Portal
 (for 32-bit applications x86 MSI and 
for 64-bit applications on 64-bit windows x64 MSI).
2. Unzip the content to a local directory of your choice
3. Double click on “.msi” file from the directory
You can verify the Lacerte installer SDK was installed by checking for the “Lacerte SDK” in the 
“Programs and Features” (Control Panel\All Control Panel Items\Programs and Features).


Lacerte Software Development Kit Developer Instructions 
pg. 11
Figure: An example of 32 bit installation
Note:  Currently the installer is a silent UI and exit without any popup message, installation is expected 
to take less than 3 minutes and will disappear once it is completed.
ODBC Driver
About
The Lacerte ODBC driver is a standard ODBC driver with specific implementations to provide create, 
read, update, delete (CRUD) capabilities on the tables and detail files in a Lacerte Datapath. Like most 
ODBC drivers you can use either a DSN (data source name) or a connection string to connect to the 
Lacerte Datapath.
The following sections will walk through simple examples of using the Lacerte ODBC driver with Excel.
These are for illustrative purposes only and you should use your programming language and 
framework’s specific implementations for connecting to Lacerte data via the Lacerte ODBC driver.
Using ODBC Driver with a DSN
A DSN is a static reference to a data source. If you need to connect to more than one module or 
Datapath, you need to set up multiple DSN’s with unique names and configured to the appropriate 
Lacerte Datapath directory.
1. Run the installer as described 
above
2. Configure the ODBC for your data path
a. Open the control panel and search for ODBC
b. Open the ODBC Data Sources (32-bit) (or ODBC Data Sources (64-bit) if using the 64-bit 
Lacerte SDK Installation).
i. See 
Appendix for Windows 7


Lacerte Software Development Kit Developer Instructions 
pg. 12
a. Select the System DSN tab and choose LacerteDSII
b. Click on the Configure button to set the data path. The year and tax module are 
optional.
3. The Return Type and Tax Year are optional and should be used if the Datapath contains data for 
multiple tax modules within the same directory. That is to say there is a DATA1I18.DBF and a 
DATA1P18.DBF in the Datapath.
Read Example using DSN in MS Excel
This example will walk through the steps to read data from a Lacerte Datapath in Excel using a DSN.
Steps to read from DBF:
1. Select the Data tab in Excel
2. Choose From Other Sources and then From Data Connection Wizard
3. Select the ODBC DSN in the Data Connection Wizard


Lacerte Software Development Kit Developer Instructions 
pg. 13
4. Select the Lacerte DSII choice and the tables should be listed
5. Click Finish (or next for advanced options)
Using Lacerte ODBC Driver and VBA in MS Excel
You can use Microsoft’s Visual Basic for Applications in Excel to execute SQL queries.
Steps to use VBA:
1. Start with a blank Workbook and select the Developer Tab.
2. Choose Insert and Button to drop a button on the sheet
3. Provide a name (i.e. ReadData) and click on New
4. Enter the following text between the two lines provided


Lacerte Software Development Kit Developer Instructions 
pg. 14
Dim conn As New ADODB.Connection 
conn.Open 

LacerteDSII

Dim rst As Variant 
Set rst = conn.Execute(

Select * FROM [DATA1-Client Info]


Range(

A1

).CopyFromRecordset(rst) 
5. Enable the ActiveX Data library from Tools, References (this setting is not saved and must be 
selected for new sessions of Excel).
6. You can now use this button to read in the table data.
Some additional operations you can perform using VBA can be found in the 
Appendix
Connection String
A connection string is an alternate way of connecting with the database and it’s very useful when the 
data source varies. For example, an automated job used to perform an operation on multiple data 
paths. In this scenario you could create a script that iterates over the multiple paths and uses the path as 
a parameter in the connection string. Here’s a possible script to use multiple data paths in a connection 
string:
For i = 1 To 2
If i =1 Then
conString = “driver=LacerteDSIIDriver; DataDir=c:\Lacerte\18tax\idata;”
Else if i = 2 Then
conString = “driver=LacerteDSIIDriver; DataDir=c:\Lacerte\18tax\pdata;” End 
if
Dim Conn As New ADODB.Connection
Conn.ConnectionString= conString
Conn.open 
Next i

Download 1.41 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   10   ...   14




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling