Database error (operation=GET-LE, error=105)

SUGGESTED

Dear Gurus,

I am using SAGE 300 Premium 2018.
I installed and loaded SAMSYS, SAMINC and SAMLTD.

I am at the General Ledger Module --> G/L Transactions, trying to browse Journal Entries.

Whenever I scroll to the end of the entries, I will get this error: 

Description: Journal Header.    Database error (operation=GET-LE, error=105).    [Microsoft][SQL Server Native Client 11.0][SQL Server]Unclosed quotation mark after the character string 'ÞÞÞÞ?)) order by "BATCHID" desc,"BTCHENTRY" desc'.  Please refer this error to your database administrator or see your database documentation for further assistance.

This happens on both SAMINC and SAMLTD.
If I browse through a client database, there are no errors.

Kindly assist how do I resolve this error.
Thank you for your kind assistance.

Top Replies

  • HI H 

    Well done. After reading all the above updates, it looks as if the original data when you installed and loaded SAMSYS, SAMINC and SAMLTD were corrupt or not compatible to the new environment.

  • Whoa! @H I've never seen characters like that in the sample data.  Is the samdata localised to your region?  What SQL Collation are you using? You might want to select * from GLJEH and export the results to Excel and post a link to the file for us to review to see if its data.  Alternatively post a link to the Samdata you used and we can try loading it up to see if the data is at fault.

    Here is how I setup my Databases in Database Setup (this is a demo system using 'SA' but follow the install guide to setup a proper SQL Auth account for Sage 300 and map db_owner permissions to that SQL account for your databases, or at least dbreader, dbwriter:

    Sage recommend that you use a binary collation method, such as Latin1_general_bin.

    Coolest error I've seen in a while Rofl  Cheers...Tim

  • 0 in reply to Accsys Consulting AU

    Dear Tim,

    Thanks for your reply Slight smile

    The samdata is for Asia Pacific and those characters might be Chinese, but no Chinese characters are used in GLJEH.

    I have tried changing JRNLDESC field to get rid of unwanted apostrophes but it didn't work.

    Here's the info you have requested:

    Microsoft SQL Server Management Studio: 12.0.2000.8
    Collation: SQL_Latin1_General_CP1_CI_AS (I have tried changing to Latin1_general_bin, it didn't work Disappointed)
    Databases are using 'sa'.

    The Database setup is similar to yours. linking via Server.

    GLJEH.xlsx

    Here's a link to the SAMLTD/SAMSYS files

    SAMDB

    Appreciate your help Slight smile
    It's not a cool error, it's annoying Stuck out tongue

  • 0 in reply to h@AIT

    Hi  I can understand its annoying Blush That collation is fine - don't try and change it as you really need to delete the database and create it fresh or run scripts to ensure the change propagates down.  I think that's the default collation used on a lot of MSSQL editions and I've never seen a problem with it - I likely have several clients on it.  Your data looked fine in the Excel sheet so I loaded it up:

    I created two databases using the same collation as you...:

    Loaded them up - SAMSYS into TSTSYS and SAMLTD into TSTDAT...:

    Launched Sage 300 and upgraded it to my version...:

    Activated the modules to my version...:
      

    And opened the G/L Batch list and scrolled to the bottom...:

    So its all looking perfect!

    Where do you think you went wrong?  Just to confirm you're using identical databases for SAMLTD and SAMSYS?  You have SAMSYS as the System database for SAMLTD in Database setup?  I think you're on SQL 2014 based on the version number - is that right?  That should work fine with Sage 300 2018.

    Hang on...unclosed quotation marks.  Were you trying to import a Journal from a CSV file?  Is this an activity to develop an import template?  If that's the case then I think we can help.  Can you give me more background leading up to this?  Cheers Thumbsup

  • I would double check the apostrophes in the JRNLDESC field in case you missed one.

    Rows 54, 59, 100, 108, 121, 127, 277, 283, 411, 421 (in your Excel file) contain apostrophes in the  JRNLDESC field.

    Also - it might not hurt to do the same check for GLBTCL.BTCHDESC.

  • 0 in reply to Accsys Consulting AU

    Thanks for helping out and testing the data, Tim! Appreciate it.

    I was inserting data into GL Journal Entry from a macro when I noticed this error.
    So I uninstalled SAGE 300, reinstalled and loaded the sample data to test.
    Even with a fresh install of Sage and SAMLTD db, the error still occurred.

  • Thanks, Shane.
    I tried replacing the fields in both tables but the error still persists. Disappointed
    The original data is from Sage too so I can't figure out where the error is since Tim has also loaded the data and it worked in his setup. 

  • 0 in reply to h@AIT

    Hi could you send me your ODBC details by running the following Powershell script?

    Get-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\ODBC Data Sources\' |
    ForEach-Object {
    $dsnName = $_.PSChildName
    $driverName = $_.Driver
    
    $driverPath = $_.'Driver32'
    
    $attributeValues = Get-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\$dsnName\"
    
    Write-Host "DSN Name: $dsnName"
    Write-Host "Driver: $driverName"
    Write-Host "Driver Path: $driverPath"
    Write-Host "Attributes:"
    
    $attributeValues | Get-Member -MemberType NoteProperty | ForEach-Object {
    $attributeName = $_.Name
    $attributeValue = $attributeValues.$attributeName
    Write-Host "- ${attributeName}: ${attributeValue}"
    }
    
    Write-Host "----------------------"
    }

  • 0 in reply to Accsys Consulting AU

    Hi Shane,
    Here's the info requested.
    I didn't use ODBC since the SAGE setup is via direct SQL as per Tim's sample.

    ___________________________________________

    DSN Name: ODBC Data Sources
    Driver:
    Driver Path:
    Attributes:
    - PSChildName: ODBC Data Sources
    - PSDrive: HKLM
    - PSParentPath: Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI
    - PSPath: Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\ODBC Data Sources\
    - PSProvider: Microsoft.PowerShell.Core\Registry
    - WIN7SP12018: SQL Server Native Client 11.0
    - Xtreme Sample Database 11.5: Microsoft Access Driver (*.mdb)
    ----------------------

  • 0
    SUGGESTED

    Hi All,

    I used a workaround to "fix" the issue.

    I got a database dump of a working company database from a different source, and loaded that as a dummy database.
    Then I dumped the SAMLTD data and loaded it to the dummy database.
    Now it works.

    Not sure what is the root cause and how to fix the original issue, but I am moving on from this weird error that has been tormenting me for days Confounded

    Thanks Tim and Shane for helping and trying out the data. Slight smile
    Appreciate it much!

  • 0 in reply to h@AIT

    HI H 

    Well done. After reading all the above updates, it looks as if the original data when you installed and loaded SAMSYS, SAMINC and SAMLTD were corrupt or not compatible to the new environment.

  • 0 in reply to h@AIT

    Just a note when you use the "Server" option in Database Setup it still uses ODBC, it just uses a Native Client that allows you to connect to all databases though a single DSN.  If you select "Data Source" you have to create individual ODBC DSN's for every database.  So don't ever delete your DSN connection thinking you don't need it BlushThumbsup

  • 0 in reply to h@AIT

    I'm glad you were able to resolve it in the end.