Reading date/time type from Microsoft Access in LabWindows 7.1

Hi,
I'm afraid I'm having some trouble reading some date information from an MS Access table.  I assume it's returned as a string (and this may be my first mistake) but when I use DBBindColChar I just get garbage information.  This is the code I'm using:
  sprintf(queryString, "SELECT date_time, type, serial_number, Voltage_at_G5_V, Voltage_at_G6_V \
                        FROM gain \
                        WHERE serial_number=%lf \
                        ORDER by date_time", *serialNumber);
followed by...
  queryHandle = DBActivateSQL (pmtDataHandle, queryString);
and....
    resCode = DBBindColChar (queryHandle, 1, 22, internal_date, &dateStatus, "");
  resCode = DBBindColChar (queryHandle, 2, 4, internal_type, &typeStatus, "");
  resCode = DBBindColDouble (queryHandle, 3, internalSerialNumber, &serialNumberStatus);
  resCode = DBBindColDouble (queryHandle, 4, &g5VRead, &g5VStatus);                         
  resCode = DBBindColDouble (queryHandle, 5, &g6VRead, &g6VStatus);
Is there anything special about the type date/time that I am not taking care of?  All of the other columns read back fine....
Thanks in advance
Message Edited by acrmartin on 02-23-2006 02:59 PM

Hello,
Just copy and paste the contents to a new post - that will do it
Best Regards,
JLS
Best,
JLS
Sixclear

