ODBC Driver

Discussion about communication protocols (configuration, functions, hardware required).
capitanui
Posts: 8
Joined: Wed Jan 12, 2011 1:33 pm

ODBC Driver

Postby capitanui » Tue Jan 25, 2011 2:28 pm

Can i write multiple values to a database with a single query?

I have a table

id | value1 | value2
| |
| |

I defined 2 gates with address QUERY_1,QUERY_1 for writing

On ODBC driver configuration at Write SQL Queries at QUERY_1 i wrote : INSERT INTO <table> (value1, value2) values (%4.2lf, %4.2lf) or INSERT INTO <table> (value1, value2) values (%g, %g)

It writes only in the first column, at first query the first value, second query the second value! I also tried to group the gates in a block but for nothing...

Is ther any solution for this issue?

Thanks in advance!

User avatar
admin
Site Admin
Posts: 322
Joined: Tue Nov 17, 2009 1:18 pm

Re: ODBC Driver

Postby admin » Wed Jan 26, 2011 3:44 pm

Dear Sir,
currently this is not possible. To insert two values is necessary to make a query with INSERT and then with UPDATE. The end result is the same.

capitanui
Posts: 8
Joined: Wed Jan 12, 2011 1:33 pm

Re: ODBC Driver

Postby capitanui » Wed Jan 26, 2011 4:16 pm

admin wrote:Dear Sir,
currently this is not possible. To insert two values is necessary to make a query with INSERT and then with UPDATE. The end result is the same.

Thanks..i already did as you said!

Lesan
Posts: 2
Joined: Mon Oct 24, 2011 6:30 am

Re: ODBC Driver

Postby Lesan » Mon Oct 24, 2011 6:52 am

First, sorry for my bad english. :oops:

I want read single gate value, i wrote: SELECT ident FROM w_sledljivost_osnovni_podatki_sedeza WHERE sedez_id=3500000. But i want value sedez_id insert from text box on template? Text box contains another gate.
Attachments
explanation.JPG
explanation in picture
explanation.JPG (102.99 KiB) Viewed 5160 times

User avatar
admin
Site Admin
Posts: 322
Joined: Tue Nov 17, 2009 1:18 pm

Re: ODBC Driver

Postby admin » Wed Oct 26, 2011 10:03 am

Dear Sir,
I think I understand what you need. Try this demo with its database.

http://www.winlog.it/forum/download/Demo_Select_ODBC.zip
http://www.winlog.it/forum/download/test.sql

Best Regards

Lesan
Posts: 2
Joined: Mon Oct 24, 2011 6:30 am

Re: ODBC Driver

Postby Lesan » Wed Oct 26, 2011 3:08 pm

Thank you very much, it works.

I only have one more question. How do I restart automatically on failure of the ODBC connection?

User avatar
admin
Site Admin
Posts: 322
Joined: Tue Nov 17, 2009 1:18 pm

Re: ODBC Driver

Postby admin » Thu Oct 27, 2011 8:19 am

Hi,
we solved this problem in the new version of Winlog. Download the new version from http://www.sielcosistemi.com

Best Regard


Return to “Protocols”

Who is online

Users browsing this forum: No registered users and 1 guest