Skip to main content
Level 3
December 22, 2019

Insert Data into Detail Table

  • December 22, 2019
  • 1 reply
  • 10 views

I recently discovered the Lacerte SDK and am excited by the promise.  I am having no trouble reading data, but cannot get data written.

I am using Python with the pyodbc driver to connect to the database.  

For example, trying to add to the Dividend Screen (Series=13) a value for Capital Gains (Code=3) for an existing entry (Prefix=1)

import pyodbc
cnxn = pyodbc.connect(r'driver=LacerteDSIIDriver; DataDir=L:\19TAX\IData;',  autocommit=True)
cursor = cnxn.cursor()
cursor.execute("INSERT INTO [ZZZDEV2-Detail] (Series, Prefix, Code, Suffix, StateAbbr, Amount, Description) VALUES (13,1,3,1000,'IL',69,'DAN');")
cnxn.commit()

This executes without error, but no data is written to the table.

The Lacerte SDK manual indicates the ODBC driver can write to the Detail table, but I could not find any examples.

Has anybody written to the Detail table?  Care to show the code?

    This topic has been closed for replies.

    1 reply

    djbAuthor
    Level 3
    January 22, 2020

    For those following along at home, this was fixed in the 1/20/20 update of the SDK.  I can now read and write Details.

    Thanks!

    Level 3
    November 3, 2020

    @djb I'm curious if the pyodbc module still functions for you when connecting to the DB?

    I am attempting something similar but it fails at Registration portion of the connect method.
    If I'm not mistaken, the OAuth-type authentication was a recent addition and I'm wondering if it's worth my time to troubleshoot (Or if it's even possible without using .Net).


     

     




    Level 3
    February 4, 2021

    For future reference, the Python version needs to match the ODBC version (32bit vs 64bit)