Re: [foxboro] Aim*,ODBC, And MS Access alarm messages
- From: "Lowell, Tim:" <Tim.C.Lowell@xxxxxxxxxxxxxxxxxx>
- To: <foxboro@xxxxxxxxxxxxx>
- Date: Wed, 3 May 2006 13:43:14 -0400
Ron,
This is a tough nut. I never could get it to work in Access, but I got
it to work in Excel. I built an Excel VB application consisting of a
bunch of spreadsheets to extract AIM point data and alarms. One of the
sheets exists solely to transform the time into something that AIM can
understand.
It goes something like this:
You have to use the MONTH(), DAY(), YEAR(), HOUR(), and MINUTE() calls
to split up the date and time and then add a leading zero to each if
necessary. Gotta have that leading zero!! Then use the "&" to
concatenate the various parts of the date together to create a structure
like {ts '2006-05-03 01:30'} (note the ts, the braces and the single
quotes). Then you can pass the contents of this cell in VB for Excel to
ODBC, and it works.
I can't help you with Access. I'm not enough of a programmer in Access
to figure out how to accomplish what I did in Excel, but if you can
figure out how to get the date and time into that format, you'll be on
your way.
Tim Lowell
Control Systems Engineer
ConocoPhillips Trainer Refinery
(610) 364-8362
tim.c.lowell@xxxxxxxxxxxxxxxxxx
-----Original Message-----
From: foxboro-bounce@xxxxxxxxxxxxx [mailto:foxboro-bounce@xxxxxxxxxxxxx]
On Behalf Of Ron Schafer
Sent: Wednesday, May 03, 2006 12:48 PM
To: foxboro@xxxxxxxxxxxxx
Subject: [foxboro] Aim*,ODBC, And MS Access alarm messages
I am involved in using access to obtain historical alarms from Aim* via
odbc
link. I have a doc from tac showing how to set up a query. It works
fine,
however I want to link the search criteria field in access query to a
form
so it can be linked to a start time and end time for reports and form
views.
The query works fine when I manually enter the following in the search
criteria field of the query;
Between 1/1/2006 AND 4/1/2006
it transforms (by access) into
BETWEEN #1/1/2006# AND #4/1/2006#
Access uses the # sign to denote dates.
I have tried several ways to indicate the start date and end dates but
all I
get is a ODBC CALL FAILED ERROR (0) or invalid search criteria.
Anyone trying such a thing as this or know access really well?
Thanks
Ron Schafer
rschafer@xxxxxxxxxxxxxxxxxxxxxx
=20
=20
_______________________________________________________________________
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
=20
foxboro mailing list: http://www.freelists.org/list/foxboro
to subscribe: =
mailto:foxboro-request@xxxxxxxxxxxxx?subject=3Djoin
to unsubscribe: =
mailto:foxboro-request@xxxxxxxxxxxxx?subject=3Dleave
=20
_______________________________________________________________________
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: