Options

The text 'generatesymbolreference Database=xxx ServerName=xxx' is too long

airamairam Member Posts: 88
hi, I'm trying to run the below command

.\finsql.exe Command=generatesymbolreference, Database="Demo Database BC (14-0)", ServerName="xxx"

but i'm getting the below error

Microsoft Dynamics NAV Development Environment
The text 'generatesymbolreference Database=Demo Database BC (14-0) ServerName=xxx' is too long. Text can have a maximum length of 47 characters.
OK

any ideas pls?

Answers

  • Options
    airamairam Member Posts: 88
    actually all commands from BC Shell are giving me the same error...
  • Options
    SilverXSilverX Member Posts: 134
    You have to use spaces after the commas. Without spaces everything is handled as a value to command.
    Cheers
    Carsten


    ==> How To Ask Questions The Smart Way

    This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
  • Options
    airamairam Member Posts: 88
    thanks for your feedback, however I am already using spaces after the commas.. I tried with spaces before, after, no spaces, no commas .. all giving an error
  • Options
    SilverXSilverX Member Posts: 134
    Oh, well. Now I see your ./ in front of finsql.exe. Can you please try to run the command in a Command Shell instead of PowerShell? I remember you have to mask the command in PS. If you need it in PowerShell, please refer to Microsoft.Dynamics.Nav.Ide.psm1 and see how RunNavIdeCommand is implemented or use the PowerShell wrapper directly.
    Cheers
    Carsten


    ==> How To Ask Questions The Smart Way

    This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
  • Options
    AsallaiAsallai Member Posts: 141
    edited 2023-12-19
    airam wrote: »
    hi, I'm trying to run the below command

    .\finsql.exe Command=generatesymbolreference, Database="Demo Database BC (14-0)", ServerName="xxx"

    but i'm getting the below error

    Microsoft Dynamics NAV Development Environment
    The text 'generatesymbolreference Database=Demo Database BC (14-0) ServerName=xxx' is too long. Text can have a maximum length of 47 characters.
    OK

    any ideas pls?

    I had the same when I use in direct way from Powershell like this:
    Export-NAVApplicationObject -DatabaseName $DBName -Path $ExpNAVAppObjectFilePath -Confirm -DatabaseServer $DBServer -ExportToNewSyntax -ExportTxtSkipUnlicensed -Filter $ExpObjectFilter -LogPath $pLogPath -Force
    

    but after I tried the Waldo's powershell script to run the Command indirect way, that is works:
    $exportfinsqlcommand = """$NAVIDE\finsql.exe"" command=exportobjects,file=$ExpNAVAppObjectFilePath,servername=$DBServer,database=$DBName,Logfile=$pLogPath"
    $Command = $exportfinsqlcommand
    cmd /c $Command
    

    https://waldo.be/2014/06/04/nav-2013-r2-export-objects-with-powershell-3/
Sign In or Register to comment.