11-03-2015 03:15 PM
Hello,
I am trying to connect my SQL database to diadem. I have a configuration file for a data store that shows all my groups/channels but when I load the data and try to view it i get "novalue"for all the channels except for the timescale.
Does anyone have any suggestions?
Thanks
11-04-2015 01:58 PM
Hey,
How exactly are you importing the data into DIAdem. Also, are you able to view the data alright using SQL queries?
11-04-2015 02:23 PM
Britton,
I am importing the data by using the ADO Connection String by making a new data store (see picture below). I am able to view the data using Microsoft Access queries and the data looks good ok so we are pretty confindent that everything is ok before we try to bring it into DIADem.
Rick
11-05-2015 01:10 AM
Can you tell me
Would it be possible to get
11-05-2015 08:15 AM
I am using Diadem 2015 (32bit) 15.0.0f6005 and MS access 2013.
Below is a example of the connection string i have been using.
Provider=MSDASQL.1;Password=PASSWORD;Persist Security Info=True;User ID=Engine;Extended Properties="Description=WV database;DRIVER=SQL Server;SERVER=WVDB;UID=Engine;APP=Microsoft Office 2013;WSID=USER;DATABASE=Engine";Initial Catalog=Engine
I am unable to get you an MS Access file but with us trying to pull the information right from the SQL database it should not be a big deal.
11-10-2015 01:39 AM
Do you know which datatype is stored in your channels.
I tested with an MS SQL server but was capable to load some channels.
If you check the DIAdem help you will find ADO Example Script where you could load using an SQL command.
Maybe this could be used as workaround.
Data.Root.Clear
'Include contains some ADO constants
Call ScriptInclude(ProgramDrv & "\Examples\Documents\" & "adovbs.vbs")
Dim oAdoConnection
'Establishes the ADO connection
Dim MdbName
'Suggested file is Example.mdb
MdbName =DataReadPath & "Example.mdb"
AdoConString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & MdbName & ";Persist Security Info=False"
'Calling the ADO connection dialog
Call AdoConStrGet
Dim sAdoConnectString
sAdoConnectString = AdoConString
if sAdoConnectString <> "" Then
'Generating the ADO connection object
Set oAdoConnection = CreateObject("ADODB.Connection")
'Setting readwrite mode
oAdoConnection.Mode = adModeReadWrite
'Opening connection
oAdoConnection.Open sAdoConnectString
'Setting cursor location to client
oAdoConnection.CursorLocation = adUseClient
'Reading data
Dim RecordSet
Set RecordSet = CreateObject("ADODB.RecordSet")
RecordSet.ActiveConnection = oAdoConnection
'If neccessary, replace the following channel name
RecordSet.Source = "SELECT * FROM Example Where TIME < 20" 'The channel name "Time" is language-specific
RecordSet.CursorType = adOpenKeyset
RecordSet.LockType = adLockOptimistic
RecordSet.Open
'Numeric Channel
Dim aValues
'Getting 4 columns
Dim aColumnNames
'If neccessary, replace the following channel names
aColumnNames = Array("Time","Speed","Revs","Torque") 'The channel names are language-specific
aValues=RecordSet.GetRows(-1,0,aColumnNames)
Dim Channel
'Transfer values into DIAdem channels
Channel = ArrayToChannels(aValues,aColumnNames,True)
End if