DataWorx PLC Pro

MarkTTU

Lifetime Supporting Member
Join Date
Jun 2004
Location
Lago Vista, Texas
Posts
646
I've got a copy of DataWorx PLC Pro connecting a DL06 to an Access database. I've figured out how to insert data into the database and update a record in the database, but I can't figure out how to query the database and get information back into the PLC.

Every time I try my query I get this error message in the DataWorx Monitor:

Procedure ID 2 (select): -2147217900 : Syntax error (missing operator) in query expression '[Gift Code]='. Original data: 240960000000000000000000000000000000000000000000000 Anyone have any ideas?
 
Is it possible for you to post the SQL String?

There seems to be an error with it, in the database field named [Gift Code]. I assume the query is asking for data WHERE [Gift Code] = something.

Usually these errors come about because something needs to be in single quotes for text, or no quotes for numbers, or # for dates.
 
In trying to get this to work I'm not using the same data fields at the moment, though everything is long int in my db... Here's what I've got at the moment; it returns the same error code, but for the different table.

Select Data.[Gin ID] From Data Where Data.[Gin ID]=V17021

This is what shows up when I SQL statement window if I edit the procedure. I can't edit the SQL statement, nor can I see what actual SQL statement is generated and used to perform the actual query.
 
Update...

I just got off the phone with BizWare. They confirmed that the select procedure does not work because of an SQL string problem. They say they're working on it and I should have a new version first thing Monday... I hope so as I need to have a fully functional program running database operations at a convention next week, at least they called me back.

I'll keep ya'll updated.
 
Since your ID has a letter in it the field in Access must be a text field. And the value must be in single quotes in the SQL statement like this: 'V17021'.

If you are using integers for the Access fields then drop the V and the following SQL statement will work:
Select Data.[Gin ID] From Data Where Data.[Gin ID]=17021
 
V17021 is the PLC register that holds the data for the where part of the statement. If when the SQL string is executed V17021 is replaced with the number that resides in V17021 then the SQL string should work.

The guys at BizWare weren't real specific on what the problem was, but they did admit they have a problem with the select function; my guess is that the actual SQL string sent to the db isn't generated correctly... hopefully I'll find out more this morning.
 
Update-

The guys at BizWare now claim that everything works except when trying to pull an ASCII string from the database. Unfortunately this is not true for me, none of my select statements work at all, even very simple things don't work.

Has anyone used DataWorx Pro to query a database before? I need help as I really need to finish this project this week and the BizWare guys are now all unavailable (no one answers the phone).

Thanks to anyone who has an idea...
 
The SELECT statement is incorrect. You are asking to return the data in column [Gin ID] where [Gin ID] = V17021, well that would be V17021. You are not asking for the correct column in the statement.

I don’t know how they have their database set-up but the SELECT statement either needs to have another column along with the [Gin ID] or a different column all together.

So the SELECT statement might read as –

Select Data.[Value] From Data Where Data.[Gin ID] = V17021
 
OK, here's the scoop. DataWorx has a bug. Right now SELECT statements only work with integers and floats. ASCII and BCD are not working correctly, but they are working on a fix.

Thanks to everyone who offered a hand with this.
 

Similar Topics

Good Afternoon, Under the PLC configuration page in the Dataworx PC software, I am trying to add PLC memory locations in the Fields section...
Replies
0
Views
1,514
The past week we received a new piece of equipment from Germany which utilizes siemens controls. Typically in our company we use A.B. controls for...
Replies
7
Views
128
the conveyor can stop because of a safety sensor or safety switch. And also it can stop because of an object jam detector sensor. If the conveyor...
Replies
5
Views
177
Good Day to all of you, this is my first post, i will try to explain as best as possible, english is not my natural language. I am performing an...
Replies
0
Views
36
Hi All, Someone at work has put a PLC system on my desk, that's just been taken off an idle production line. He said "It's an S7 PLC. We don't...
Replies
10
Views
247
Back
Top Bottom