ODBC Driver

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

ODBC Driver

Post by capitanui »

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: 373
Joined: Tue Nov 17, 2009 1:18 pm

Re: ODBC Driver

Post by admin »

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

Post by capitanui »

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

Post by Lesan »

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 in picture
explanation in picture
explanation.JPG (102.99 KiB) Viewed 9898 times
User avatar
admin
Site Admin
Posts: 373
Joined: Tue Nov 17, 2009 1:18 pm

Re: ODBC Driver

Post by admin »

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

download/Demo_Select_ODBC.zip
download/test.sql

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

Re: ODBC Driver

Post by Lesan »

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: 373
Joined: Tue Nov 17, 2009 1:18 pm

Re: ODBC Driver

Post by admin »

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

Best Regard
Post Reply