Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

Report Generation using Citadel & Excel in VB

I want to generate report using citadel sql server, i,am using excel for report viewing. I have written a Visual Basic code for fetching data from srq to excel. The problem is when i fetch all the fields from sql it generate report, but when i gave a single variable name like Mycomputername/process/pot1@value it give a error column:Mycomputer not exsist.
 
Given below is the code wriiten to get the value.Please suggest ASAP
 

'****** GET HEPTANE RECORDS ******
Sub GetHEPTANERecords(ByVal rNumber As Integer, ByVal dDate As Date, ByVal sTime As Date, ByVal eTime As Date)
    Dim ReadHEPTANE As ADODB.Recordset

    Set ReadHEPTANE = GetConnection.Execute("SELECT TRANSTECH34/SRS/LVL_GALL_TK1  FROM IntData WHERE [LOCALTIME] BETWEEN '" &
sTime & "' AND '" & eTime & "'")
  
Thanks & regards
 
Mantosh
0 Kudos
Message 1 of 2
(3,435 Views)
Mantosh,

Have you seen this developer zone article which details accessing Citadel Data using COM+ and ADO?
http://zone.ni.com/devzone/conceptd.nsf/webmain/725A6C3843F13C8786256EA600633724#6

Also, this KB article provides more detail on how to access Citadel data using SQL commands and I think will help answer your question:
http://digital.ni.com/public.nsf/websearch/C7D32F9A59D4637086256A7200692F30?OpenDocument




--Paul Mandeltort
Automotive and Industrial Communications Product Marketing
0 Kudos
Message 2 of 2
(3,413 Views)