Error 200428 in linux example code

Hi All;
I'm trying to use the mx daq-base on a redhat 9.0 system. I have a 6031E installed(pci). I've installed the hardware, then the software and compiled the example code. When I try to run the writeDigPort example I get;
Device indentifier is invalid.
DAQmxBase Error: -200428
lsdaq reports:
NI 603E: "Dev2" (PXIO::16::0)
Nay ideas?
Pat

After further looking into the problem I'm getting an error -200220
here is the suspect code
char chan[] = "dev1/port0:1";
error1= DAQmxBaseCreateDOChan(taskHandle,chan,"",DAQmx_Val​_ChanForAllLines);
DAQmxBaseGetExtendedErrorInfo (errBuff, 2048);
printf("\nDAQmxBaseCreateDOChan returned %d %s",error1,errBuff);
This gives the following output
DAQmxBaseCreateTask returned 0
DAQmxBaseCreateDOChan returned -200220 Device identifier is invalid.
Data to write: 0x55
DAQmxBaseGetExtendedErrorInfo returned -200428 Value passed to the Task/Channels In control is invalid.
Anyone have any idea?
Pat

Similar Messages

  • Error when using example code

    Hi all,
    im trying to create a program for communication over a LAN network with a spectrum analyser.
    when i use a standard example code i get errors like this one:
    [Linker error] undefined reference to `viOpenDefaultRM@4'
    did i made a fault in linking?

    DAV C++ uses a GCC based compiler. The VISA DLL is compiled with MSVC. This will cause a problem with the calling convertions used and expected.
    Basiclly the visa DLL uses 'viOpenDefaultRM' but the GCC expects viOpenDefaultRM@4, and thus can't find it in the DLL. You can solve this manually.
    The basic steps are:
    1. Generate a .def file from the DLL for example with pexports.
    2. correct the .def file so all the functions have the correct decorations as expected by GCC.
    3. Create a new import library,
    For more infomation see this post about the same issue with NI-DAQmx
    An other option would be to use the Visual Studio 2005 express editions?
    And in some configuration you will need to buy a license to use NI-VISA: http://www.ni.com/visa/license.htm
    Hope this helps
    Karsten

  • Error compiling this example code of libcurl

    Its an example code to download a file and show gtk window..
    http://curl.haxx.se/libcurl/c/curlgtk.html
    I get this error:-
    shadyabhi@ArchLinux /tmp $ gcc curlgtk.c `pkg-config --libs --cflags libcurl`
    curlgtk.c:13:21: fatal error: gtk/gtk.h: No such file or directory
    compilation terminated.
    shadyabhi@ArchLinux /tmp $
    Then I tried :-
    shadyabhi@ArchLinux /tmp $ gcc curlgtk.c `pkg-config --libs --cflags libcurl` -I /usr/include/gtk-2.0/
    In file included from /usr/include/gtk-2.0/gdk/gdk.h:32:0,
    from /usr/include/gtk-2.0/gtk/gtk.h:32,
    from curlgtk.c:13:
    /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30:21: fatal error: gio/gio.h: No such file or directory
    compilation terminated.
    shadyabhi@ArchLinux /tmp $
    Whats the issue?
    The complete code:-
    /* Copyright (c) 2000 David Odin (aka DindinX) for MandrakeSoft */
    /* an attempt to use the curl library in concert with a gtk-threaded application */
    #include <stdio.h>
    #include <gtk/gtk.h>
    #include <curl/curl.h>
    #include <curl/types.h> /* new for v7 */
    #include <curl/easy.h> /* new for v7 */
    GtkWidget *Bar;
    size_t my_write_func(void *ptr, size_t size, size_t nmemb, FILE *stream)
    return fwrite(ptr, size, nmemb, stream);
    size_t my_read_func(void *ptr, size_t size, size_t nmemb, FILE *stream)
    return fread(ptr, size, nmemb, stream);
    int my_progress_func(GtkWidget *bar,
    double t, /* dltotal */
    double d, /* dlnow */
    double ultotal,
    double ulnow)
    /* printf("%d / %d (%g %%)\n", d, t, d*100.0/t);*/
    gdk_threads_enter();
    gtk_progress_set_value(GTK_PROGRESS(bar), d*100.0/t);
    gdk_threads_leave();
    return 0;
    void *my_thread(void *ptr)
    CURL *curl;
    CURLcode res;
    FILE *outfile;
    gchar *url = ptr;
    curl = curl_easy_init();
    if(curl)
    outfile = fopen("test.curl", "w");
    curl_easy_setopt(curl, CURLOPT_URL, url);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile);
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_write_func);
    curl_easy_setopt(curl, CURLOPT_READFUNCTION, my_read_func);
    curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
    curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, my_progress_func);
    curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, Bar);
    res = curl_easy_perform(curl);
    fclose(outfile);
    /* always cleanup */
    curl_easy_cleanup(curl);
    return NULL;
    int main(int argc, char **argv)
    GtkWidget *Window, *Frame, *Frame2;
    GtkAdjustment *adj;
    /* Must initialize libcurl before any threads are started */
    curl_global_init(CURL_GLOBAL_ALL);
    /* Init thread */
    g_thread_init(NULL);
    gtk_init(&argc, &argv);
    Window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    Frame = gtk_frame_new(NULL);
    gtk_frame_set_shadow_type(GTK_FRAME(Frame), GTK_SHADOW_OUT);
    gtk_container_add(GTK_CONTAINER(Window), Frame);
    Frame2 = gtk_frame_new(NULL);
    gtk_frame_set_shadow_type(GTK_FRAME(Frame2), GTK_SHADOW_IN);
    gtk_container_add(GTK_CONTAINER(Frame), Frame2);
    gtk_container_set_border_width(GTK_CONTAINER(Frame2), 5);
    adj = (GtkAdjustment*)gtk_adjustment_new(0, 0, 100, 0, 0, 0);
    Bar = gtk_progress_bar_new_with_adjustment(adj);
    gtk_container_add(GTK_CONTAINER(Frame2), Bar);
    gtk_widget_show_all(Window);
    if (!g_thread_create(&my_thread, argv[1], FALSE, NULL) != 0)
    g_warning("can't create the thread");
    gdk_threads_enter();
    gtk_main();
    gdk_threads_leave();
    return 0;

    Your error is unrelated to curl. You're not properly linking against gtk
    gcc curlgtk.c $(pkg-config --libs --cflags gtk+-2.0 libcurl)

  • Do I have to use an external clock with a cDAQ-9188 and NI 9401 to read a linear encoder? I'm seeing error message that implies that but the example code doesn't show it.

    We can set up a task that works on demand but when we go to continuous sampleing we see Error -200303, which claims an external sample clock source must be specified for this application.  However, some of the NI linear encoder example code doesn't show that (uses the cDAQ 80 Mhz clock) and the documentation didn't mention that. 

    It's mentioned in the 918x user manual:
    Unlike analog input, analog output, digital input, and digital output, the cDAQ chassis counters do not have the ability to divide down a timebase to produce an internal counter sample clock.  For sample clocked operations, an external signal must be provided to supply a clock source.  The source can be any of the following signals:
    AI Sample Clock
    AI Start Trigger
    AI Reference Trigger
    AO Sample Clock
    DI Sample Clock
    DI Start Trigger
    DO Sample Clock
    CTR n Internal Output
    Freq Out
    PFI
    Change Detection Event
    Analog Comparison Event
    Assuming you have at least one available counter (there are 4 on the backplane), I would suggest to configure a continuous counter output task and use its internal output as the sample clock.  Specify the internal counter using an "_" for example "cDAQ1/_ctr0".  The terminal to use for the sample clock source would be for example "/cDAQ1/Ctr0InternalOutput".
    Which example uses the 80 MHz timebase as a sample clock?  It is far too fast for a sample clock on the 9188 according to the throughput benchmarks (80 MHz * 4 byte samples = 320 MB/s).  There is also no direct route between the 80 MHz timebase and the sample clock terminal for the counters--making this route would use a second counter anyway.
    Best Regards,
    John Passiak

  • Error 1092 happened while running the executalbe file from an example code of Simulation Interface Toolkit

    With Simulation Interface Toolkit 3.0.1 and LabVIEW 8.0, I built the example code Sine Wave.vi to be an executable file. I made no modification to the code except setting Real-Time Target to be localhost in SIT Connection Manager. Everything was OK during the building process. But when I run it, error 1092 was reported. Here is the error message.
    Error 1092 occurred at Invoke Node in sit Traverse.vi->sit Traverse for References.vi->sit Find Object By Label.vi->sit Get RPS-Control-Indicator Refs.vi->sit Init Model.vi->Sine Wave.vi (Traverse Initialization Failed)
    I cannot find out any helpful information about this error code. Can anybody help me? Thanks a lot!
    帖子被zhuang在09-13-2006 08:01 AM时编辑过了

    To my knowledge, building an EXE out of a SIT host VI is not supported.  The SIT host VI utilizes functionality in LabVIEW that is not exposed in the LabVIEW Runtime Engine (i.e., with built EXEs and DLLs).
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • USU 6009 counter error: DAQmxBase Error -200428

    I want to use USB 6009  as an edge counter. I got this ouput :
    create task
    createCounterChan
    start task
    DAQmxBase Error -200428: Value passed to the Task/Channels In control is invalid.
    with following code:
     // Channel parameters
       const char  counter[] = "Dev3/ctr0";
       // Read parameters
       uInt32 readArray[1];
       uInt32 arraySizeInSamps=1;
       uInt32 initialCount=0;
       int32 numSampsPerChan=1;
       int32 sampsPerChanRead;
       float64 timeout=100;
       DAQmxErrChk (DAQmxBaseCreateTask ("", &taskHandle));
       printf("create task\n");
       DAQmxErrChk (DAQmxBaseCreateCICountEdgesChan (taskHandle, counter, NULL, DAQmx_Val_Falling, initialCount, DAQmx_Val_CountUp));
       printf("createCounterChan\n");
       // Start Task (configure port)
       DAQmxErrChk (DAQmxBaseStartTask (taskHandle));
       printf("start task\n");
       DAQmxErrChk (DAQmxBaseReadCounterU32 (taskHandle, numSampsPerChan, timeout, readArray, arraySizeInSamps, &sampsPerChanRead, NULL));
       printf("Data read: 0x%X\n",readArray[0]);
    Please help

    Hello nguyendyhung,
    Thank you for posting to the discussion forum. Here is a KnowledgeBase that explains this error.
    NI-DAQmx Base Error -200428
    http://digital.ni.com/public.nsf/websearch/7705D38D59EF562886256F79007E4B5A?OpenDocument
    This document is going to reference LabVIEW, but the theory is still going to be applicable with your code. You can get this error message if the task is not configured correctly.
    Also take a look at some of the shipping examples that come with DAQmx Base. You can find them in the following folder:
    C:\Program Files\National Instruments\NI-DAQmx Base\Examples
    Please take a look at these resources and let us know it resolves your issue.
    Regards,
      Sandra T.
    Applications Engineer | National Instruments

  • Getting bug error while compiling object binding code in javaFX

    I am new to javaFX and exploring it from just last two days.
    today i tried a simple binding object example and got weird exception about bug.
    i created a simple file with name Calculator.fx having just one line public var result=1;and used object binding in another file Customer.fx with following code
    var myStreet=21;
    var address= bind Calculator{
         result:myStreet;
    println({address.result});i got following output error
    init:
    deps-jar:
    Note: An internal error has occurred in the OpenJFX compiler. Please file a bug at the
    Openjfx-compiler issues home (https://openjfx-compiler.dev.java.net/Issues)
    after checking for duplicates.  Include in your report:
    - the following diagnostics
    - file C:\Users\omnidoc\AppData\Local\Temp\javafx_err_59993.txt
    - and if possible, the source file which triggered this problem.
    Thank you.
    C:\cc_storage\Caculator\src\Customer.fx:3: cannot find symbol
    symbol  : variable VOFF$result
    location: class Calculator
    def address= bind Calculator{
    1 error
    ERROR: javafxc execution failed, exit code: 1
    C:\cc_storage\Caculator\nbproject\build-impl.xml:143: exec returned: -1
    BUILD FAILED (total time: 2 seconds)Am i doing something wrong or is it really a bug.
    Also can anyone tell me how to do object binding in javaFX.
    thanks
    chauhan

    chauhan2003 wrote:
    Am i doing something wrong or is it really a bug.When you get such error, that's both: you made a mistake (and at least you get a generally helpful message about it) but the compiler is bugging out and crashing...

  • Error while executing BBP_UPDATE_PORG Tr Code with ADD Option

    Hi All,
    I changed the Back end Vendor Master Data - Purchasing View (Example Accounting Number) and run the BBPUPDVD Tr code in SRM. The Business Partner (Vendor) data is updated correctly in SRM System from Back End System.
    We have set of purchasing organisations like one local (SRM) Purchasing Organisation and respective Back end Purchasing Organisation (account number). When ever I run BBPUPDVD, the SRM system updates the backend vendor master data  with back end purchasing organisation into SRM Standard tables. Then I am running BBP_UPDATE_PORG Tr code to have updated data into SRM Local Purchasing Organisation. I am receiving error message.
    Example Scenario:
    step 1: Present values in Vendor Master Vendor Number 100250, Purchaing Organisation : 1010 A/c Number: 100250-1010
    and I changed the account number as 10025o-test for vendor 100250 and pur organisation 1010.
    step 2: I run the BBPUPDVD in SRM System.
    Step 3: I checked the values in BBPMAININT - vendor data (for backend vendor number 100250 and backend pur organisation - 1010). The SRM system replicates the values correct.
    Step 4: I executed BBP_UPDATE_PORG and replaced the local (SRM) business partner (for local vendor number - 100250 and local purchasing organisation) - REPLACE Option. Then SRM replaces the SRM Business Partner (local) Data with Back end Vendor Master Data and also Back End vendor master data is deleted in SRM System. Now I have updated business partner details in SRM System as SRM Local an no SRM Back End Vendor Master Data in SRM System. This step is working fine.
    Step 5: One more time I am executing BBP_UPDATE_PORG Tr code with Add option to have SRM Back End Details (in SRM System) from SRM Local Details (SRM System). Then the system is error message in SM13 Tr code.
    Kind Note: There is no SRM Back End Vendor details in SRM System which I want to have with the help of executing BBP_UPDATE_PORG Tr code with Add option.
    For analysis I went to ST22 (dump Analysis), the SRM gave an error message like:
    Runtime Error          DYNPRO_SEND_IN_BACKGROUND
    Date and Time          09/15/2008 10:56:58
    ShrtText
         Screen output without connection to user.
    What happened?
         Error in ABAP application program.
         The current ABAP program "SAPLBBP_PARTNER_MAINT" had to be terminated because
          one of the
         statements could not be executed.
         This is probably due to an error in the ABAP program.
    Information on where terminated
        The termination occurred in the ABAP program "SAPLBBP_PARTNER_MAINT" in      "BBP_PORG_INSERT".
        The main program was "RSM13000 ".
        The termination occurred in line 59 of the source code of the (Include)      program "LBBP_PARTNER_MAINTU11"
        of the source code of program "LBBP_PARTNER_MAINTU11" (when calling the editor      590).
        The program "SAPLBBP_PARTNER_MAINT" was started in the update system.
       56
       57 * update database
       58   IF NOT LT_FRG0060_NEW[] IS INITIAL.
    >>>>>     INSERT BBPM_BUT_FRG0060 FROM TABLE LT_FRG0060_NEW.
       60   ENDIF.
       61
       62   IF NOT LT_FRG0061_NEW[] IS INITIAL.
       63     INSERT BBPM_BUT_FRG0061 FROM TABLE LT_FRG0061_NEW.
       64   ENDIF.
    Kindly guide me or provide solution.
    We are in SRM 4.0 and ECC 5.0.
    Thanks a lot in advance.
    Regards,
    Sudarsan
    Edited by: KOYYA SUDARSANA NAIDU on Sep 15, 2008 9:09 PM
    Edited by: KOYYA SUDARSANA NAIDU on Sep 17, 2008 8:46 PM

    Hi All,
    I changed the Back end Vendor Master Data - Purchasing View (Example Accounting Number) and run the BBPUPDVD Tr code in SRM. The Business Partner (Vendor) data is updated correctly in SRM System from Back End System.
    We have set of purchasing organisations like one local (SRM) Purchasing Organisation and respective Back end Purchasing Organisation (account number). When ever I run BBPUPDVD, the SRM system updates the backend vendor master data  with back end purchasing organisation into SRM Standard tables. Then I am running BBP_UPDATE_PORG Tr code to have updated data into SRM Local Purchasing Organisation. I am receiving error message.
    Example Scenario:
    step 1: Present values in Vendor Master Vendor Number 100250, Purchaing Organisation : 1010 A/c Number: 100250-1010
    and I changed the account number as 10025o-test for vendor 100250 and pur organisation 1010.
    step 2: I run the BBPUPDVD in SRM System.
    Step 3: I checked the values in BBPMAININT - vendor data (for backend vendor number 100250 and backend pur organisation - 1010). The SRM system replicates the values correct.
    Step 4: I executed BBP_UPDATE_PORG and replaced the local (SRM) business partner (for local vendor number - 100250 and local purchasing organisation) - REPLACE Option. Then SRM replaces the SRM Business Partner (local) Data with Back end Vendor Master Data and also Back End vendor master data is deleted in SRM System. Now I have updated business partner details in SRM System as SRM Local an no SRM Back End Vendor Master Data in SRM System. This step is working fine.
    Step 5: One more time I am executing BBP_UPDATE_PORG Tr code with Add option to have SRM Back End Details (in SRM System) from SRM Local Details (SRM System). Then the system is error message in SM13 Tr code.
    Kind Note: There is no SRM Back End Vendor details in SRM System which I want to have with the help of executing BBP_UPDATE_PORG Tr code with Add option.
    For analysis I went to ST22 (dump Analysis), the SRM gave an error message like:
    Runtime Error          DYNPRO_SEND_IN_BACKGROUND
    Date and Time          09/15/2008 10:56:58
    ShrtText
         Screen output without connection to user.
    What happened?
         Error in ABAP application program.
         The current ABAP program "SAPLBBP_PARTNER_MAINT" had to be terminated because
          one of the
         statements could not be executed.
         This is probably due to an error in the ABAP program.
    Information on where terminated
        The termination occurred in the ABAP program "SAPLBBP_PARTNER_MAINT" in      "BBP_PORG_INSERT".
        The main program was "RSM13000 ".
        The termination occurred in line 59 of the source code of the (Include)      program "LBBP_PARTNER_MAINTU11"
        of the source code of program "LBBP_PARTNER_MAINTU11" (when calling the editor      590).
        The program "SAPLBBP_PARTNER_MAINT" was started in the update system.
       56
       57 * update database
       58   IF NOT LT_FRG0060_NEW[] IS INITIAL.
    >>>>>     INSERT BBPM_BUT_FRG0060 FROM TABLE LT_FRG0060_NEW.
       60   ENDIF.
       61
       62   IF NOT LT_FRG0061_NEW[] IS INITIAL.
       63     INSERT BBPM_BUT_FRG0061 FROM TABLE LT_FRG0061_NEW.
       64   ENDIF.
    Kindly guide me or provide solution.
    We are in SRM 4.0 and ECC 5.0.
    Thanks a lot in advance.
    Regards,
    Sudarsan
    Edited by: KOYYA SUDARSANA NAIDU on Sep 15, 2008 9:09 PM
    Edited by: KOYYA SUDARSANA NAIDU on Sep 17, 2008 8:46 PM

  • U530 Touch - Audio DRIVER ERROR - This device cannot start (Code 10) - Windows 7

    U530 - High definition audio device - ERROR - This device cannot start (Code 10) Windows 7, please see the picture
    Picture link (hosted on photobucket.com)
    I got all drivers up to date including the BIOS, everything is working fine (the sound works, microphone works...) but this error is kind of annoying to my eyes so if anyone know how to fix it please help.
    I tried to uninstall this and let windows update install it again => not worked, same problem.
    I tried to re-install the Realtek driver (uninstall - restart machine - install - restart machine) => same problem
    And another probelm which has not been solved yet is the Bluetooth icon keep blinking on battery mode (windows 7), you can see more in this thread

    What kind of reinmstall did you perform?  If you used the recovery media, then this will be pretty simple. Boot to the recovewry media again and this time select the Reinstall drivers and applications option. Find the audio driver on the list of available drivers, put a tick in the box to its left and then click on the install button in the lower right hand corner of the window. The driver will be installed.  Your list will be different than the following one, but this is only an example. 

  • Has anyone got the Comsoft Profinet example code working??

    Hello!
    I have a cRIO Profinet card and I'm attempting to get the example code working.
    I have followed the instructions in GettingStarted_cRIO_PN_IO_Device.pdf
    I have created an empty project with just the 9023 and 9113 present, and copied the 3 items from the example project cRIO PN IO-Device (LV 2012) as per the documentation.
    When I try to compile I get the error shown attached.  I cannot view the error as the VI is password protected.
    In 5 years of working with cRIO using many different c-series modules from NI and 3rd parties I have never come across a password protected example Vi - this is very disappointing!  I don't see how it will be possible to use the card without being able to access this VI, and clearly it is impossible to use it without this VI as they are unwilling to share its functionality.
    Has anyone got this working on anything other than a 9104 (which the example uses?)  Does anyone know the password?  Is it possible to use the card without using this example code?
    I will be communicating with a Siemens PLC (acquiring a load of U16s and logging on the cRIO at 20ms intervals).
    Many thanks for any input, or any experiences of using this card.
    Aaron
    LabVIEW/RT/FPGA 2012
    NI-RIO 12.0.1
    cRIO 9023 controller and 9113 chassis with COMSOFT PN module in slot 1.
    Attachments:
    PN_error.png ‏44 KB
    PN_error2.png ‏20 KB

    Just for the record, I am using the CRIO-PN with cRIO-9081 and cRIO-9068 integrated chassis successfully.
    LabVIEW (RT/FPGA) 2013 SP1.
    I didn't use the higher level ComSoft example code directly, as the VIs use so many control/indicators that the FPGA usage is sky high. I rewrote them to pass the I/O data via DMA FIFOs.

  • Problem when using IRoomInfoReader/IRopomUsers in SDN example code

    Hi I am working on EP 6.0 SP2 P31, KMC 6.0 SP2 P31 and making Room development with NW Developer Studio. From https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/kmc/knowledge management and collaboration developers guide.html  I got the room extension example in com.sap.netweaver.kmc.roomextension.zip. I just add a ON_AFTER_CREATE_ROOM and code for handling this event before adding
    IRoomInfoReader roomInfo = (IRoomInfoReader)context.getValue(RoomExtensionParameter.ROOM_INFO);
    or
    IRoomUsers roomUsers = (IRoomUsers)context.getValue(RoomExtensionParameter.ROOM_INFO);
    (in order to retrieve the newly created room’s owner's id)
    The example code is working, the extensions are visible, they can be added to our room template and room can be created successfully with this template.
    After adding one of these two commands program stops just before this command line and there is no error message recorded in the log file.
    Does this KMC release version support using these two interfaces? Thanks for help.
    Best regards.
    Wang

    Hi Wang,
    as a lucky guy working on SP2, you have all logs at hand - did you check both \usr\sap\<id>\j2ee\j2ee_00\cluster\server\managers\console_logs\...error.log as well as \usr\sap\<id>\j2ee\j2ee_00\cluster\server\managers\log\portal\logs\knowledgemanagement.x.log ?!
    Did you try to log extensively? try/catch every Exception?
    Both interfaces do exist on SP2 P31.
    Did you check which class context.getValue(RoomExtensionParameter.ROOM_INFO) in fact produces?! (If not null, ask for .getClass().getName().)
    Hope it helps
    Detlev

  • Simple example code to connect to SQL server 2002

    Hi,
    I found a good website a while back which showed step by step how to connect to a sql server DB using JDBC, a re-install of windows means I cant find it again. I have searched the web, but to no avail. Basically I need to find a step by step guide to using java to access data within MS SQL server 2000. It needs to include details about where to download suitable drivers etc. and example code so that I can originally test my connection before diving much deeper.
    Any help much appreciated.

    Hi:
    here is the code that you can use it to test your connect if you use MS sql 2000 free driver. Others, you need to make little change on
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); and
    con = .......... parts
    goog luck !
    import java.sql.*;
    public class Connect{
    private java.sql.Connection con = null;
    private final String url = "jdbc:microsoft:sqlserver://";
    private final String serverName= "localhost";
    private final String portNumber = "1433";
    private final String databaseName= "pubs";
    private final String userName = "xxxxx";
    private final String password = "xxxxx";
    // Informs the driver to use server a side-cursor,
    // which permits more than one active statement
    // on a connection.
    private final String selectMethod = "cursor";
    // Constructor
    public Connect(){}
    private String getConnectionUrl(){
    return url+serverName+":"+portNumber+";databaseName="+databaseName+";selectMethod="+selectMethod+";";
    private java.sql.Connection getConnection(){
    try{
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    con = java.sql.DriverManager.getConnection(getConnectionUrl(),userName,password);
    if(con!=null) System.out.println("Connection Successful!");
    }catch(Exception e){
    e.printStackTrace();
    System.out.println("Error Trace in getConnection() : " + e.getMessage());
    return con;
    Display the driver properties, database details
    public void displayDbProperties(){
    java.sql.DatabaseMetaData dm = null;
    java.sql.ResultSet rs = null;
    try{
    con= this.getConnection();
    if(con!=null){
    dm = con.getMetaData();
    System.out.println("Driver Information");
    System.out.println("\tDriver Name: "+ dm.getDriverName());
    System.out.println("\tDriver Version: "+ dm.getDriverVersion ());
    System.out.println("\nDatabase Information ");
    System.out.println("\tDatabase Name: "+ dm.getDatabaseProductName());
    System.out.println("\tDatabase Version: "+ dm.getDatabaseProductVersion());
    System.out.println("Avalilable Catalogs ");
    rs = dm.getCatalogs();
    while(rs.next()){
    System.out.println("\tcatalog: "+ rs.getString(1));
    rs.close();
    rs = null;
    closeConnection();
    }else System.out.println("Error: No active Connection");
    }catch(Exception e){
    e.printStackTrace();
    dm=null;
    private void closeConnection(){
    try{
    if(con!=null)
    con.close();
    con=null;
    }catch(Exception e){
    e.printStackTrace();
    public static void main(String[] args) throws Exception
    Connect myDbTest = new Connect();
    myDbTest.displayDbProperties();

  • Static task Error -200428

    I am using Labview 8.2 with an AI Input card 9215 on CDaq 9172.  The application uses a static task to read the voltage(displacement).
    The app works fine, except when the app is closed(using the x in the top RH corner), then restarted I get the error -200428 at DAQmx Start Task.Vi(Value passed to the task/Channel is invalid).  The only fix is to restart the PC.
    I have checked that the Stop Task VI is called when the app closes.  I have tried resetting the Daq device using Max but it makes no difference.
    I believe there is some problem in my code closing the task properly, hence the need to restart the PC to release task resources.
    Any suggestions ?
    Attachments:
    simpleVi.JPG ‏18 KB

    Enclosed a simple Vi that demonstrates the installed app.  I have used a simulated CDaq device (identical to the customer cDaq)on my development PC and the  simple VI works fine(both built as an exe and just running the VI on the development PC).  The static task is identical to the  task on the production app that is giving problems
    <Item Name="VoltageIN" Type="NI-DAQmx Task">
             <Property Name="\0\AI.Max" Type="Str">10</Property>
             <Property Name="\0\AI.MeasType" Type="Str">Voltage</Property>
             <Property Name="\0\AI.Min" Type="Str">-10</Property>
             <Property Name="\0\AI.TermCfg" Type="Str">Differential</Property>
             <Property Name="\0\AI.Voltage.Units" Type="Str">Volts</Property>
             <Property Name="\0\ChanType" Type="Str">Analog Input</Property>
             <Property Name="\0\Name" Type="Str">VoltageIN/Displacement</Property>
             <Property Name="\0\PhysicalChanName" Type="Str">AnalogIN/ai0</Property>
             <Property Name="\1\AI.Max" Type="Str">10</Property>
             <Property Name="\1\AI.MeasType" Type="Str">Voltage</Property>
             <Property Name="\1\AI.Min" Type="Str">-10</Property>
             <Property Name="\1\AI.TermCfg" Type="Str">Differential</Property>
             <Property Name="\1\AI.Voltage.Units" Type="Str">Volts</Property>
             <Property Name="\1\ChanType" Type="Str">Analog Input</Property>
             <Property Name="\1\Name" Type="Str">VoltageIN/Loadcell</Property>
             <Property Name="\1\PhysicalChanName" Type="Str">AnalogIN/ai1</Property>
             <Property Name="Channels" Type="Str">VoltageIN/Displacement, VoltageIN/Loadcell</Property>
             <Property Name="Name" Type="Str">VoltageIN</Property>
             <Property Name="SampClk.ActiveEdge" Type="Str">Rising</Property>
             <Property Name="SampClk.Rate" Type="Str">20</Property>
             <Property Name="SampClk.Src" Type="Str"></Property>
             <Property Name="SampQuant.SampMode" Type="Str">Continuous Samples</Property>
             <Property Name="SampQuant.SampPerChan" Type="Str">100</Property>
             <Property Name="SampTimingType" Type="Str">Sample Clock</Property>
          </Item> 
    However on the customer PC it throws the error -200428 even after a restart of the PC
    Any ideas would be appreachiated 
    Attachments:
    StopTaskOnPanelClose.vi ‏61 KB

  • How to resolve error -200428 ?? New User

    I am a new user of LabView which is supporting a 1331 Instron. I am attempting to get data from the Instron into a LabView program left by another sutdent. When I attempt to run the software, it detects the connection to the Instron but when I try to log the data I get the following error,
    "The following error occurred during the application:
    Code: -200428
    SourceL Property Node DAQmxTiming (arg 1) in DAQmx
    Timing (Sample Clock). vi:1 --> Instron system top level amy modified14.vi <append>
    <B> Task Name: <\B>MyVoltageTask"
    can anyone help, I believe it might have to do with failure to update the software etc. ...

    Hey kpatil,
    What version of LabVIEW are you working with. I am unfamiliar with this '1331 Instron'. Is this device a PCI based data acquisition card? The error message refers to a Task by the name of "MyVoltageTask." How did you come across this code. Is this code that was something developed on that machine and you are now just picking it up again. Or is this legacy code that was developed once upon a time and you happen to be using it on your current machine? The reason why I ask is because if this code is referring to specific tasks or devices and they are not in the same location, you may have some troubles. Also, this error occurred in one of the parameters of the DAQmx Timing Property Node, that would be a good place to start to figure out what is causing the error.
    Hope this helps.
    -Ben
    WaterlooLabs

  • Indexed Property Example Code

    Is there an example out there for a Java Newby - I am trying to save data in an array - that is using the indexed property in a SessionBean.
    I have then added the indexed property and bound the value to it:
    * Indexed getter for property rule.
    * @param index Index of the property.
    * @return Value of the property at <CODE>index</CODE>.
    public Long getRule(int index) {
    return this.rule[index];
    * Indexed setter for property rule.
    * @param index Index of the property.
    * @param rule New value of the property at <CODE>index</CODE>.
    public void setRule(int index, Long rule) {
    this.rule[index] = rule;
    public String button1_action() {
    setValue("#{AdminBean.rule[1]}", selector.getValue());
    I am getting the followong error:
    Exception Details: org.apache.jasper.JasperException
    Error getting property 'rule' from bean of type magicwheel.AdminBean
    Possible Source of Error:
    Class Name: org.apache.jasper.servlet.JspServletWrapper
    File Name: JspServletWrapper.java
    Method Name: service
    Line Number: 384
    Source not available. Information regarding the location of the exception can be identified using the exception stack trace below.
    Can anyone help, possibly with some example code?
    Thanks,
    Nils

    public String button1_action() {
    setValue("#{AdminBean.rule[1]}",
    selector.getValue());
    How about
    getAdminBean().setRule(1, selector.getValue());Assuming that selector.getValue() returns a Long and that AdminBean is either an Application, Session, or Request Bean.
    Best regards
    Antonio.

Maybe you are looking for

  • X-axis values on Custom charts

    Hi, I have a Custom chart with the Pen Type as Line. If I plot a numerical values as the X-axis, the X-axis ranges do not come as expected. e.g. If my data comes as shown below and I am plotting column A on the X-axis, then the X-axis labels would re

  • Forms9i- buit-in ...not working ??

    what happen is when i test it on my pc, the form is working. The button when i click does work. So when i port over from my pc to 9ias rel 2. the forms comes out. but then when i click the button it just not responding. the question is. 1. What is wr

  • Non valuated movement type

    The finished products that are sold are received/returned back from the customer. These returned goods from customers are basically for rechecking, testing, callibration. once these activities are done, they are send back to the customer. These all a

  • Login problem after testing upgrade today

    Yeah problem after upgrade again   After i enter my username and password to login to Gnome, i get the message Your session only tested less than 10 seconds. If you have not logged out yourself, this could mean that there is some installation problem

  • Opening flash drawing in illustrator?

    I drew an illustration for a local business in Flash using mostly the line tool. When I try to open it in illustrator, it acts as if it is not vector anymore, and when I try to do a live trace it looks terrible. I thought flash was vector? What am I