Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84648members
353988posts

[Imported] Mimic Script Server.Query don't work

EcoStruxure Geo SCADA Expert Forum

Find out how SCADA systems and networks, like EcoStruxure Geo SCADA Expert, help industrial organizations maintaining efficiency, processing data for smarter decision making with IoT, RTU and PLC devices.

sbeadle
Janeway Janeway
Janeway
0 Likes
0
408

[Imported] Mimic Script Server.Query don't work

>>Message imported from previous forum - Category:ClearSCADA Software<<
User: florian, originally posted: 2018-10-25 20:20:39 Id:303
This is a re-posting from the obsoleted (October 2018) "Schneider Electric Telemetry & SCADA" forum.

-------------------------------

**_dareksm:_**
**_I cannot receive data when I use function Server.Query from mimic script (from any table)._**

**_I always get the error:_**

_PrepareQuery failed : Unknown Error 0x80072f19_

**_The same query runs in datagrid table works fine._**

**_This is my sample script:_**

Public Sub GetData()_
Dim DGRS _
Set DGRS = Server.Query("SELECT * FROM CDBPoint")_
If NOT(DGRS.Error) Then_
Msgbox OK, vbOK, "NO ERROR"_
Else_
Msgbox DGRS.ErrorMessage, vbCritical + vbOKOnly, "Error in SQL Command"_
End If_
End Sub_

------------------

AWoodland:
Hi,

Have a look at http://resourcecentre.controlmicrosystems.com/display/CS/Diagnosing+Scripting+Connection+Errors, it should help you identify the possible causes.

The mostly likely cause is that the ClearSCADA WebX port is in use by something else, IIS for example, and so ViewX scripting can't connect to get data.