Ik have a big problem in my wincc flexible application.
We run wincc flexible advanced on the pc V2008 sp3.
On the siemens website in found some examples of SQL communication over ODBC. I do use a Microsoft access database instead of the one they use in the examples.
Anyhow all communication works over ODBC as long i compare integers or time and data in my WHERE statement.
My problem: Now i need to compare a string in WinCC flex to the data in the database. The data in the data base is text 255 chars. Whatever i try i dont get it to work.
My Code that is not working:
Set conn = CreateObject("ADODB.Connection")
Set rst = CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM t_Machines WHERE Machine_Name=" & Chr(34) & strMachine & Chr(34) & ""
I also tried Chr(39) and also with just ' " & strMachine & " '
Wincc gives an error but does not define what is wrong. I only know that the selection works the not the part after WHERE.
Anyone know how to compare a string to text in WinCC flex
|=== Edited by MVSeat @ 6/28/2012 10:07 AM [GMT ] ===|