Add records in table ACCESS from labview by ActiveX

I try to add records in table of database ACCESS by an ActiveX from labview but my programme doesn't work ...
What is the problem ?
I have attached my VI
Thanks in advance
hasna
Attachments:
base1.vi ‏35 KB

On Thu, 11 Jul 2002 08:13:48 -0700 (PDT), Lab Viewer
wrote:
>I saw your previous posts related to ActiveX/Access. I once had the
>same kind of problems. It's not an easy task (without a toolkit)
>because you have to learn the "interface" provided by Access/DAO in
>order to manage what you are trying to do.
>In my case, the best solution it was to follow the Visual Basic for
>Applications examples included in MS Access. Even though you don't
>know VB, don't be afraid. Important is to figure out from that example
>what methods/properties you need to use, the proper order to call them
>and eventually some parameters. You are dealing with the same
>methods/properties in LabVIEW, the difference is that you have them in
>a graphical format instead of text
.You can find these examples by
>going to MS Access help > Index and type DAO objects and then choose
>one to start with (Database, recordset, field =85).
>
>Hope this helps
The examples on NI's website were originally written using the DAO
model, but the latest one was written using the ADO model.
However, I am unable to find either example LLBs on their website
anymore. Maybe they're trying to push their SQL Toolkit.
Along with the VBA help in MS Access, I *highly* recommend the book
ADO Programming for Dummies. Wonderful book. Helped me understand the
VBA help. :-)
Again, if anyone is intersted in VIs using ActiveX that works. He/she
is welcome to email me.
Linda