Similar Messages

  • Trying to Import data from Microsoft Access in POWERPIVOT

    Hello,
    I am trying to import data from Microsoft Access into Powerpivot. In my Access database I have several query's.
    When I go to the Table Import Wizard in powerpivot, I only see one source table. Why can't I see the other query's?
    Thanks in advance for your help.
    Soraya

    Hello Soraya,
    Which Version of MS Excel / Power Pivot are you using? Do you try to Import from a MDB or from the new Format ACCDB? Are these common queries in MS Access or pass-through queries?
    In common it should work, if I Import from a MDB I can see & select both, tables & views (queries):
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • HOW TO FILTER DATA FROM MICROSOFT ACCESS

    HOW TO FILTER DATA FROM MICROSOFT ACCESS BASED ON DATE AND TIME AND GIVE THE RESULT TO A TABLE ?
    I need some example files , can anybody please help me ?
    Solved!
    Go to Solution.

    Just be sure to get examples specific to the Jet DBMS. It is rather "idiosyncratic" when dealing with time and date values.
    One question: the timestamp is being saved in a datetime field, right?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Retrieving data from Microsoft Access using JDBC

    I noticed that when i tried retrieving data from Microsoft access using JDBC, I realised that it was throwing SQLException when the column names were two word with spaces between them, e.g. Date Birth. But after i removed the space from the column names, my SQL queries were retrieving data. Was it because of the space in between the column names of the table?

    Yeah, as far as I know having two word column names isn't allowed in SQL. There might be some way to escape it, but generally it's sensible to avoid it.

  • Data from Microsoft Access ?

    Hi,
    When I deploy report that takes data from Microsoft Access, I got error: Unable to retreive object.
    How do we set the data source for this ? I tried to put the MS access file in the same folder as the published rpt file, it didn't work.
    Thanks

    There are a couple of issues here for you to look at.
    1.  How are you connecting to the database from your development machine?  If you're using an ODBC connection, that same connection must be set up on the computer where the report is deployed.  Where you're using ODBC or another connection method, your deployement computer will also need to have installed whatever drivers are necessary for connecting to Access (they aren't installed by default with Windows!)
    2.  If the database resides on the network (I know, you said it was in the same folder as the report, but you may not always be able to do that!) the user who is logged in to the machine where your app is deployed will have to have valid network access to the folder where the database is located.
    -Dell
    - A computer only does what you told it to, not what you <em>thought</em> you told it to!

  • I want to convert date from Microsoft Access to Oracle.

    I want to convert date from Microsoft Access to Oracle.
    My Oracel date format is 21-Jul-2004 02:24:09 AM
    I use sqlldr in Oracle 9i Database and I
    write control file
    load data
    infile 'test.txt'
    into table test
    fields terminated by "," optionally enclosed by '"'
    trailing nullcols
    name,
    birthday
    data file 'test.txt' for input
    "dao","21-Jul-2004 02:24:09 AM"
    why did error? ORA-01843: not a valid month
    Thank.

    replace birthday with
    birthday "to_date(:birthday, 'DD-Mon-YYYY HH:MI:SS AM', 'NLS_LANGUAGE=''american''')"Of course, if your monthes are in German, then set the language to german (JUL=JUL but DEZ<>DEC)
    Regards
    Laurent

  • Getting image from Microsoft Access database to display in browser

    Hey! anybody please help me
    I've been trying with no success to get an image from a microsoft access database
    so far this is what i have:
    package Servlets;
    import java.io.*;
    import java.net.*;
    import utils.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class serv extends HttpServlet {
        java.sql.ResultSet rs=null;
        ClsConexion conexion=new ClsConexion("Nedermex");
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            conexion.conectate("1", "1");
            rs=conexion.obtenRegSelect("SELECT * FROM Flores WHERE ID=1");
            try{
                rs.next();
                System.out.println("sadfsadf " + rs.getString("ID"));
            }catch(Exception e){
                e.printStackTrace();
            String ubicGIF = request.getParameter("ubicGIF");
            if((ubicGIF==null) || ubicGIF.length() == 0 ){
                indicarError(response, "Archivo de imagen no establecido");
                return;
            //String archivo = getServletContext().getRealPath(ubicGIF);
            try{
                if(rs.next()){
                    System.out.println("sadfsadf " + rs.getString("ID"));
                    BufferedInputStream ingreso = new BufferedInputStream(rs.getBinaryStream("Imagen"));
                   // BufferedInputStream ingreso = new BufferedInputStream(new FileInputStream(getServletContext().getRealPath("1.jpg")));
                    ByteArrayOutputStream flujoBytes = new ByteArrayOutputStream(512);
                    int byteImagen;
                    while ((byteImagen= ingreso.read()) != -1){
                        flujoBytes.write(byteImagen);
                    ingreso.close();
                    String indiPersistencia = request.getParameter("usePersistence");
                    boolean usePersistence = ((indiPersistencia == null) || (!indiPersistencia.equals("no")));
                    response.setContentType("image/jpeg");
                    if(usePersistence){
                        response.setContentLength(flujoBytes.size());
                    flujoBytes.writeTo(response.getOutputStream());
            }catch(IOException ioe){
                indicarError(response, "Error: " + ioe);
            }catch(java.sql.SQLException sqle){
                indicarError(response, "Error: " + sqle);
        public void indicarError(HttpServletResponse response, String mensaje) throws IOException {
            response.sendError(response.SC_NOT_FOUND, mensaje);
        // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
        /** Handles the HTTP <code>GET</code> method.
         * @param request servlet request
         * @param response servlet response
        protected void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            processRequest(request, response);
        /** Handles the HTTP <code>POST</code> method.
         * @param request servlet request
         * @param response servlet response
        protected void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            processRequest(request, response);
        /** Returns a short description of the servlet.
        public String getServletInfo() {
            return "Short description";
        // </editor-fold>
    }i have a class Conexion wich controls the connection and resultsets
    As you can see, i tested accessing a jpeg file: 1.jpg with FileInputStream, and it works perfectly, but when i try to get an image from Microsoft Access using the resultset the way i did, the browser shows the following message
    The image �http://localhost:8084/Nedermex/serv� cannot be displayed, because it contains errors.
    My table in the database in Access is configured as following
    FieldName::::::::::::::DataType
    ID::::::::::::::::::::::::::::::Number
    Imagen::::::::::::::::::::OLE Object
    Now, when i insert an image in the Imagen field, i select the option "Create from file" and select the jpg file (the one that worked with the FileInputStream) and uncheck the Link option (to save the data in the db
    maybe there is something wrong with the sizes or something....
    please help me here!!!
    thank you!

    Yes it is an sql question
    Consider this as my condition need to fetch records collected in database on 16-4-2012 
    Table name =TEST_REPORT
    i have passed the following query
    Select Serial_Number,System_Date,System_Time,Department,O​perator_Name,Serial_Number,Test_Case,Pass_Fail from TEST_REPORT  where System_Date = 4-16-2012, it displays the entire record from database. i have my vi along with this mail.
    Attachments:
    Report Viewer.vi ‏24 KB

  • How do I open a Crystal Report from Microsoft Access?

    I'm looking for step-by-step instructions on how to launch a Crystal Report from a Microsoft Access application (for a dummy like me).
    My Crystal Report uses a connection to the Access database as the data.
    I have Microsoft Access 2002 with Microsoft Visual Basic 6.5.
    I have Crystal Reports 2008 CR Developer 12.
    I'll need to know where to find the Visual Basic code references, and/or ActiveX Controls, if applicable.
    Thanks
    Janeen

    I concur with Don. Just a bit of help - a sample VBA app is here;
    https://smpdl.sap-ag.de/~sapidp/012002523100006013432008E/rdc_vba.exe
    But as Don mentioned, you will have to downgrade to CR XI r2 (or lower) to implement the above solution.
    Ludek

  • EJB-QL and date/time types

    Hi,
    as far as I understand, EJB-QL does not support date/time values.
    Does anybody know how to work around this limitation?
    Using long values containing milliseconds is not an alternative, because the database stores
    date/time values.
    I need to compare these date/time values to input parameters in finder methods.
    Suggestions?
    Bye the way, is there any reason for this limitation in EJB-QL, or did they simply forget to include
    date/time types to the spec?
    Greetings
    Christian

    Greetings,
    Hi,
    as far as I understand, EJB-QL does not support
    date/time values. Actually, it does - EJB QL supports all types supported by a bean's abstract schema (IOW: available types for CMP/CMR fields). However, therein also lies the crutch - EJB QL is for querying beans, not the resource to which they map (EJB QL's similarity to SQL is purely for convenience; an Entity Bean, it should be remembered, may represent entities in any persistent store, not just RDBMSes). Therefore, you should be thinking in terms of Java types, not SQL ones... The specification, however, does place "restrictions" (ie. minimally required [vendor] support), on their use which should be limited to long millisecond values (by which a Date object performs an equals comparison... ;).
    Does anybody know how to work around this limitation?Depends on what you're attempting. If you're using a Date as an argument to a finder, eg:
    findByDateInRange( java.util.Date start, java.util.Date end )then this shouldn't pose a problem where your EJB QL would look like:
    SELECT OBJECT(a) FROM MyBeanSchema AS a WHERE a.myDate BETWEEN ?1 AND ?2Presuming the bean MyBean contains a CMP field of type java.util.Date called 'myDate'. If, however, you must use a literal date then you will have to use a long literal unless your vendor supports otherwise. However, it might be worth noting that EJB QL must still be mapped to the underlying resource QL (eg. SQL), and so a more intelligble value (one that meets the resource's format requirements ;), could be used in the actual rQL statement.
    Using long values containing milliseconds is not an
    alternative, because the database stores
    date/time values.I'm guessing you mean here something like "04/23/2002" and "13:13:35", etc. This, however, is not how the database actually stores the data - input/output formats such as these are supported for the convenience of us 'nuerically-challenged' humans (similar to internet hostnames vs. TCP/IP addresses ;) - nor do Java Date/Calendar/Timestamp types store them this way.
    I need to compare these date/time values to input
    parameters in finder methods.
    Suggestions?Ah, yes. Well then... refer back to the above. :)
    Bye the way, is there any reason for this limitation
    in EJB-QL, or did they simply forget to include
    date/time types to the spec?The EJB QL does not explicitly support any specific types beyond those "supported by an EJB's abstract schema", which is pretty much any Java type that can represent a compatible resource type. The reason for the noted "restriction" on date/time types, however, is (likely) due to the way the associated Java classes (not to mention the back-end resource), handle/represent these data internally and this gives the vendor an easily achievable minimal level of compliance for supporting these types.
    I hope this helps.
    ChristianRegards,
    Tony "Vee Schade" Cook

  • Date/Time type not getting determined in ODO

    When ODO is created, it's date/time type is not getting determined automatically. due to this, the route determination is not happening which is further creating problem in POSC setup.
    I have setup  date/time types at the path IMG>EWM>Goods Issue Process>OBD>route determination>Define scheduling within route determination.  Here for my new document type+PDO catergory, I have set two date/time types TDELIVERY, TOUTYARD.
    This is set for particular SAP client only.      In current status, to make the system work further, I need to update the ODO manually. 
    under IMG interfaces ERPintegration, map date types from ERP to EWM...  following are maintained correctly
    WSHDRCIDAT
    WSHDRKODAT
    WSHDRLDDAT
    WSHDRWADAT
    WSHDRWADTI
    Please help.

    Hello Santhosh,
    I hope, you might have taken care of the below two screen shots.
    Could you also share some screen shots of the issue where it is not mapping. That helps to understand the issue more.
    Regards,
    Sathish

  • How to read a time stamp from the db without ".0" at the end

    Hi All,
    I have code that is saving the results of a query in a result set.
    When ever i read a time stamp from the db (mysql 4) it always adds ".0" to the end of it.
    I tried using the getTimeStamp, getDate, getString methods for result sets and was not able to resolve the issue.
    Am i missing something here?
    Thanks

    here is the code
    public static Table executeSelect(Connection conn, String qry)
         throws SQLException {
              Statement stm = null;
              ResultSet rs = null;
              try {
                   stm = conn.createStatement();
                   rs = stm.executeQuery(qry);
                   Table t = new Table(rs);
                   return t;
              } finally {
                   close(null,stm,rs);
    Basically the user is asked to enter the query and the connection settings and then i retrieve the data and return a table.
    Now if i try to print the value of the time stamp from the result set it adds a a .0
    So for example if am running the following
    select mod_ts from temp limit 1;
    | mod_ts |
    | 2007-12-28 09:32:58 |
    1 row in set (0.00 sec)
    When i print the value of the time stamp it gets printed as 2007-12-28 09:32:58.0
    The following code is used to generate a table from the result set
    public Table(ResultSet rs) throws SQLException {
              ResultSetMetaData rsmd = rs.getMetaData();
              int colCount = rsmd.getColumnCount();
              colNames = new String[colCount];
              colTypes = new int[colCount];
              for ( int i=0; i<colCount; i++) {
                   String colName = rsmd.getColumnName(i+1);
                   colNames[i] = colName;
                   int colType = rsmd.getColumnType(i+1);
                   colTypes[i] = colType;
              while ( rs.next()) {
                   if ( data == null) {
                        data = new ArrayList<List>();
                   List<Object> row = new ArrayList<Object>();
              for ( int i=0; i<colCount; i++) {
                   Object ob = rs.getObject(colNames);
                   row.add(ob);
              data.add(row);
    Now when i print the values in the result set it adds a .0 to the end of the time stamp
    I also tried using getTimeStamp for a result set and the same problem still existed

  • Access oracle database from microsoft access?

    It is possible access to an'ORACLE database from Microsoft Access?

    Yes, that's possible.
    You can find several threads for this on the forum,e.g.
    Oracle & MS Access

  • How to read the field type from field id of DynamicFldTbl

    Hi,
    In my application, i am using DynamicFldTbl, whch parses FML32 field table definition file. My field table definition file contains information about field names and its types.
    I checked the API of DynamicFldTbl and didn't find any API to get the field type from field it.
    Any way to read the field type from field id?
    Thanks in advance
    Raguraman

    Hi Raguraman,
    Once you have the field table, you can then create an FML32 buffer (TypedFML32) using the constructor that takes a field table, and then use the Fldtype() method on the specific field ID you wish to get the type of. I know this is sort of tedious and we should provide Fldtype() and some others on the field table class directly.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • Data Migration from Microsoft Access to Oracle 9i

    Dear All
    This is my first request in your forum,My problem is that I have installed SQL developer but unable to migrate my MDB (Microsoft access file) into Oracle 9i,I have done the following activities in order to migrate data.
    open sql developer
    under migration,click quick migration
    quick migration wizard diaglog box appear,click new,
    in the oracle tab, input the following information
    input connection name 'zuhair',give user name and password (sys/s),check save password option,give role "sysdba" ,give connection type "basic",didnt check any any check box like os authorization and others,give host name 'zkhan-dfml',port '1521',sid 'dba' and then push the test button and then status show "success"
    in the access tab, input the following information
    input connection name ,input mdb file name by using browse button,after this step click test button then the following message display 'test fail odbc microsoft access driver not a valid password
    I have tried to create odbc link but i think i have done some thing wrong,kindly help
    Regards
    Zuhair

    Hi Zuhair,
    If you give details of the problems you are still having then we should be able to get SQL*Developer to work.
    However, if you don't want to use SQL*Developer then the following options are taken from note 393760.1 available in Metalink if you have access to that -
    1. Use a gateway that supports the non-Oracle database or generic connectivity if a third party ODBC driver is available to do a -
    'create Oracle_table as select from non_oracle_table@database_link'
    for each table. You would then have to manually create all the other objects (views, indexes, stored procedurs etc) and permissions etc that existed in the non-Oracle database.
    2. Use the SQL*Plus COPY command to copy data from the non-Oracle database to the
    Oracle database using a gateway or generic connectivity. The syntax is as follows:
    COPY FROM username/password@oracle_sid -
    INSERT destination_oracle_table -
    USING query;
    The following example selects all rows from the EMP table in the non-Oracle database and
    inserts them into the local Oracle EMP table:
    COPY FROM SCOTT/TIGER@ora10 -
    INSERT EMP -
    USING SELECT * FROM SCOTT.EMP@gateway;
    where "gateway" is the database link created for the gateway.
    3. Load the non-Oracle data into flat files and use SQL*Loader to put the data into Oracle tables. Again manual
    work is required for the other objects.
    4. Contact the Oracle Product Technology Services (PTS) group for assistance. See the webpage -
    http://www.oracle.com/technology/tech/migration//workbench/index_sqldev_omwb.html
    5. Use a third party migration tool. See -
    http://www.oracle.com/technology/tech/migration/isv/third_party.html
    6. Use JDBC to connect to the non-Oracle database and Java in the Oracle database. This method will work but it is not suppported by the JDBC team.
    =========
    The amount of work involved will depend on the number and size of Access tables that you want to migrate.
    Regards,
    Mike

  • Send and take back data from Microsoft Access 2007

    Hi everybody,
    I wish you could help me with my application that is very urgent. I have some characters read by OCR and i want to send them to a database in Microsoft Access 2007 and compare if there is a match or not of the data i sent from labview. I want a true or false as a result of comparison in access and send this response back to labview.
    The thing is that the characters read by OCR in labview are characters from a license plate and i want to compare those in a database in Microsoft Access and this has to tell me if there is a match or not and send a response to labview to use it for letting a car enter or not to a parking lot. I dont know how to do all i have explained.
    And another question, how can i create a database in microsoft access which i could modify while i am running the application i told you before.
    Thanks a lot....
    Cristi@n
    Hola a todos,
    Espero puedan ayudarme con mi aplicación que es de suma urgencia. Tengo varios caracteres leidos de una placa vehicular mediante OCR y quisiera mandarlos a una base de datos en microsoft Access y compararlos con la base de datos de placas vehiculares para saber si esta o no en la base. Esta respuesta quisiera enviarla de nuevo al labview para mostrar si el vehiculo ingresa o no al parqueadero. Además no se si se pueda ir ingresando datos a la base de datos mientras estoy corriendo la aplicación en labview. y como hago una base de datos asi en microsoft access..
    Gracias de antemano

    Hola
    Usted puede utilizar el database connectivity toolkit
    Sigue algunos links para su consulta:
    http://sine.ni.com/nips/cds/view/p/lang/en/nid/209060
    http://digital.ni.com/public.nsf/allkb/EDA4CCE5EBE0D295862577650029D501?OpenDocument
    http://www.ni.com/pdf/manuals/371525a.pdf
    Saludos.
    Diogo
    Diogo Aparecido
    Engenheiro de Aplicação
    National Instruments Brasil

Maybe you are looking for

  • Lag spikes(Assumingly disk spikes) with MSI GT70 2PC

    Hello, I bought a msi gaming laptop a couple of months ago and noticed some weird spikes where my laptop because inactive for 2 seconds. My screen freezes and I am unable to move my mouse. I am trying to find the solution myself but I think my lack o

  • Exchange Server 2013 to 2010 mailbox proxy is not working

    I have exchange server 2013 and exchange server 2010 in co-exist. I have 3 cas server and 3 mbx server 2013 on windows server 2012 standard, 2 hub/cas server and 2 mbx server 2010 on windows server 2008 r2. when I try to access owa of exchange server

  • Using wireless router for Playstation Portable connection

    I've had my PSP for a little while now and I mainly use it for it's internet feature. I've been using my router (with wireless connection) for my laptops for years and so things have been completely fine logging onto the internet with my PSP. I recen

  • Os 10.6.4 has killed my system

    During the update process, the installation hung and I was forced to reset. My system won't boot now and I want to boot into Safe Mode but here's my problem: I was setting up XP on Bootcamp yesterday and didn't finish the installation. My mac has set

  • Files has duplicate copies

    I do not know how I did it but I somehow got the main screen (containing the artboard) stuck behind the main Mac OSX menu bar. I then could not move it so I could re-size it or be able to see and use the buttons on the top left that allow you to quit