Better way to communicte with TwinCAT

Hi to everyone,
i have to control a servovalve (MOOG) in etherCAT using TwinCAT and LabView. So i have to set ControlWord and Pressure Setpont from LabView to TwinCAT.
Can you say me what is the better way to make this? ActiveX or DLL. And are there other examples in add to bechoff site examples? Or documentations
Thank you very much in advances
Mauro Rivosecchi

I'm not sure you can say that either ActiveX or DLLs are better than the other. Personally I prefer to work with ActiveX because the APIs tend to be better. But at the end of the day, you use what you get from the vendor.
In terms of code samples, there is a level of personal preference here as well. When working with something new, I like to see examples written in VB because I find it easy to read and grasp what it is that code is doing. In terms of sources for example code, you should check to see if the other vendor has user forums. It's unlikely that you will find another LV user, but you might be able to get snippets of code in some other language that illustrate how to do specific things.
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

Similar Messages

  • A better way to deal with lost hyperlinks when converting Robohelp to Printed doc?

    I have inherited a 750-page manual that is
    "single-sourced" in RoboHelp X5. When I generate printed
    documentation, all of my hyperlinks and converted to plain text.
    Everytime we release a new version of the manual with any changes,
    we have to re-generate, and then manually go into the MS-Word
    converted document and re-create some 350 hyperlinks and page
    number references. Somebody please tell me that there is a better
    way to do this, or a better tool to manage single-source
    documentation.

    Another post has been raised relating to this problem. See
    http://tinyurl.com/yvpaut
    I am replying here is this is where most of the relevant
    information is.
    You found that using the Style Mapping template solved the
    images problem but the document stopped generating at 450 pages.
    That was sort of what I hoped for. Rather than go to the step I
    will suggest in a moment, I suggested you try something else but
    you never came back to the forum to indicate you had tried it, so
    the assumption is you did and it worked. Patently it did not so
    let's try what I would have suggested next.
    On my website there is a topic on Print Issues and one of the
    them covers Malformed Topics. Try looking for <p
    style="mso-bookmark: as suggested in my earlier reply in this
    thread. You can try RH's Multi file find and replace but FAR from
    http://www.helpware.net/FAR
    may get better results. I think with this error you usually get a
    message. Do you have the Output pane opened and have you read right
    through it for clues? View | Output on the menu. Whether or not the
    Output pane mentions this error, I would search for it anyway.
    Other Points:
    A] It could still be a resource problem. The document is very
    large so, as Harvey mentioned, resources come into it. I know the
    PCs that won't play nicely have good resources but whilst I am no
    expert in this area, don't foget XP is using more of them leaving
    less available to you. It could be an issue but I am inclined
    towards it being something else.
    B] I also suggested a hunt for a rogue topic.
    "What I would try is copying your layout so that you have
    three versions of it. Then delete two thirds from each one. If all
    three work fine, it sort of confirms that size is a problem. If one
    fails, your on the track of the rogue topic."
    Did you try that? Like I said, if all three work fine, then
    we are back with the resource problem but we will have ruled out
    other issues. It should take less than fifteen minutes to set that
    up. Longer to run it but you can be doing something else at that
    point.
    C] On FrameMaker, no real answer but you will soon see
    evidence that Adobe are continuing to better integrate all the
    products we are using. I don't think you will see what you want in
    the upcoming version though.
    NEXT:
    1] Please search for <p style="mso-bookmark:
    2] If that fails, try creating the three layouts.
    3] Then post back how it went. If unsuccessful, tell us if
    the Output pane gave any information about things the process did
    not like.
    Let us know either way as if one succeeds and you post that,
    it helps the next person with the same problem.

  • Is there a better way to deal with Verizon and my DSL issues?

    My family and I have been with Verizon for as long as we've had broadband internet. For the past 5 years or so the internet has been shaky at best. For the most part it works, but a coupe times a year it stops working all together or becomes VERY intermittent (and is usually working by the time I get finished sitting on hold and the test the technician runs shows no problems). Every time I have to wrestle with the "tech support" on the phone and listen to a recording tell me the same things over and over again that never fix my problems.
    Every time my internet gets to this point, it requires a visit from a Verizon technician. Usually they go out into the neighborhood and find a length of cable and replace it. Usually that fixes my issues for a while, but I know it will happen again. It always happens again.  It seems to me that the entire length of line that my internet runs through is old, and needs to be replaced. Instead of fixing the problem before it actually becomes a problem, Verizon continues to leave me and my family without service for periods of time.
    Last week was the most recent time we dealt with this situation, which was fortunately short lived (Only all day Sunday, into Monday when the technician arrived). It's getting VERY tiring dealing with this situation over and over again, and it's getting offensive honestly. To hear the tech support person tell me that I will be charged $91 if the problem is found and is inside my house is ridiculous. I would understand if this was the first time this situation had occurred, or if I frequently reported non-issues. But no, I'm simply reporting the same issue that Verizon has failed to fix MANY times before. 
    Perhaps the most frustrating part of this, is that we've never been compensated for our lost service. Last year we lost service for an entire week. That's an entire week with no internet service at all. After we finally got it back, we spoke with the billing department and they told us that we would be credited for the week we lost service. At this point, we are yet to see any credit for the time we have been without the service we pay for. Perhaps we would have tried dealing with Verizon again to get our weeks credit, but attempting to contact someone in Verizon seems futile. Unless you're calling sales you end up sitting on hold for extended periods of time, only to be bounced from person to person until you get to someone that has no excuse not to pretend to help you. 
    Unless something changes, this is Verizon's last opportunity to keep our service. We have dealt with the loss of service followed by the insult of attempting to deal with Verizon's customer support for the last time. Next time it happens (and I'm sure there will be a next time) unless Verizon shows us that they are actually going to correct the problem, we will cancel our service and give our business to the competitor. This post is being written for a few reasons. I'm hoping that perhaps Verizon can give me a better way to contact someone locally when we have a problem (I would LOVE to speak with a regional manager, or even a local manager of some sort), or at least recognize that there is a problem that will end up costing them money. 
    Thank you,
    A long time customer.

    I've decided to give up the fight and go to another provider.  I have work to do and having to wait at speeds slower than dial up is insane.  At least with dial up I'd have some stability.  I can't even run speedtest because it won't connect.  At hotels, wi-fi, and hanging by blackberry the laptop works fine but to actually use dsl, nope.  Multiple machines and multiple browsers - it's all the same worthless bandwidth.  
    If they won't give you fios then there is no reason to stay.  They've been promising me the service is coming for the last 6 years.  They could have run it here by now for the postage they've spent trying to get me to switch to it even though it isn't available.  Waste, waste, waste ....

  • Is there a better way to deal with Edge Animate CC's library management?

    I haven't been using Edge Animate CC for very long, but I already have a huge list of complaints.  Although I could go into detail about features that seem to be missing from my version of Edge (just a quick example, all of the tutorials I've seen have a quick code insert feature on the right side of the code dialog box that my version doesn't seem to have, or even have the option for turning on), right now I want to focus on Edge's HORRENDOUS LIBRARY MANAGEMENT.
    So I created the following animation which I have put into an iframe:
    The issue I had on the first draft of this project was that I (perhaps naively) thought that there would be an option to actually re-size the pictures on export.  There wasn't, and so my original version was really, really large, took way too long to load, and needed to be updated. For the second version, I reduced the size of the pictures and made them JPEG files (some of the originals were - quite unnecessarily - large PNG files) and reduced the quality so that they were all under 10KB.  Of course, I had to rename the files and re-import them to Edge's library. This is where my problems started.
    You see, edge will put the files into a folder marked "images" when you publish them in a folder, so I just assumed (NOT UNREASONABLY) that the resulting animation would pull from the images folder.  It worked fine in the preview, so I pushed it via FTP, only to find that all of the original files (which were not in the new animation) were pushed to the new "images" folder.  The only library management that you get in Edge is apparently looking for the file in the folder you designate as the "Library" folder, so deleting these images out of the "Images" folder makes not one bit of difference. That should have been my first clue that something was rotten in Denmark, to use a Shakespearean metaphor. After removing these files and publishing my banner again, suddenly the new images weren't showing up. They were clearly in the "images" folder on the FTP server, but they weren't showing up in the animation.  So I inspected the banner on the site, only to find that rather than point to the images folder, they are in fact pointing to the library folder. WHY DO THE PUBLISHED IMAGES POINT TO THE "LIBRARY" FOLDER THEY WERE PULLED FROM INSTEAD OF THE "IMAGES" FOLDER THAT THEY'RE PUBLISHED TO? I added a new file tree that mimicked the folder structure and put the images in a mock "library folder" and now the animation works again. 
    The library management in this program is just plain awful (I can't stress this enough), making it a chore for experienced users and a red-hot rage-keyboard-pounding mess for everyone else. And the worst part, there doesn't seem to be any explanation from Adobe on why it is this way.
    I am really not looking forward to the next time I have to use this program at work.

    I'm not sure that's any easier. It would be nice if Edge gave you a(n obvious) way to re-link files, but it even fails in that respect.
    What would be better is if I could just point Edge to my FTP site and put the library on there. It would solve so many problems... failing that though, some sort of library management option set needs to be implemented in this software. I try to practice appropriate file management, but I hate having to be punished with an extra twenty minutes of work for one little mistake.

  • Better way to work with AE and Premier CS4

    I've read most of what's been said about rendering and planning your work before you begin. However, I have a very large 1 minute AE file that was already created with HD settings. All I needed to do was drag and drop my footage and text - which I did in seconds.
    I'm using the 1 minute as an intro to a video I'm creating in Primier CS4, SD 16:9, 720x480 NTSC. My question is:
    a) rendering this clip is taking about 4 1/2 hours. Using QuickTime movie, no compression. Remember is HD and HUGE. Should I do it this way?
    b) Would it be better to use Adobe Bridge and bring the un rendered project into Premier, choosing Fit to Screen?
    c) Would it be better to export it as an HD .avi file, bring it into Media Encoder and downsize the file and THEN import the single .avi clip into Premier?
    What do you suggest will give me the most stable and clear one minute intro?
    I'm working in Windows 7, 64 bit, 2 hard drives: C and Video. Have the Production Suite. 8 GB Ram. System is 3 years old and was built by a certified Adobe dude.
    Thanks for anything you can give me.

    As Dave said, confusion everywhere. It's pretty clear that you know little to nothing about AE and thus don't know which levers and knobs to tweak. In so many words, none of your ideas makes any sense, as it's actualyl ridiculously easy to downsize content in AE, eitehr by nesting it in a notehr composition as a layer and using "fit to comp" or scaling it in the output module settings. The rest is neither here nor there -
    "stable and clear" are just a matter of perception. Yes, from a technical POV using uncompressed is always a safe bet, but that won't do you any good if you do something silly when scaling the footage. So we're back to square one no matter what. Therefore I strongly suggest you read the AE help and this:
    Getting started with After Effects
    And yes, depending on what's involved in that template project, the rendering time could be perfectly normal.
    Mylenium

  • Better ways to work with the pen tool

    I'm finding the pen tool a real aggravation to use... first off you cannot hardly see the points once a path is completed.  Even blowing the artwork up really big doesn't help much.
    Then its really easy to loose the ability to move individual points... at least I've found that at one point I can select and move the points easily with keyboard and somehow I loose that ability and seems to difficult to regain it.  Instead I'm moving the whole path.
    I wondered if any of the plugins out there might be dedicated to making the pen tool points easier to manipulate and edit.  Just making them easily visible would probably be enough.

    Jacob Bugge wrote:
    Harry,
    The Direct Selection Tool is the one to use for moving Anchor Points after the path has been drawn. Always work on paths without anything selected when you start; this is one place where Smart Guides are your friends because they let you see highlights of what you may select.
    If you Click an Anchor Point, you will see that it is shown as a filled square; the other (non selected) Anchor Points are shown as hollow squares; you can select additional Anchor Points by ShiftClicking them.
    With the desired Anchor Point(s) chosen, you may ClickDrag (either of them), or use the Arrow keys, or Object>Transform>Move, to move it/them.
    You can also ClickDrag across the desired Anchor Point(s), starting from an empty spot with no fill (normally outside the path).
    If I'm following you above... I do not see that behavior here.  I speaking particularly of your third and fourth points.
    You are talking about doing point 3 and 4 with direct select right?
    To make it simple I'll just work with one point on a closed path  :... I first click on an empty part of art board, then click a single point.  At that point all the points light up and show there handles.  The clicked one is a solid red dot, the others are a hollow dot with red stroke.
    Now according to what I got of your comments, I should be able to move that single selected point with the arrow keys.... but I cannot.
    Far as point 4, same thing applies... It is good to know that I can select multiple points that way, but after selecting ... the keyboard arrows do nothing to the selected points.   But at least I can quickly pull mutiple points around with the mouse... so thanks for that bit.
    Are you able to select a point on a closed path, and control it with arrow keys?
    Is there some circumstance I may have initiated inadvertantly that would prevent the arrow keys moving points around.
    I pretty sure there was while early on where I was moving individual points with keyboard but cannot get it to happen now.

  • A better way to initialize imported taskflows and BCs with current user

    Hello.
    I'm currently developing a composite application containing one main application and a number of subapplications (modules) packed in adflibs.
    Main application has a side menu and a dynamic region, showing taskflows (on fragments) from adflibs.
    Main application is configured with adf security and it has current login and queries his ID. I would like main application to tell modules current user ID rather than each module to find out current user on their own.
    So there is currentUserID input parameter required in each imported taskflow. And my question is what is a better way to process this ID in the modules?
    What I have previously done is:
    I've created a custom BC classes layer, VOImpl and VORowImpl have getIdUser() method. This method reads currentUserID parameter from pageFlowScope where the taskflow is storing the parameter.
    Top-level View Objects have :IdUser query parameter and corresponding bind variable. This bind variable has value="source.getIdUser()", calling the method from custom VO class.
    This way works fine but here and there I read that it is a bad practice to access pageFlowScope from BCs.
    I could agree with this in case someone could share a better way.
    So what is a good practice?
    Thanks.
    ADF/JDev 11.1.2.3 - 12

    Why don't you use adf security for this? Read Oracle ADF: Security for Everyone which give you an overview and sample on how to implement this.
    Timo

  • Easier and better ways to solve current problems with Acrobat?

    Is there no better and easier way to solve the problems (installation, re-installing and crashing) with Acrobat? I really think that the ball is in Acrobat's corner right now, because I should not (for example) need to deactivate and re-activate my subscription in order to get AcrobatPro XI to work on my computer, let alone deinstalling an older version that (for now) does work, risking that in the end neither of them work. I need the (great) AdobeCloud applications to do my work as a freelancer, and I really cannot afford this kind of trouble with my applications, nore loose time repairing them. These are difficult times as it is.
    Regards,
    Marc

    Sorry, I can't. When I installed it there was no message that said I had to deinstall the old version first, and with other Adobe CC applications there had been no trouble at all, so I installed it with The previous version still on my computer.
    After installing, neither of them would start up properly, so I deinstalled version XI, after which the old version worked again, but my Adobe Application Manager does not let me download the XI version a second time, so I cannot try again.
    Regards,
    Marc
    Op 7 dec. 2012 om 00:41 heeft David Kastendick <[email protected]> het volgende geschreven:
    Re: Easier and better ways to solve current problems with Acrobat?
    created by David Kastendick in Acrobat Installation & Update Issues - View the full discussion
    The description of the issue you originally presented isn't something that I've seen happen to Acrobat when installed as a part of Creative Cloud.
    Could you provide a specific description of the behavior that occurs when you launch Acrobat XI now?
    Thanks,
    David
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/4902597#4902597
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4902597#4902597
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4902597#4902597. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Acrobat Installation & Update Issues by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Kindly help with rewriting the foll. query in a better way

    IS there a better way of writing the foll query:
    When I have 12,50,00,000 rows in Fact Table, the query is unable to execute. I use more than 200GB of temporary space. But I still get Temp Tablespace Full Error:
    --Foll WITH Clause is to calculate Sum of Debit-Credit to calculate BLNC acc. to Group By values
    WITH crnt_blnc_set
    AS ( SELECT f.hrarchy_dmn_id,
    f.prduct_dmn_id,
    f.pstng_crncy_id AS crncy_dmn_id,
    f.acnt_dmn_id,
    f.txn_id AS txn_id,
    f.acntng_entry_src AS txn_src,
    f.acntng_entry_typ AS acntng_entry_typ,
    f.val_dt_dmn_id,
    f.revsn_dt,
    SUM (
    DECODE (
    f.pstng_typ,
    'Credit', f.pstng_amnt,
    0))
    - SUM (
    DECODE (
    f.pstng_typ,
    'Debit', f.pstng_amnt,
    0))
    AS blnc
    FROM FactTable f
    GROUP BY f.hrarchy_dmn_id,
    f.prduct_dmn_id,
    f.pstng_crncy_id,
    f.acnt_dmn_id,
    f.txn_id,
    f.acntng_entry_src,
    f.acntng_entry_typ,
    f.val_dt_dmn_id,
    f.revsn_dt),
    --Foll WITH Clause calculates Min and Max Date Ids for the Group By conditions as mentioned
    min_mx_dt
    AS ( SELECT /*+parallel(32)*/
    f.hrarchy_dmn_id AS hrarchy_dmn_id,
    f.prduct_dmn_id AS prduct_dmn_id,
    f.crncy_dmn_id AS crncy_dmn_id,
    f.acnt_dmn_id AS acnt_dmn_id,
    f.txn_id AS txn_id,
    f.txn_src AS txn_src,
    f.acntng_entry_typ AS acntng_entry_typ,
    MIN (f.val_dt_dmn_id) AS min_val_dt,
    GREATEST (MAX (f.val_dt_dmn_id), 2689) AS max_val_dt
    FROM crnt_blnc_set f
    GROUP BY f.hrarchy_dmn_id,
    f.prduct_dmn_id,
    f.crncy_dmn_id,
    f.acnt_dmn_id,
    f.txn_id,
    f.txn_src,
    f.acntng_entry_typ),
    /*Foll WITH Clause has a Cartesian Join on date_dmn to populate missing entries
    This requirement is because if we have a distinct row for
    hrarchy_dmn_id,
    prduct_dmn_id,
    crncy_dmn_id,
    acnt_dmn_id,
    txn_id,
    txn_src,
    acntng_entry_typ Combination and If wehave a missing entry for that in the max date provided then we actually create those missing entries*/
    slctd_rcrds
    AS ( SELECT /*+ ordered use_nl(d) parallel(mx, 4) */
    mx.hrarchy_dmn_id AS hrarchy_dmn_id,
    mx.prduct_dmn_id AS prduct_dmn_id,
    mx.crncy_dmn_id AS crncy_dmn_id,
    mx.acnt_dmn_id AS acnt_dmn_id,
    mx.txn_id AS txn_id,
    mx.txn_src AS txn_src,
    mx.acntng_entry_typ AS acntng_entry_typ,
    d.date_value AS val_dt,
    d.date_dmn_id AS val_dt_dmn_id
    FROM min_mx_dt mx, date_dmn d
    WHERE mx.min_val_dt <= d.date_dmn_id
    AND mx.max_val_dt >= d.date_dmn_id
    --Foll. WITH clause actually has a outer Join with Firt With Clause to populate the values accordingly
    cmbnd_rcrds
    AS (
    SELECT /*+ USE_HASH(c) */ s.hrarchy_dmn_id AS hrarchy_dmn_id,
    s.prduct_dmn_id AS prduct_dmn_id,
    s.crncy_dmn_id AS crncy_dmn_id,
    s.acnt_dmn_id AS acnt_dmn_id,
    s.txn_id AS txn_id,
    s.txn_src AS txn_src,
    s.acntng_entry_typ AS acntng_entry_typ,
    s.val_dt_dmn_id AS val_dt_dmn_id,
    NVL (c.revsn_dt, s.val_dt) AS revsn_dt,
    NVL (c.blnc, 0) AS blnc,
    0 AS prvs_rcrd_ind
    FROM slctd_rcrds s, crnt_blnc_set c
    WHERE s.hrarchy_dmn_id = c.hrarchy_dmn_id(+)
    AND s.prduct_dmn_id = c.prduct_dmn_id(+)
    AND s.crncy_dmn_id = c.crncy_dmn_id(+)
    AND s.acnt_dmn_id = c.acnt_dmn_id(+)
    AND s.txn_id = c.txn_id(+)
    AND s.txn_src = c.txn_src(+)
    AND s.acntng_entry_typ = c.acntng_entry_typ(+)
    AND s.val_dt_dmn_id = c.val_dt_dmn_id(+))
    Select * from cmbnd_rcrds

    Thanks for the response Alfonso. I have tried that as well. But Create Table as Also uses Temp Storage till it's created. And that again gives the same error as well.
    Anyways I am now trying with a smaller set. This much piece gets executed in Half an hour but the next piece where we pivot the data is taking forever now.
    That piece is as follows:
    (SELECT /*+parallel(8)*/
    f.hrarchy_dmn_id,
    f.prduct_dmn_id,
    f.crncy_dmn_id,
    f.acnt_dmn_id,
    f.txn_id,
    f.txn_src,
    f.acntng_entry_typ,
    f.val_dt_dmn_id,
    f.revsn_dt,
    SUM (
    blnc)
    OVER (
    PARTITION BY f.hrarchy_dmn_id,
    f.prduct_dmn_id,
    f.crncy_dmn_id,
    f.acnt_dmn_id,
    f.txn_id,
    f.txn_src,
    f.acntng_entry_typ
    ORDER BY d.date_value)
    AS crnt_blnc,
    SUM (
    blnc)
    OVER (
    PARTITION BY f.hrarchy_dmn_id,
    f.prduct_dmn_id,
    f.crncy_dmn_id,
    f.acnt_dmn_id,
    f.txn_id,
    f.txn_src,
    f.acntng_entry_typ,
    d.fin_mnth_num
    || d.fin_year_strt
    || d.fin_year_end
    ORDER BY d.date_value)
    / d.mnth_to_dt
    AS mtd_avg,
    SUM (
    blnc)
    OVER (
    PARTITION BY f.hrarchy_dmn_id,
    f.prduct_dmn_id,
    f.crncy_dmn_id,
    f.acnt_dmn_id,
    f.txn_id,
    f.txn_src,
    f.acntng_entry_typ,
    d.fin_year_strt || d.fin_year_end
    ORDER BY d.date_value)
    / yr_to_dt
    AS ytd_avg,
    f.prvs_rcrd_ind AS prvs_rcrd_ind
    FROM cmbnd_rcrds f, thor_date_dmn d
    WHERE d.holidaY_ind = 0 AND f.val_dt_dmn_id = d.date_dmn_id)
    SELECT f.hrarchy_dmn_id,
    f.prduct_dmn_id,
    f.crncy_dmn_id,
    f.acnt_dmn_id,
    f.txn_id AS txn_id,
    f.txn_src AS acntng_entry_src,
    f.acntng_entry_typ AS acntng_entry_typ,
    f.val_dt_dmn_id,
    f.revsn_dt,
    f.crnt_blnc,
    f.mtd_avg,
    f.ytd_avg,
    'EOD TB ETL' AS crtd_by,
    SYSTIMESTAMP AS crtn_dt,
    NULL AS mdfd_by,
    NULL AS mdfctn_dt
    FROM fnl_set f
    WHERE f.prvs_rcrd_ind = 0
    ORDER BY f.hrarchy_dmn_id,
    f.prduct_dmn_id,
    f.crncy_dmn_id,
    f.acnt_dmn_id,
    f.txn_id,
    f.txn_src,
    f.acntng_entry_typ,
    f.val_dt_dmn_id
    Any other way to pivot this?
    Also I am getting a lot of foll wait events:
    PX Deq Credit :Send blkd
    PX Deq :Table Q Normal
    Direct Path Write Temp
    And Direct Path Read Temp.

  • Is there a better way to do this with Flash?

    I am new to Flash but am slowly teaching myself via Lynda.com etc
    I have an image that I have added to a website via a content management system and want to make certain areas of that image into links to other sites.
    I found this page that does the kind of thing I want to do, but it appears from looking at the source code that the person who has done this has cut the image up into several sections in order to fit it into a table: http://www3.imperial.ac.uk/staffdevelopment/postdocs1/guidance
    Is there a better way to achieve the same kind of effect using Flash by making ares of an image into links and keeping the image as a whole?

    There are ways to keep the image whole and have portions of it linking to different places both in HTML and in Flash.  In HTML you can use an image map.  In Flash, you can just lay invisible buttons atop the image and use those to link.

  • How to create a function with dynamic sql or any better way to achieve this?

            Hello,
            I have created below SQL query which works fine however when scalar function created ,it
            throws an error "Only functions and extended stored procedures can be executed from within a
            function.". In below code First cursor reads all client database names and second cursor
            reads client locations.
                      DECLARE @clientLocation nvarchar(100),@locationClientPath nvarchar(Max);
                      DECLARE @ItemID int;
                      SET @locationClientPath = char(0);
                      SET @ItemID = 67480;
       --building dynamic sql to replace database name at runtime
             DECLARE @strSQL nvarchar(Max);
             DECLARE @DatabaseName nvarchar(100);
             DECLARE @localClientPath nvarchar(MAX) ;
                      Declare databaselist_cursor Cursor for select [DBName] from [DataBase].[dbo].
                      [tblOrganization] 
                      OPEN databaselist_cursor
                      FETCH NEXT FROM databaselist_cursor INTO @DatabaseName
                      WHILE @@FETCH_STATUS = 0
                      BEGIN       
       PRINT 'Processing DATABASE: ' + @DatabaseName;
        SET @strSQL = 'DECLARE organizationlist_cursor CURSOR
        FOR SELECT '+ @DatabaseName +'.[dbo].[usGetLocationPathByRID]
                                   ([LocationRID]) 
        FROM '+ @DatabaseName +'.[dbo].[tblItemLocationDetailOrg] where
                                   ItemId = '+ cast(@ItemID as nvarchar(20))  ;
         EXEC sp_executesql @strSQL;
        -- Open the cursor
        OPEN organizationlist_cursor
        SET @localClientPath = '';
        -- go through each Location path and return the 
         FETCH NEXT FROM organizationlist_cursor into @clientLocation
         WHILE @@FETCH_STATUS = 0
          BEGIN
           SELECT @localClientPath =  @clientLocation; 
           SELECT @locationClientPath =
    @locationClientPath + @clientLocation + ','
           FETCH NEXT FROM organizationlist_cursor INTO
    @clientLocation
          END
           PRINT 'current databse client location'+  @localClientPath;
         -- Close the Cursor
         CLOSE organizationlist_cursor;
         DEALLOCATE organizationlist_cursor;
         FETCH NEXT FROM databaselist_cursor INTO @DatabaseName
                    END
                    CLOSE databaselist_cursor;
                    DEALLOCATE databaselist_cursor;
                    -- Trim the last comma from the string
                   SELECT @locationClientPath = SUBSTRING(@locationClientPath,1,LEN(@locationClientPath)-  1);
                     PRINT @locationClientPath;
            I would like to create above query in function so that return value would be used in 
            another query select statement and I am using SQL 2005.
            I would like to know if there is a way to make this work as a function or any better way
            to  achieve this?
            Thanks,

    This very simple: We cannot use dynamic SQL from used-defined functions written in T-SQL. This is because you are not permitted do anything in a UDF that could change the database state (as the UDF may be invoked as part of a query). Since you can
    do anything from dynamic SQL, including updates, it is obvious why dynamic SQL is not permitted as per the microsoft..
    In SQL 2005 and later, we could implement your function as a CLR function. Recall that all data access from the CLR is dynamic SQL. (here you are safe-guarded, so that if you perform an update operation from your function, you will get caught.) A word of warning
    though: data access from scalar UDFs can often give performance problems and its not recommended too..
    Raju Rasagounder Sr MSSQL DBA
          Hi Raju,
           Can you help me writing CLR for my above function? I am newbie to SQL CLR programming.
           Thanks in advance!
           Satya
              

  • Can some one tell me a better way...

    Hi All..
    I work on a web application. I create user ids for people logging into my application. here I have a small problem.. This is what I am currently doing...
    When I create a new user, I assign a new user id to the user and store all hi info.
    All our user ids are stored in User_ID table and user info in User_Info table.
    First I get the max user id from the User_Id table.
    int iuserid = select max(User_ID) from User_ID;
    Then I add ' 1 ' to this and assign it to new user.
    iuserid = iuserid+1;
    insert into User_id values(iuserid, <ssn> );
    Then I store all user info in User_info table..
    insert into User_info(iuserid, <first_name>, <last_name>,...);
    Both these SQLs are executed as a transaction.
    The problem that I have...
    It works fine in a normal environment and in my testing.
    But when the load inceases, before I insert into the User_info, another user tries to get the max User_id from User_ID table, then it conflicts..
    I have seen occurences of User_Info storing the info of a different user against the User_id when many people are accessing the app at the same time.
    Can some one tell me a better way to handle this scenario..
    Appreciate all you help..
    TIA..
    CK

    Hi,
    assuming that the requirement for user_id is only for uniqueness (primary key requirement) not continuosly.
    perhaps can try this,
    1) create a table to keep the max id for each table's key.
    e.g.
    create table key_id_lookup
    key_name char(n),
    current_value number(m)
    where n & m is the size of the field
    2) for each creation of entry in the user_id table, lookup the value in the key_id_table and increment it after retrieval.
    e.g. current_id = select current_value from key_id_lookup where key_name = 'user_id_key';
    current_id+=1;
    update key_id_lookup set current_value = current_id where key_name = 'user_id_key';
    something similar to use of sequence if your database support it.
    3) continue with the creation of record in other tables. now obtain the time stamp of creation and append with the current_id obtained. e.g. timestamp = 132456872; size of m is 5, user_id = 132456872 x 100000 + current_id;
    this should give you a unique key at creation time.
    There should be other better ways of resolving this(like locking the table for the update operation but affect performance, etc), depending on the feature supported by the database in use.
    Hope this can help as last resort if other options not available.

  • A better way to execute a series of external commands?

    Hi,
    Consider the code snippet...
    Process proc1 = rt.exec("Some external command");
    Vector vecOutput = outputGobbler.getOutput() ;
    String[] strAlterCmds = new String[vecOutput.size()];
    for ( int k = 0 ; k < vecOutput.size() ; k++ )
    strAlterCmds[k] = new String();
    strAlterCmds[k] = "cmd.exe /c blah.... " +(String) vecOutput.elementAt( k )+ " ;
    Process proc2 = rt.exec(strAlterCmds[k], null);
    StreamGobbler errorG = new
    StreamGobbler( proc2.getErrorStream(), "Error") ;
    StreamGobbler outputG = new
    StreamGobbler( proc2.getInputStream(), "Output") ;
    errorG.start() ;
    outputG.start() ;
    int exitVal1 = proc2.waitFor();
    The second part of the execution is taking AGES and I am not sure forking a new process for runtime execution is the best alternative here.
    I would be glad if someone can point me to a smarter solution.
    In short: I intend to execute a series of commands using RTE depending on the values I get in the loop.
    Thanks.

    Jared,
    Thank you for responding to my posted message. Rendezvous is a new concept to me, maybe
    it's the solution to my problem. I have been trying to read the on line manual and
    example VIs from National Instruments website. I still have a hard time to understand
    the concept.
    One of the example I saw is using rendezvous to run some sub VIs. But in my case, I have
    only one VI that is a while loop. Inside the while loop, there are a few tasks running
    simultaneously. I don't know whether it will serve my purpose.
    Guangde Wang
    Jared O'Mara wrote:
    > Guangde,
    >
    > Referring to your 2nd method, use rendezvous (under advanced>>synchronize
    > on function palette) to synchronize two processes. There are good examples
    > that come with labview. basically, you cre
    ate a rendezvous, giving it a
    > size. Using the wait on rendezvous vi, a function will not continue until
    > all rendezvous have reached that point. Using this method, you can synchronize
    > your 2 while loops.
    >
    > Jared
    >
    > Guangde Wang wrote:
    > >I tried two ways to control the tempo of my program.>>One is to use the
    > While Loop's counter and a wait. The drawback of this>method is the cycle
    > length is dependent on the measuring load. So if the>program runs for days,
    > it will be significent off the real time.>>The other way is to use the difference
    > of the Tick Count. It provides>accurate timing but the problem is the sychronization
    > of the clock cycle>and the While Loop cycle. I can try to put a little bit
    > wait but still>can not sychronize them very well. So after a while, there
    > will be two>measures get together.>>I don't know whether there are some better
    > ways to control the program>or whether we have some ways to improve either
    > or both of the above
    two>methods to make them work better. Please let me
    > know if you have any>suggestion.>>Thank you in advance,>>Guangde Wang>

  • A better way to wake up from sleep?

    When my mac pro goes to sleep, I cannot wake it up by clicking mouse, hit keyboard, etc. I have to push the machine's power on/off button to wake it up. I assume there is a better way. Thank you in advance.

    Also, try a SMC reset.
    The following will help you with the repair Hatter is telling you about;
    Try using Disk Utility to do a Disk Repair, as shown in this link, while booted up on your install disk.
    You could have some directory corruption. Let us know what errors Disk Utility reports and if DU was able to repair them.
     DALE

  • A better way to run a 7 day report?

    Using Crystal Reports 11
    I am hoping there is a better way of running a seven day report that i have to run weekly
    In the report i have it set when refreshing the document, the "Prompt for new parameter values" comes up and there is a date field for start and end
    This is how i did it
    I made a formula called "Date" this comes from the closed date of our accounts
    I made a Parameter Field "Start Date" with the TYPE field is "Date"
    I made a Parameter Field "End Date" with the TYPE field is "Date"
    I made a Select Expert Using data from the "ClosedDate" in the first drop down I picked "Formula" and used this as the formula
    {WH_ACCTCOMMON.CLOSEDATE} in {?Start Date} to {?End Date}
    Two things
    1. Is there a way to have "Prompt for new parameters values" as the default checked off box when clicking "Refresh"?
    2. Is there a way to only enter a start date and the refresh would just run 7 days without entering a end date?

    Hi,
    Here's a suggestion for question 1:
    When you preview the report for 1st time there is no prompt window that asks you to select whether you wish to 'Use current values' or 'Prompt for new values'.
    If the Preview window is open and you hit refresh again, this is when you get the pop-up with the above options. If you close the Preview window and refresh again, you would not get a pop-up and it will show the Prompt window instead.
    For question 1, you can follow Alun's sugestions.
    -Abhilash

Maybe you are looking for