Jump to content

orko

Members
  • Posts

    576
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by orko

  1. QUOTE (Mike C @ Apr 25 2008, 09:05 AM)

    I am using the following SQL query to get the primary key ID following a record insert but nothing is returned:

    Insert into tblname (field_1, filed_2) Values ('value1', 'value2')

    select scope_identity()

    This query works as expected in the SQl server Management studio but not in LabVIEW.

    I agree about termination characters being a major bane. Also, two other things come to mind.

    1) you say, "query", not "queries" so I'm assuming that the text above is going in as one query? That probably will not work...I would assume that you would have to do an insert query and then a select query seperately. I haven't played with it in in the LabVIEW DBC toolkit to be sure.

    2) If combined read/write is allowed in the DBCT in one SQL query, the above still will not work since there is nothing separating the two queries but a line break. A semi-colon would need to be after each query to signify the end. Consider this, which is a valid SQL statement (and how I usually form my queries programatically since the fields/values can be generated easily):

    Insert into tblname(field_1, filed_2)Values ('value1', 'value2');select scope_identity();

  2. QUOTE (psiam @ Apr 24 2008, 03:28 AM)

    still don't work for both of C:\curl -i and C:\curl -l,for more info see in attach file.

    Hmm. Can't see the code that produced the FP you showed us. But if that doesn't work you may be working against some sort of cookie issue as noted.

    Since I'm assuming all of this works when requested by a browser, I wonder if a straight-up Internet Explorer embedded ActiveX control on your front panel may be another solution? I'm not sure (never tried it) but wouldn't you have access to the source HTML if you requested a page in the ActiveX container? I guess for that matter you wouldn't even need to show the control, it could be hidden and doing operations in the background.

    Has anyone else here had any experience in doing it that way? Basically having IE do all the work by having it request pages for you (you would have to POST the login info from IE on the first call of course) and grabbing the HTML source to parse out the test results?

    Sorry I can't be of any more help than that. :(

  3. QUOTE (minority @ Apr 23 2008, 12:51 AM)

    To select which port to onnect to, I've used the existing "VISA Resource" control that gives a drop-down list of available ports on the device. However, it seems to me that it does not refresh itself even after devices have been plugged or unplugged. The only way I can get a refreshed list is by closing the VI and then reopening it again. Is there a better way to do this?

    You should be able to right click on the control and select "refresh" from there. Other than that, opening up MAX and refreshing devices as your plugging in/unplugging them should do the trick as well.

  4. QUOTE (PaulG. @ Apr 21 2008, 01:27 PM)

    I will be paying close attention to this thread. I hope we get a good dialog going.

    I'll cast my hat into the ring as well. I've had a void to fill ever since getting through all those NI courses just in time for LVOOP to be released. :(

    I've worked with C++ OOP, which seemed almost intutive to pick up. I agree that there seems to be too many different implementations out there (which is probably to be expected at this point since OOP is relatively new to LabVIEW). I also would like to at least be very, very familiar with the standard installation's version as priority one, so that I can make an informed decision about which direction I'm going to go with this.

  5. mross,

    Correct me if I'm wrong, but isn't there a possibility that none of the 10 iterations will produce a number in the desired range? I would think a while loop (vs. For Loop) that tests the size of the output array to ensure a set number of results would be nice.

    I see what you are getting at, and this is a good learning exercise for someone learning LabVIEW. For real world applications I think you'd agree that a one-shot algorithm approach that gaurantees one number within range on each execution (rand*(MAX-MIN) + MIN) would be a better approach.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.