Linking .udl file to .mdb or .accdb in programming

I`m working on the database toolkits. I can manually create an .udl file andlink to .mdb or .accdb file. Can this be done through programmatically from LabVIEW?

gnshmrthy wrote:
Hi Ranjeet, 
I`m not using two different extension files i`m using either .mdl or .accdb file for an single .udl file.
Let me be more clear here I`m linking an test.udl file with the test.accdb. I can manually link the file by selecting the OLED function and specifying the path but I need to do this in program so every time when I run the program I can retrive those data if I have entered already.
The UDL is a text file, which you'll see if you open it in Notepad.
However, as suggested, it's alot easier to use 2 UDLs and choose/select between them.
/Y
LabVIEW 8.2 - 2014
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
G# - Free award winning reference based OOP for LV

Similar Messages

  • Creating and Editing .udl files in 64-bit Windows

    I have not done any database work since 64-bit Windows was released. Things have changed and I lost a few hours trying to troubleshoot database connectivity. If someone else runs into the same issues, hopefully this post will save them some time.
    In trying to to examine the LabVIEW example database and UDL file:
    C:\Program Files (x86)\National Instruments\LabVIEW 2010\examples\database\LabVIEW.mdb
    and
    C:\Program Files (x86)\National Instruments\LabVIEW 2010\examples\database\LabVIEW.udl
    I copied them to a new location and found out that simply double-clicking on the UDL to view how it is configured results in an error: "Provider cannot be found. Ensure that the provider has been installed properly." This should normally bring up a UDL properties dialog/utility.
    The reason for this error is that 32-bit and 64-bit OLE DB providers are carried separately in 64-bit Windows installation (even if you are using 32 bit LabVIEW).
    To view and test the UDL's configuration using the windows tool, you'll need to open up a command box, and paste this text to run the 32-bit version of the ODBC Data Source Administrator:
    C:\Windows\syswow64\rundll32.exe "C:\Program Files (x86)\Common Files\System\Ole DB\oledb32.dll",OpenDSLFile C:\Program Files (x86)\National Instruments\LabVIEW 2010\examples\database\LabVIEW.udl
    Change the path to your own UDL file. It is advised NOT to modify the original LabVIEW example UDL. Just exit the properties dialog without making changes if you open up the utility on the LabVIEW original.
    This trick can be helpful if you want to use a copy of the example LabVIEW database in your own application for testing or troubleshooting. Simply copy the database and the .udl file to a new location (rename both if desired), then edit the .udl copy as necessary (modify the paste-text above as needed for the new file's location).
    This will also allow you to connect the new UDL to a different 32-bit OLE provider using the UDL "Data Link Properties" utility provided within the Windoze O/S.
    This trick may also be necessary if you have installed OLE providers in 32-bit mode you wish to use and cannot find the providers using the normal 64-bit ODBC Data Source Administrator that is launched by default.
    References:
    Create a New UDL File (MSDN)
    Edit a 32-bit UDL (MSDN)
    Windows KB Article on 32/64 bit ODBC

    I seem to have fixed the issue...
    I used C:\Windows\SysWOW64\odbcad32.exe to create a file DSN, then created a new database with that DSN. I then imported the data from my other database and that seems to work correctly.
    Hope this helps someone else.

  • Creating UDL file for use of HFMCopyApplication utility

    I'm trying to create the UDL file on the HFM server to link to the SQL database where HFM sits.
    I followed the instructions and created a new text document, rename it as extension .udl. According to the instruction, I'm supposed to double click on this new file and an data link property window will appear. But all I see is still a blank text document.
    Am I missing something? In the past I always asked our application support guys to do that but now I have to figure it out myself....
    Thanks!

    Hi,
    The reason to rename the file to .UDL is that the UDL extension should be mapped to an application that will let you make a database connection.
    You either have one of two problems if double clicking on the UDL file opened in Notepad:
    #1 - At some point .UDL file extensions were mapped to point to Notepad (or whatever text editor the file opened in) [I'm doubtful this is the problem]
    #2 - In Windows Explorer you do not have file extensions visible; therefore, when you renamed your file, it didn't rename it the way you wanted it to. For instance instead of renaming database.txt to database.udl, you ended up with database.udl.txt This file would still open in Notepad as .TXT is associated with Notepad (or other text editor).
    IF #2 is the problem, do the following:
    #1 - Open a File Explorer window and navigate to the folder with the UDL file.
    #2 - Click on Tools
    #3 - Folder Options
    #4 - Click on View
    #5 - Make sure 'Hide extensions for known file types' is unchecked.
    #6 - Hit OK
    #7 - Refresh the File explorer window and note the filename.
    #8 - If the filename is something like .UDL.txt, rename it to remove te .txt.
    If #1 is the issue: (Note : I'm giving you windows 7 version which may be different than XP, but it should still be in the control panel somewhere)
    #1 - Open Control Panel
    #2 - Open Default Programs
    #3 - Open Set Associations
    (NOTE: Instead of steps 1-3 click Start and type in associations and one of the results will be to set file associations)
    #4 - Locate the .UDL file extension and confirm it is set as Microsoft Data Link, OLE DB Core Services
    ---IF NOT set to OLE DB Core Services --
    #5 - Click on Change Program
    #6 - Select OLE DB Core Services from Recommended Programs List

  • CallManager 4.2 ... UDL file

    Hi,
    Does anyone know how to "force" CallManager to create a UDL file? or where this file lives?
    I have done a file search on the CallManager server and can't find it anywhere.
    Thank you

    You mean Microsoft Data Link file (*.udl)
    Check out this:
    http://www.drdev.net/article10.htm

  • How to link pdf file in flash by xml ??

    how to link pdf file in flash by xml ??

    try to give <a href="your address">My Pdf</a>
    and your textfield should be html enabled
    mytextField.html=true
    mytextField.htmlText=your xml text

  • How to link Excel file to Access

    Hello,
    I created a barcode database using excel and labview. Now i want this data to be in access as a database and continuosly update it.
    I have a doubt also as i have created excel sheet of various product barcode and there is always a new sheet that is saved when ever working( this is a requirement)  so how can i link all the file and creat one access database.
    Thanks in advance, Need urgent help
    Regards
    Naman Vaidya

    sorry for the confusion. 
    i want labview to link my excel and acess, so that a database is created.
    second thing is i am having verious barcode data like for eg. for product X i have a particular barcode and for product Y another so my software create a new excel file whenever we change a product or a particular quantity of any product is filled. Now the question is if everytime i creat a new excel how do i creat a single database by linking all files using labview.
    Thanks for the reply.

  • Shockwave won't play linked Director files from server

    I created a bunch of director files for the course content of my  class. All can be accessed from a contents file. When I created an html  contents file on my desktop (in the same folder as the linked director  files), the contents pages would open in shockwave in my browser (both  Firefox and Safari) and then by clicking on a link other director files  would open and play. However, when all these files were place on our  server (in the same folder), only the contents pages would open and we  get an error message saying the dirctor files cannot be opened. I think  this means it sees them, but can't open them.
    Help!

    Hi Sean
       sorry if my e-mail was a bit whiney, but I got a bit frustrated, 
    having tried to use the Adobe website for help and then trying for 
    help over the phone. Adobe has this nice thing where they will call 
    you back instead of you sitting on hold, which I used at first, but 
    you get called back by a machine, not a person, then you subsequently 
    get a progression of robocalls with nobody on the other end! I 
    finally just sat and waited and got a person, who seemed 
    knowledgeable and nice, but couldn't help me without a payment. So, I 
    would greatly appreciate any help you could provide!
           What I have is this. I constructed a "book" in CD form for my 
    class. This is based on CDs that Mike Coleman and I published a few 
    years ago. A picture of the contents page is shown below. Each topic 
    is in a separate Director file, each with its own casts. We made a 
    lot of animations, some in Flash and some in Quicktime that appear in 
    each topic. I redid everything in Director 11.5, changing text 
    spacing because of the way things get altered when things get played 
    in Shockwave! When I click on one of these subtopics, the 
    corresponding Director file opens. I accomplished linkage this by 
    appending a behavior to the text, "Play Movie X". I then originally 
    made a projector file of the contents page and distributed the CD to 
    my class free (textbook prices are getting out of hand). Now I want 
    to put it on the web, because I'm tired of burning CDs and we're 
    getting students from other locations taking the course on-line. So 
    within the folder on my desktop that held all the Director files, I 
    made a second folder "dswMedia" into which I placed all the 
    animations. I also linked all the animation casts to the Contents 
    Director file. I then constructed a Contents.html file and 
    Contents.dcr file using the Publish commands in Director. When I 
    click on the Contents.html file within my main folder (the one 
    holding all the Director files and the dswMedia file) the page opens 
    nicely in my browser (Firefox) and I can play all the Director movies 
    by clicking on each topic. All the animations play beautifully. 
    Great , I thought, I'm in business. I then took the files to our 
    media guy who put it on the server, in the same form as on my 
    desktop. If we click on the Contents.html file through the web it 
    opens. Clicking on a topic does not open that Director Movie. The 
    error message is not that it can't find the movie, however, but that 
    it can't open it. Everything works just fine on our media guys 
    computer,  we only have a problem when we attempt to use this stuff 
    through the web. (Our web guy's computer does not have Director, so 
    that's not the issue).
          Any guidance would be greatly appreciated!
             Regards
                    Paul

  • I am trying to organize a zip file with a bunch of links and files. But when I drag an image file to a folder, it always "Snaps to grid" instead of just landing where I put it.

    I am trying to organize a zip file with a bunch of links and files. But when I drag an image file to a folder, it always "Snaps to grid" instead of just landing where I put it. All of the files are going into the same zip file but I want them visually in the space that I put them and not at the bottom of the snap to grid folder location they are looking like.  I am trying to  drag and drop files in groups so that I can group them for now, but image files always do their own "sort by" when I drag them from my web pages. Links don't do it though.  I tried resetting the folder, and deleting the DS files. No luck.

    You keep asking variants on this same question. You've had replies in all your other threads. If you can't find them, go here and click where it says Activity:
    Thomas Cannon Jr.

  • How can I send multiple pictures to the Kodak link (under file & then order prints)? if the photos are not sequential can it be done?

    how can I send multiple pictures to the Kodak link (under file & then order prints)?  if the photos are not sequential can it be done?

    Does the order matter here?Because the photos will be sent for printing. If there is any other reason, can you please cite example.

  • CS3:How to link a file to a InDesign document?

    Hello all,<br /><br />I looked at in the LinkWatcher sample code to get an idea how to link a file to a document, I came up with the code below, the last line of code needs pageitemUID instead of pageUID which I  used it here:<br /><br />IDFile outFile = Utils<ImyUtils>()->getMyFile(); // it reads the file <br />InterfacePtr<IDataLinkHelper> dataLinkHelper(::CreateObject2<IDataLinkHelper>(kDataLinkHelperBoss)); <br />InterfacePtr<IDataLink>      dataLinkNew(dataLinkHelper->CreateDataLink(outFile)); <br /><br />IDocument* theFrontDoc = Utils<ILayoutUIUtils>()->GetFrontDocument();<br />IDataBase* database = ::GetDataBase(theFrontDoc); <br /><br />InterfacePtr<IDocument> piDoc(theFrontDoc, UseDefaultIID()); <br /><br />InterfacePtr<IPageList> pageList(piDoc, UseDefaultIID()); <br />     <br />UID pageUID(kInvalidUID);<br /><br />if (pageList->GetPageCount() >  0)<br /> {<br />     pageUID = pageList->GetNthPageUID(0);<br />}<br />// I try to link the file to the front document, although it say pageitemUID, as a second //parameter, but I don't want to link the file to a particular page item. is this a right thing to do?<br /><br />int32 result = dataLinkHelper->AddDataLink(database,pageUID, dataLinkNew); <br /><br />as I execute the code it doesn't add the file in  Link palette in CS3, but when I pass a UID of one page item such as text frame, it will add the name of file to link palette with a "1" comes to  end of row that shows how many times this file was included in the frame. but in case I have not a page item can I use the pageUID instead ?<br /><br />Thanks In Advance,<br />Mor

    Lee,
    Sorry I think I didn't use the right terminology, somehow I want to include/link the file (not with menu item 'place') programmatically in my current open Indesign document, then I expect to see the filename in Link palette. I can do this with linking to a page item in doc but I don't want to assign it to a particular page item, rather I want to assign it to doc. Is any approach to do it?
    Thanks again,
    Mor

  • Need to link 2 files, one with a numeric firld and on with an alpha numeric

    I need to link 2 files in my report by employee number. In the employee file it is an 8 character Numeric field like 1505087. In the GL File, it is an 8 character field like '01505087' I have done a TONUMBER on the employee number.  Where do I link these files? I have done it in my data selection, but it now takes hours to run the report. The report does work. Any suggestions for linking the files together?
    Thanks,
    Rick

    Hi Rick,
    Linking numeric and non numeric fields at report level takes long time because for each detail it has to process i.e convert your non numeric field to numeric and then link.
    To avoice this, try to use Add command for your non numerica table and convert the field to numeric in free hand SQL itself.
    Eg: Select fields..convert(non numeric to numeric) from table   // my convert syntex is not correct becasue i don't know what database you are using
    Now you get both tables with numeric fields and you can link both.  It will not take much time to retive records.
    Thanks,
    Sastry

  • Illustrator CS2 adds mysterious white dashed line thru my linked Photoshop file

    Im using Windows XP, Illustrator & Photoshop CS2, Acrobat 7.0 Professional.
    I have an illustrator file with a linked PSD file that has this mysterious thin white dashed line going through the entire image & I have no idea what it's from or how to repair it.
    My trouble shooting thus far includes:
    - In illustrator - I hide all the layers to see if there was an odd graphic on another layer that was causing the line, nothing. I tried to select the dashed line, not possible. I've created a PDF of the file, and the dashed line is in the PDF too (to verify it wasn't just Illustrator). Oddly in both Acrobat & Illustrator when I zoom in & zoom out, the dashes maintain their on-screen viewing proportions (like the dash spaces recalculate to the same tiny thin dashed line no matter what zoom Im at)
    - In Photoshop - I zoomed in until I couldn't zoom no more and there is not the slightest dashed line in the graphic.
    Lastly, I have this exact linked setup repeated throughout several different files (basically its the same ad but laid out to different dimensions for each)... and none of the others have this mysterious white dashed line.
    here's a screen capture from Acrobat... zoomed into 6400%
    argh - can someone help? Thanks!
    kristin

    Hi guys (and sorry for the tremendous delayed response).
    No the line doesn't print on my local b/w laser printer. However I have seen the lines print in 1 newspaper publications... (this is out of 50 different publications)
    Yes, the image is rotated slightly in illustrator, and I always flatten prior to making the PDF (cuz of the transparency/drop shadow).
    It's really making me nervous that ALL our ads have these lines appearing during onscreen viewing... Im making a new batch of ads for our campaign & there are more lines than before!
    Any tips theories remedies my friends?

  • Acrobat X 10.02 crashes when converting Word 2007 document wiht linked Visio file.

    Acrobat X 10.02 crashes when converting Word 2007 document with linked Visio file and causes a C++ runtime error in Word and crashes Word.
    To see the behavior create a short Word 2007 document with a linked Visio file (e.g., create a Visio file with one box and text and insert it as a link into a Word docx).
    No problem in Acrobat 9

    There may be some of an issue with AA X on this, but part of the blame probably goes to MS also. I would suggest you simply clip the graphic from VISIO as a vector graphic (EMF will be used by default) and not do the link and do not embed the VISIO object. The linking and use of embedded objects in WORD 2007 seems to have been a major problem and is mostly a MS issue.

  • Why do I have to remove Adobe Acrobat in order to link pdf files using Preview?

    Whenever I try to link pdfs to make a single file, Adobe Acrobat opens automatically and prevents me from linking them, instead demanding that I pay money for a subscription. Instead, I have to remove Adobe, at which point I can open Preview, and then I can link the files.
    Is there any way to link documents without having to remove and then reinstall Adobe?
    I have an iMac 10.6.8 and the latest Adobe that will install.

  • Font colors missing from linked ai files (cs4)

    so i have an indesign document with a bunch linked AI files all of which have the same fonts in the same colors (white and light yellow) over the same color backgrounds.
    earlier this week i printed without a problem. since then i've added a few notes here and there and i printed again and now most of the white text doens't show up on the print, some shows up barely, and some looks embossed into the background color. the yellow text printed purple. if i outline the text it prints fine.
    the text that weent wrong, i didn't change from before when it printed fine. my coworker had also printed a copy from a pdf i made from indesign with the same results.
    can anyone help?
    this is on indesign cs4 with linked ai cs4 files on mac os x lion.

    If the yellow text printed purple then perhaps the yellow text has been set to overprint.
    Similarly - it seems like the text for the white has been set to overprint.

Maybe you are looking for