Re: [foxboro] data required from historian database on AW51B server

Hi,

  I guess the first thing would be to verify that you have a working ODBC
driver and can make any ODBC connection.  There are many stages that the
ODBC connection can fail, from the application you are using to call the
driver, the driver settings in the control panel of the PC you are using, to
your LAN network, FOX API settings, and finally the historian itself.

  Our ODBC problems were usually on the client PC.  The ODBC driver that
shipped with PIM Suite 2.0 did not work with our Excel applications and we
got an updated version from FOXTAC.  That did not work either, and they sent
us a third copy of the driver that has worked well for us.

  Our current versions of software:

I/A Series Historian Driver 3.00.11.25
Windows NT 4.0 Service Pack 6a
Excel 2000

  Are you able to use your current ODBC driver in Excel?  If so then you can
narrow down your problem to FoxPro.  If it doesn't work in Excel then you
should be able to get some info from the error messages.  If your problem is
a simple date format problem then this is the format that works for us in
Excel:

QueryStart = "{ts '" & Format(TimeSpan, "yyyy-mm-dd hh:nn:ss") & "'}"


  In Excel you have to have installed the ODBC support files from the
Microsoft installation disks.  All of our Excel applications require the
file "Xlodbc.xla" to work with the Foxboro ODBC driver.

  A simple query to test your ODBC in Excel (that does not use a date):
'****************************************************************
' *  EXCEL TEST MACRO

Sub GetSamplePointNames()

    'Get the selected database table names
    connstr = "DSN=Foxboro_Historian;AP=2CCAW1"
    'Open the server connection
    connectionID = sqlopen(connstr)
    
    '** REPLACE "histcc" with your historian name
    historian = "histcc"

    'Build the SQL query string
    SQLString = "SELECT Source FROM" & historian & ".sample GROUP BY Source"

    numColumns = sqlexecquery(connectionID, SQLString)
    numRows = SQLRetrieve(connectionID, ThisWorkbook.Sheets(1).Cells(2, 1),
, , False)

    sqlclose (connectionID)
    lastRow = numRows
    
End Sub

'* END OF TEST MACRO
'***********************************************

  If the above macro did not return the names of all your historian points
then make sure the Foxapi is running on your I/A server and the proper
authorization codes and user names are in /opt/fox/ais/bin/an_init.tcp

  You should have a license entry for DOSPC_IASRV2  & DOSPC_ODBC along with
the names of your authorized users.  The names are case sensitive and must
match the login name of the PC user on Windows 95, 98, and NT.  Windows 3.1
user names are in a file in the Windows directory.  We have a huge problem
with some users logging with a different case names on different days.   The
case MUST match or ODBC won't work.  An easy test of the user name that is
being sent to your I/A server is to start Data for Windows and look at the
the FoxAPI Server status.  This will list the actual user name (and whether
your client can actually connect to the I/A server).  Data for Windows can
work just fine with bad ODBC drivers though, so this won't prove anything
about ODBC,  just whether you can connect to your I/A server.

  If you can't connect using Data for Windows then look to make sure your
client pc's an_init.cfg file points to the correct server and the ip numbers
are correct.

  Let me know what you find out,

Steve Murray
Asarco


-----Original Message-----
From: haitham khudr [mailto:k_haitham@xxxxxxxxx]
Sent: Thursday, December 26, 2002 07:55
To: foxboro@xxxxxxxxxxxxx
Subject: [foxboro] data required from historian database on AW51B server



Hi there,

It seems that my problem needs an expert to solve.  I have tried Foxboro
support desk but it is like taking into a hollow tunnel with no one to
answer.  i think i have to add this problem to my X-FILES collection . I
will explain my problem once again hoping that someone can assist in solving
this matter.  

I am trying to read from historian data base using "historian ODBC" driver
that came with PIMS V2.0.   I am using FoxPro V5.0 to get the data using
remote view.  But unfortunately, I am getting a blank table with the correct
header fields.  I have tried many date formats but I reached the same dead
end. Therefore, I would like to know what format is the correct one to use?
Is my ODBC driver the correct one? 

ANY SOLUTION OUT THERE???  

Haitham Khodor

 




*

This e-mail and any files transmitted with it are the property of Americas 
Mining Corporation and/or its affiliates, are confidential, and are intended 
solely for the use of 
the individual or entity to whom this e-mail is addressed. If you are not a 
named recipient or otherwise have reason to believe that you have received this 
message in error, 
please notify the sender and delete this message immediately from your 
computer. Any other use, retention, dissemination forwarding, printing or 
copying of this e-mail is 
strictly prohibited.  Although this email and any attachments are believed to 
be free of any virus or other defect that might affect any computer system into 
which it is 
received, and opened, it is the responsibility of the recipient to ensure that 
it is virus free and no responsibility is accepted by Americas Mining 
Corporation and/or its 
affiliates for any loss or damage arising in any way from its use

This e-mail has been scanned and cleared by MailMarshal 
www.marshalsoftware.com

*
 
 
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
 
foxboro mailing list:             http://www.freelists.org/list/foxboro
to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
 

Other related posts: