I cannt access Microsoft SQL server to Intouch

Yes. Try the logMessages in your action script.
Try putting LogMessage(“the sqlConnect is starting”); before your sqlConnect portion.
Try putting LogMessage(“the sqlSelect is starting”); before the sqlSelect portion.
Try putting LogMessage(“the action script is at the end”); at the very end.

Those messages should be showing up in the log viewer.

Dear Bulletin blues, I've tried what you told me here this message on Logviewer.

This's action script for connect button
https://www.img.in.th/image/BPE4wA

and This's message from Logviewer.Look at date 11/11/2018
https://www.img.in.th/image/BPETCO
 
It looks like you have the LogViewer() functions set up properly in your action script.



The messages you entered should be showing up in the log viewer, yet I don't see them in your picture.



The reason I am asking about the log viewer is - it can usually present some valuable information, such as "connection string not valid," or "No tables selected."



I think that would be beneficial to have that set properly as you trouble-shoot your issue.


Could you possibly try making a button, without any of the SQL stuff, and just adding an action script that goes:


LogMessage("TESTING ACTION SCRIPTS");


Every time you click the button, you should be able to see that in the Log Viewer. Make sure that is working.


That would be my first step in approaching the problem.


I'm no expert by any means. I just happened to set up a test station last week connecting to SQL through InTouch scripting, and I had some issues. Log Viewer was a great resource.


Can you give any more info? Can you log into SQLServer and view the management logs?
 
It looks like you have the LogViewer() functions set up properly in your action script.



The messages you entered should be showing up in the log viewer, yet I don't see them in your picture.



The reason I am asking about the log viewer is - it can usually present some valuable information, such as "connection string not valid," or "No tables selected."



I think that would be beneficial to have that set properly as you trouble-shoot your issue.


Could you possibly try making a button, without any of the SQL stuff, and just adding an action script that goes:


LogMessage("TESTING ACTION SCRIPTS");


Every time you click the button, you should be able to see that in the Log Viewer. Make sure that is working.


That would be my first step in approaching the problem.


I'm no expert by any means. I just happened to set up a test station last week connecting to SQL through InTouch scripting, and I had some issues. Log Viewer was a great resource.


Can you give any more info? Can you log into SQLServer and view the management logs?

I make a new button with only these action script
LogMessage("TESTING ACTION SCRIPTS");

I think logviewer not show real time right ? because when i click this new button it doesn't show the present action.

I have none knowledge in this field,but "view the management logs" by you mean is THIS ?

https://www.img.in.th/image/BQ4G2r

or SQL server Agent ?

https://www.img.in.th/image/BQ4xIS

and detail follow by this link i uploaded the export files(.txt) from MS sql server.

https://drive.google.com/drive/folders/1t9HlegAXBwQWjTPeYCI_IVwTQ9ObgPRd?usp=sharing
 
From one of your pictures, it looks like you have the Log Viewer running as an ActiveX control, which is a great idea. I learned something from you!

I would like to ask though, are you aware that you can open the Log Viewer from the System Management Console? That would be the SMC icon on your taskbar. Opening the LogViewer from the SMC and selecting Default Group / Local would eliminate any update issues in your ActiveX scripting. You may already know this, but I just want to make sure.

Also, is your SQL Server networked to your workstation, or is everything installed on the same computer?

As far as the SQL Server logs, , it is good to watch that as well, as it will flag logon errors and password failures. It's worth keeping an eye on as you continue trouble shooting.
 
From one of your pictures, it looks like you have the Log Viewer running as an ActiveX control, which is a great idea. I learned something from you!

I would like to ask though, are you aware that you can open the Log Viewer from the System Management Console? That would be the SMC icon on your taskbar. Opening the LogViewer from the SMC and selecting Default Group / Local would eliminate any update issues in your ActiveX scripting. You may already know this, but I just want to make sure.

Also, is your SQL Server networked to your workstation, or is everything installed on the same computer?

As far as the SQL Server logs, , it is good to watch that as well, as it will flag logon errors and password failures. It's worth keeping an eye on as you continue trouble shooting.

I installed all components of Intouch Wonderware but I think SQL Server doesnt networked with workstation.I'm not sure

I don't know I'm new about wonderware product but i want to learn about intouch access with MS SQL Server and i also don't know about MS SQL Server much.

What I do
-First i create database by Window Authentication.
-Next I created user for SQL Authentication and set database permission for user.I've done by following this step from YOUTUBE
link: https://www.youtube.com/watch?v=Mkw7tRfh2_8&t=343s

