AGG Software Forums

Online Help Center => Data loggers and plug-ins => Topic started by: amikhailov on February 20, 2017, 10:32:28 PM



Title: SQL Database Pro
Post by: amikhailov on February 20, 2017, 10:32:28 PM
Recently we have upgraded from the Advanced Serial Data Logger to the Data Logger Suite.
Unfortunately some of the SQL queries do not work anymore. The typical example is like this

  IF :P4 = 1 
         BEGIN
         UPDATE serialSKU
         SET SKU = (SELECT modelNum FROM instanceNum WHERE instanceNum = :P3)+:P2
         WHERE serialNum = :P1
         END

SQL editor gives an error message [Field 'P4' is of an unknown type]. How could I declare the parameter :P4 if no parameter is created after the editor error?

The query

         UPDATE serialSKU
         SET SKU = (SELECT modelNum FROM instanceNum WHERE instanceNum = :P3)+:P2
         WHERE serialNum = :P1

works just fine and creates parameters P1, P2, P3.   


Title: Re: SQL Database Pro
Post by: Arthur Grasin on February 21, 2017, 08:30:02 AM
Hello,

Please, update the plugin:
http://www.aggsoft.com/download/sqldbpro.exe

this problem has been fixed.


Title: Re: SQL Database Pro
Post by: amikhailov on February 21, 2017, 09:41:33 AM
Fixed. Thanks a lot.


Title: Re: SQL Database Pro
Post by: amikhailov on February 22, 2017, 10:02:03 PM
Unfortunately the fix does not work. The server drops the connection, the error message is the same  [Field 'P4' is of an unknown type]


Title: Re: SQL Database Pro
Post by: Arthur Grasin on February 23, 2017, 09:01:57 AM
This error may appear if a variable that should be assigned to :P4 does not exist in some data packets.


Title: Re: SQL Database Pro
Post by: amikhailov on February 23, 2017, 12:47:47 PM
It is not the case -- the data packet is a barcode scaner output, no blanks, no losses.

Each time I scan -- each time I get the error message [Field 'P4' is of an unknown type]. At the moment P4 is automatically created in parameters section and is manually assigned to the parser variable.