DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

DIAdem 2014 sql_execDirect() type mismatch

I need to convert a *.sud file (which currently works in DIAdem 11) to DIAdem 2014. Need your help please.

When I execute the sud file, it gave the following errors:

 

Error in <graphTool.sud, graphDlg> (Line: 1411, column: 3):

SU event context:

 Dialog_EventInitialize(...)

 cbTestSet_EventChange(...)

 cbPartNo_EventChange(...)

 ...

 

Type mismatch: 'SQL_Execdirect'

 

 

 

This is the section of the code in the SUD file:

 

Sub cbPartNo_EventChange(ByRef This) 'Created Event Handler
  'Clear all of the listboxes since a new part number is chosen
  guiObj.clearLB(1)  
  guiObj.partNo = cbPartNo.InterpretedText

  'Query for serial numbers
  T1 = "Select distinct a.serial_no from test_run_meas_channels a, test_runs b where a.part_no = '"&guiObj.partNo&"' AND a.test_date = b.test_date AND a.part_no = b.part_no AND a.serial_no = b.serial_no " & rfilter &passFilter
  msgbox T1
  sTime = Timer
  Call SQL_Execdirect("T1")    '==== LINE 1411
  eTime = Timer
  If logSpeed = 1 Then
    fTime = eTime - sTime
    fsoStream.Write T1 & vbCr & fTime & vbCr
  End If
  'Call sqlObj.SQLselect("distinct serial_no", "test_run_meas_channels", "part_no = '"&guiObj.partNo&"'"&passFilter)
  Call sqlObj.SQLResultsToXBox(lbSerialNo, 1, 0)

  If lbSerialNo.X.ListCount > 0 Then
    lbSerialNo.X.Selected(0) = True
  End If
End Sub

0 Kudos
Message 1 of 2
(4,253 Views)

I found the answer. Need to register the gfsODBC.DLL in DIAdem 2014.

http://digital.ni.com/public.nsf/allkb/AA704980F461DD9386256C000064A1BF

0 Kudos
Message 2 of 2
(4,250 Views)