DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

"novalue" from SQL database

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

0 Kudos
Message 1 of 6
(4,329 Views)

Hey,

 

How exactly are you importing the data into DIAdem. Also, are you able to view the data alright using SQL queries?

Britton C.
Senior Software Engineer
National Instruments
0 Kudos
Message 2 of 6
(4,298 Views)

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

 

Capture.PNG

0 Kudos
Message 3 of 6
(4,293 Views)

Can you tell me

  • the DIAdem version
  • the version of the MS Access

Would it be possible to get

  • An example connection string
  • An MS Access file that shows your behavior
0 Kudos
Message 4 of 6
(4,281 Views)

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.

 

 

 

 

 

0 Kudos
Message 5 of 6
(4,273 Views)

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
0 Kudos
Message 6 of 6
(4,209 Views)