Similar Messages

  • How to create a table in MS Access from Labview using ActiveX?

    I want to transfer datas from Labview to Access using activeX method. My only problem is to find out how to create a new table (array) in Access from the Labview program.
    Remarks: I use Labview 6i and MS Access 2000.
    For the moment I can write and read datas of Access from Labview.
    If someone could help me... that would be grate!

    This is off the Microsoft MSDN site "creating an external table". I think you can drop the last step.:
    Open the database you want to create the table in. If it is the current database, use the CurrentDb function to return an object variable that represents the current database. If it isn�t the current database, use the OpenDatabase method to open the database you want.
    Use the CurrentDb function to create a Database object that points to the current database.
    Use the CreateTableDef method of the Database object to create a table definition for the Microsoft Access table.
    Use the CreateField method of the TableDef object to create one or more fields in the Microsoft Access table.
    Use the Append method of the Fields collection to add the new field or fields t
    o the Microsoft Access table.
    Use the Append method of the TableDefs collection to create the Microsoft Access table.
    Use the TransferDatabase method to create the external table in the specified folder.
    Use the Delete method of the TableDefs collection to delete the Microsoft Access table definition.

  • Is it possible to add records to tables using Enterprise Manager?

    Can we add records to tables using Oracle Enterprise Manager web interface instead of the sqlplus commands ? if not, is there any easy way to insert data into table using a graphical interface?

    You may consider using iSQL*Plus.
    Check http://www.oracle.com/technology/obe/obe10gdb/install/isqlplus/isqlplus.htm
    Thanks,

  • Add records to table T180a

    Godd morning
    I'm not able di add records at table T180a.
    I'm not do "append t180a".
    tables: T180A.
    DATA:lw_file  type string.                        " File Path
    DATA:  BEGIN OF t_itab OCCURS 0.
    INCLUDE STRUCTURE T180A.
    data: end of t_itab .
    lw_file = 'X:\Dokumente und Einstellungen\users\Desktop\t180a.TXT'.
    CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                                      = lw_file
          FILETYPE                                   = 'ASC'
          HAS_FIELD_SEPARATOR           = 'X'
        tables
          data_tab                                      = t_itab
    loop at t_itab.
    move-corresponding t_itab to T180a.
    endloop.
    leave program.

    Do you have any idea what you are trying to do here? Looking at your code, I don't think you do since it's really bad!!! Sorry, but there is no other way to put this.
    What gave you the idea that table T180a would be updated using MOVE-CORRESPONDING??

  • Exporting figures to word from labview using activex??

    Does anybody know how to export figures into MS Word, XP edition from LabVIEW using activex. I am not using the report generation toolkit...dont have it....help wld be appreciated
    kuttu

    Here are some examples you can use. they all use activeX. One is even a toolkit I got from somewhere.Try these and if you have any more questions let me know.
    Joe.
    "NOTHING IS EVER EASY"
    Attachments:
    word.zip ‏1226 KB

  • How can I control a base ACCESS from labview ?

    Hi,
    I'm working on a projet on labview and ACCESS and I want to say how can I do to control a database from labview ???
    Thanks in advance
    Cordially,
    Hasna

    On Tue, 9 Jul 2002 02:50:12 -0700 (PDT), kiki wrote:
    >could you give me more informations about Database Connectivity
    >Toolset ???
    >
    >I notice that we can write data in excel file thanks to an ActiveX but
    >is it possible with a table ACCESS ??
    DCT it's a suite of VIs (I think Optionals) the contains anything you
    need to connect to to a DB.
    I used them with access... since I'm not really happy with performance
    (read/write max 50 records/sec) it's quite quick to develop
    applications that read/write DB.
    (Write a Cluster it's trivial.... plug the cluster, prepare a table
    with fields of the same type and the same order, yo've did it)
    I think you can also use ActiveX, but I've never did.

  • How do I set the text orientation in a Microsoft Word table cell from LabVIEW?

    In a table in Word (Office 2010) it's possible to change the text orientation in a cell (if you right click on a cell, it's the 'Text Direction...' option). 
    Has anyone figured out how to do this from LabVIEW?  I took a quick look at doing it via ActiveX, but haven't find the correct property/method.  Next step is to try .net.

    Previous post shows the constant values for Excel (my mistake). The following code will change the text orientation for a whole table in Word.
    Ben64

  • Write data on database ACCESS from labview

    Hi!
    I want to write on a table of database from labview... I have already succeeded in opening the base and the table but I don't know how write on it... I know that I must use
    with Table
    .Addnew
    Table.Fields(0)=what I want to write
    .update
    end with
    But how do it with labview ???
    Thanks in advance
    hasna
    Attachments:
    lecture_de_la_base.vi ‏35 KB

    Hi Kiki,
    I believe you have another Developer Exchange Forum open for this issue. To keep them similar, I am attaching an updated version of your VI. It is wired to read any errors which occur in the VI. I received error -2147221164. This does not help too much, because the meaning of this error depends upon the ActiveX server. You will want to run this VI yourself, see which error you get, and then consult the ActiveX Server documentation to find the meaning of the error.
    J.R. Allen
    Attachments:
    criture_de_la_base.vi ‏37 KB

  • Add data to table view from input fields in a page

    Hi
            I am developing a BSP page which will be called from SRM shop transaction. After user enters the line item data, data will be passed back to shop transaction using OCI interface and the page attributes (URL).
       (1) How can I add data from input fields to table view on a page on a button click? I am able to add first line but I could not retain first line data when I try to add the second line.
          I am able to add multiple lines to table view if I use view and controller by adding to the line data to static attribute of the controller. I can’t use the controller and view because I can not set the attribute to Controller automatically.
       (2) Is there a way to pass an attribute (URL) to controller from SPRO? Like we pass an attribute to page automatically (Automatic page attribute).
       (3) How can I call a controller and view and pass the page attribute to the controller on a button click from a page with out controller?
    Thanks
    Sreenivas

    I'm trying to test the merge with the following data in a test.txt file:
    ZZZZZ114923000004
    1234Z400660000001
    ZZZZZ114923000010
    Getting an error:
    SQL> @C:\dataformats\sql\pc12seriesMerge.sql
    Directory created.
    SP2-0552: Bind variable "17" not declared.
    SQL>
    here it the pc12seriesMerge.sql file
    set serveroutput on
    create or replace directory user_dir as 'c:\dataformats\incoming\';
    DECLARE
    v_filename VARCHAR2(100); -- Data filename
    v_file_exists boolean;
    v_file_length number;
    v_block_size number;
    f utl_file.file_type;
    s varchar2(200);
    lineString varchar(200);
    v_account varchar(5);
    v_IDN varchar(6);
    v_quantity varchar(6);
    BEGIN
    v_filename := 'TEST.TXT';
    DBMS_OUTPUT.PUT_LINE(v_filename); --shows filename
    utl_file.fgetattr('USER_DIR', v_filename, v_file_exists, v_file_length ,v_block_size );
    IF v_file_exists THEN
    dbms_output.put_line('File Exists');
    create table ext_table (
    account varchar2(5),
    idn number(6),
    quantity varchar2(6)
    organization external (
    type oracle_loader
    default directory user_dir
    access parameters (
    records delimited by newline
    fields (
    account position(1:5) char(5),
    idn position(6:11) char(6),
    quantity position(12:17) char(6)
    location ('test.txt')
    reject limit unlimited;
    MERGE INTO id_req_stg t
    USING (
    SELECT account,
    idn,
    decode(quantity, '-', 0, to_number(quantity)) as quantity
    FROM ext_table
    ) v
    ON ( t.account = v.account AND t.idn = v.idn )
    WHEN MATCHED THEN
    UPDATE SET t.quantity = v.quantity
    DELETE WHERE t.quantity = 0
    WHEN NOT MATCHED THEN
    INSERT (account, idn, quantity)
    VALUES (v.account, v.idn, v.quantity);
    ELSE
    dbms_output.put_line('File Does Not Exist');
    END IF; -- file exists
    EXCEPTION
    WHEN UTL_FILE.ACCESS_DENIED THEN
    DBMS_OUTPUT.PUT_LINE('No Access!!!');
    WHEN UTL_FILE.INVALID_PATH THEN
    DBMS_OUTPUT.PUT_LINE('PATH DOES NOT EXIST');
    WHEN others THEN
    DBMS_OUTPUT.PUT_LINE('SQLERRM: ' || SQLERRM);
    END;
    /

  • Can I launch MS Access from labVIEW?

    I would like to programmatically lauch MS Access and compact a database. Or perhaps I could set the table to compact on exit and exit it programmatically through labVIEW. Can I launch and exit a Microsoft application using labVIEW?

    Yes, you can use ActiveX for that, to start, you should place an Automation open in the diagram, select activeX class (Access application) and from there, follow wiring property and invoke nodes to do almost anything with Access.
    Hope this helps

  • How to print a report in MS-Access from Labview?

    Good morning,
    We have our system running properly but we want to provide the user just one GUI to execute the measurements and print the report, we keep using ms-access beacuse facilitate the data  integration with the res of the areas of tha company.
    Thanks,
    Miguel

    Basically, you are going to have to communicate with Access via ActiveX and tell it to print the report for you. If you don't know the Access object model a good approach is to find an example on how to programatically run a report in some easy to read text language like VB. While you will not want to follow the exact program structure too closely, it will at least tell you what properties and methods you will need to use.
    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

  • Open Access from Labview

    Hi, I open a Access database with the metod Opencurrentdatabase of
    appliaction.But i had a problem because the database open but after
    it's closed.
    What's is the right method for call a database?

    Hello,
    The preferred method of database communication with LabVIEW is the Database Connectivity Toolkit. Here is a link that may help you find more information about this. Also, you may want to look into some examples that have shipped with LabVIEW. They are found under "..LabVIEW\examples\comm\access.llb"
    Jeremy L
    National Instruments
    Jeremy L.
    National Instruments

  • Text Message sent from LabVIEW using ActiveX and Internet Explorer

    I am fairly new to LabVIEW and I am trying to make a VI that will be able to text me and let me know when a test is about to be done or if something has caused it to shutdown.  My VI uses www.onlinetextmessage.com but I can't get it to click the Send Message button. 
    I can get it to insert text in the text fields.  I just can get it to click send.
    Can you help me?
    Solved!
    Go to Solution.
    Attachments:
    My Texting.vi ‏38 KB

    MoonMan wrote:
    Well it sure seemed like that should have worked but no luck. When I try to add the FormElement with submit in my VI after I wire in the reference wire it automaticaly changes to a regular Element.  Then it wont run because submit is not an option for Element, I have to change the submit back to click. 
    I dont understand, it really seems like the click should work, and it seems like the submit should have also worked.  Getting text into the different fields was easy enough.
    Did you try my modified version?  That uses IHTMLFormElement properly.  If you then change the element name from "Send Message" to "txtmsg" (the name of the form), it appears to work - or at least, it pops up an advertising window in Internet Explorer (I didn't fill in any of the fields as I don't want to give out my phone number or email address to some random website, especially one that pops up advertising).
    When you try to change to FormElement, what steps are you taking?  Are you changing the type of the "type" input to Variant to Data?  You'll need to right-click on that constant, Select ActiveX Class... and choose IHTMLFormElement.
    As a LabVIEW style note, you should close all the ActiveX references you open.  That means all the references (IHTMLFormElement, IHTMLElementCollection, etc) need a Close Reference when you're done with them.
    Again, I think sending an email is a better way to send a text message from within LabVIEW, and for that matter, you might be able to find a better website for doing it.  TMobile allows their subscribers to send SMS messages through their website and it appears that AT&T provides a similar service; Verizon provides a web page to send SMS to their users.
    EDIT: by the way, the submit button is not a named element (it has a "Value" property but not a "Name" property) so you can't get a reference to it by name.  If you probe the item output of the IHTMLElementCollection property node, you'll see it returns an empty variant, which is why "click" has no effect.

  • How can I add a new record in an Access table.

    How can I add a new record in access with LabView, using activex, without using the database connectivity tools.
    Message Edited by Noawena on 05-16-2008 09:25 AM

    Much easier with a toolkit but you could use ADO objects,
    get connection, make a SQL object "INSERT record INTO table where  ...." 
    Execute the parameterized query
    Free up record sets data
    close connection when done.
    This is a very simplified version
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • Problem of security using ADO from Labview to connect to Access 2000 Data Base

    I have a problem using ADO from Labview to connect to Access 2000 Data Base.
    First I open a ADO_DB_Engine and create a Workspace as an ODBCDirect. After I execute the open_data_base using the workspace. Here you can specify the parameter connect with /type of connection / user / password.
    The problem is the following:
    Although you configure a password for the Administrator user in Access, you can read/writte to data base from Labview using ADO without any security and without putting the user and password in the parameter connect. I need to access with security to data base using users and permissions but it seems that the parameter connect does not operate.
    I attach
    you a example of the vis and database. Remember create a ODBC connect with BD3.mdb
    Thanks a lot
    Peter Mst
    Attachments:
    SECURITY.zip ‏70 KB
    BD3.mdb ‏112 KB

    Hi Kahn,
    If you use ADODB_connection -> Connection.Open and set in connection string :
    "Provider=Microsoft.Jet.OLEDB.4.0; Jet OLEDBystem Database=c:\.....\Protegida5.mdw; Password=pepe;user ID=jose; Data Source:c:\......\BD5.mdb";
    and after connection.execute ->
    INSERT INTO tabla1 VALUES (5,'XXX'
    you will be able to access to the database with security using the provider=Microsoft.Jet.OLEDB.4.0. With this provider you have to use the path and the name of the database file c:\.....\mdb file. From this way the problem is solved. (SEE SAMPLE_ADO_W2_JET.VI).
    BD5.mdb have the following administrator user: user:jose / passwordepe (Protegida5.mdw)
    The problem is when you want to
    use ODBC and DSN. The name of this ODBC Provider is MSDASQL;. If you use this type of connection you can not enter to the database I attach you.
    This database has a new administrator owner. I deleted the default administrator. If you support the default administrator you can connect to database by ODBC / DSN but the security disappear because you can always enter to database with any password, user o PC.
    FINALLY I HAVE 3 QUESTIONS FOR Application Engineers of National Instruments or someone who knows these subjects before deciding the best way to connect locally o remotely with security to Access from Labview:
    1.- Is it possible to enter to Database BD5.mdb from ODBC and DSN with this owner?
    2.- I want to connect remotely to Access database too. Is it possible to use Microsoft.Jet.OLEDB.4.0 using the path (.mdb file) without DSN?
    3. Which is the optimal Provider for Microsoft Access?
    I thank you beforehand for your technical support.
    Peter Mst.
    Attachments:
    BD5.mdb ‏116 KB
    Protegida5.mdw ‏112 KB
    sample_ADO_W2_JET.vi ‏45 KB

Maybe you are looking for