and then i make action script on intouch for connect with SQL database that's all what i did.

should i need to do others things more ? for make intouch can access MS SQL Server.Could you tell me what should i do ? I'll give you more information.

here this's some more picture about SQL such as Log viewer,database permission and SMC LogViewer.

https://drive.google.com/drive/folders/1nhLbna81FXmtx9enKk5Snw2L_nFly6zV?usp=sharing
 
Have you tried to log into SQL by using Microsoft SQL Management Studio? If not download or add this tool to your computer and see what username it requires. Sometimes it will require the computer name\user like this: "Computer-Name\UserName".
 
Have you tried to log into SQL by using Microsoft SQL Management Studio? If not download or add this tool to your computer and see what username it requires. Sometimes it will require the computer name\user like this: "Computer-Name\UserName".

Yes i login sql server by using Microsoft SQL Management Studio in SQL Authentication connection by user that i created and configure database permission follow this step from
youtube : https://www.youtube.com/watch?v=Mkw7tRfh2_8&t=343s
 
I installed all components of Intouch Wonderware but I think SQL Server doesnt networked with workstation.I'm not sure

I don't know I'm new about wonderware product but i want to learn about intouch access with MS SQL Server and i also don't know about MS SQL Server much.

What I do
-First i create database by Window Authentication.
-Next I created user for SQL Authentication and set database permission for user.I've done by following this step from YOUTUBE
link: https://www.youtube.com/watch?v=Mkw7tRfh2_8&t=343s

and then i make action script on intouch for connect with SQL database that's all what i did.

should i need to do others things more ? for make intouch can access MS SQL Server.Could you tell me what should i do ? I'll give you more information.

here this's some more picture about SQL such as Log viewer,database permission and SMC LogViewer.

https://drive.google.com/drive/folders/1nhLbna81FXmtx9enKk5Snw2L_nFly6zV?usp=sharing

From one of your pictures, it looks like you have the Log Viewer running as an ActiveX control, which is a great idea. I learned something from you!

I would like to ask though, are you aware that you can open the Log Viewer from the System Management Console? That would be the SMC icon on your taskbar. Opening the LogViewer from the SMC and selecting Default Group / Local would eliminate any update issues in your ActiveX scripting. You may already know this, but I just want to make sure.

Also, is your SQL Server networked to your workstation, or is everything installed on the same computer?

As far as the SQL Server logs, , it is good to watch that as well, as it will flag logon errors and password failures. It's worth keeping an eye on as you continue trouble shooting.

I think I'm sure about password for sql authentication


from above step what i did
-create sql database
-create sql authentication
-action script to connect
this is all what i did.


there's something need to configure first before that step i've done ?
such as smc ? or anything ?
 
I'm not familiar with Wonderware / InTouch connection to SQL database but in Allen Bradley you have to make a DSN (Data Source Name) that is to set up an ODBC datasource in microsoft. Maybe this is missing?
 
I tried to set up a connection and could not connect. I then used Wonderware Alarm DB Logger Manager to set up logging of alarms to SQL. This worked and created the database called WWALMDB.

Next I added an Activex Control called wwGenericSQLGrid to InTouch. I created a page in my application for this and set up a connection to my database. After several attempts it did connect to the alarm database and displayed the database on the grid.

I used ActiveX scripts on the Window Script for the page and ran them "On Show". If you can get this link it gives some help on setup.

https://gcsresource.schneider-electric.com/support/Wonderware/UtilityReadme/t001046.htm

I will further attempt to connect with scripting alone when I have more time.
 
Now I am able connect the SQL server into intouch.

I figure out by change the column name it's invalid syntax.

I checked from error message by SQL function in Intouch and find that error code's meaning.

thanks for helping me. Have a nice day ! :)
 

Similar Topics

Hi I am confused , if i have made some mistake.I am using siemens S7 PLC. I wrote a program in FC and moved some data to a DB memory location...
Replies
2
Views
1,563
I have to provide remote access and control to a touch screen. I was thinking about using Weintek and the Weincloud. Does anyone know if this is...
Replies
2
Views
126
Greetings, I am working on a project and I would like to scale %AI to -10.0 to 10.0 VDC. The module Input data is stored as a 16 bit Integer and...
Replies
4
Views
49
Hi all Trying to remotely connect to a TIA Portal PLC. I can ping it without a problem but can't get my software to connect. I've opened port...
Replies
8
Views
281
Hi All, Can anyone advise me on how to determine the AN of a genie instance I writing to. I have created a genie to display a valve and some text...
Replies
0
Views
81
Back
Top Bottom