AGG Software Forums
September 20, 2024, 01:34:16 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome on our forum!
 
   Home   Help Search Login Register  

Pages: [1]
  Print  
Author Topic: TCP/IP Logger SQL errors - passing ":P0, :P1, etc." instead of values.  (Read 14865 times)
Transistor
Newbie
*

Karma: +0/-0
Posts: 2


View Profile
« on: April 15, 2014, 11:12:19 PM »

App: Advanced TCP/IP Logger.
Data export module: odbcexport.dll
The problem: "Data have been processed with errors." / "Writing to database temporarily disabled."
ODBC: Connection to SQL Server on a local server.

I've used the OPC data logger in a previous application so I know the basics. I'd say I'm very close to getting this app to work.

I have error logging configured as below:
Configure -> Modules -> Data Export -> odbcexport.dll -> Setup -> Errors Handling -> Reconnect and write a message to log file.

Here's what shows up in my log:

5/04/14 21:29:11 [192.168.31.151:9000,192.168.31.131:9000] SQLSVR. SQL:
INSERT INTO "Results" ("Date", "Time", "MachineID", "Product", "Weight")
VALUES (:P0, :P1, :P2, :P3, :P4)

Where are all the ":Px" values coming from? They should be the parsed data that I can see on the main window.

Many thanks.
« Last Edit: April 15, 2014, 11:48:17 PM by Transistor » Logged
Arthur Grasin
Tech. Support
Administrator
Hero Member
*****

Karma: +0/-0
Posts: 806



View Profile WWW
« Reply #1 on: April 16, 2014, 06:28:00 AM »

You should bind your columns with the parser variables on the "Binding" page. In the OPC logger the parser is built-in and you don't need to configure it. In the TCP logger you may configure the ASCII Data Parser. Please, visit the Tutorials section:
http://www.aggsoft.com/tcpip-data-logger/tutorials.htm
Logged
Transistor
Newbie
*

Karma: +0/-0
Posts: 2


View Profile
« Reply #2 on: April 16, 2014, 06:17:01 PM »

Thanks for the reply. I had completed the bind but seemed to have an error in the Date and Time fields. For some reason these caused the error message but when I removed these fields it works OK.

As it turns out I don't need Date and Time as I'm have another field in the database called InsertTime which defaults to GETDATE(). This is better in my application as the server clock is much more likely to be accurate than my weigh scales!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines