How to write UDL file in Labview for Database connection
Hi
I am using SQL Server database. I am making connection with SQL by using UDL file. If I create Normal UDL file in windows and make connection it happens. I want to change or add some parameter Like database name. If I am changing this value by using labview, the file gets corrupted, and not able to make connection with SQL.
I want to create database by program. User should not create the database.
Kindly suggest me the proper solution.
Regards
Prabhakant Patil
[email protected]
Regards
Prabhakant Patil
It may look like a text file, but it's not a text file that uses plain-old ASCII. If you open it in Notepad you won't see anything obvious. You actually have to open the UDL file with a hex editor, and you will see the differences. Specifically:
The file starts with the header FF FE. This indicates Unicode. LabVIEW does not support Unicode.
Each characters is actually 2 bytes. Thus, the first character you see in Notepad is "[" (for the section start). In hex this is 05 for plain-old ASCII, but 05 00 for Unicode (which is what's actually in the file).
Thus, if you absolutely must write out the file using LabVIEW you will need to write it out in binary mode, inserting the 0x00 bytes, and the FF FE at the start.
Message Edited by smercurio_fc on 03-24-2010 09:39 AM
Similar Messages
-
Hello
I am doing my project in LabVIEW that is VIRTUAL TELEPHONE COMMUNICATION SYSTEM
AND APPLICATION OF LABVIEW IN ADVANCE COMMUNICATION TECHNIQUES.I have implemented every block till date but for the rest part of my project that is advance communication techniques i need vi for QPSK,TDM,FDM,ASK and I just wanted to know how to load .wav file in LabVIEW
Please assist me for this
Attachments:
Telephone communication process.docx 25 KBHi Dilpreet,
reading wav files is easy using the functions from the sounds palette...
For your other tasks you could use a seperate toolkit or do some programming on your own!
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
How to write a file using mod pl/sql
hi,
i am having a submit button in my procedure. which should inturn create .sql file in a file path.
is there any way to create a fileusing htp and htf methods.
Thanks in advance
Hari>
i am having a submit button in my procedure. which should in turn create .sql file in a file path.
is there any way to create a file using htp and htf methods.
>
Why are you wasting your time coding from scratch using the PL/SQL Web Toolkit instead of the APEX framework?
From Re: how to write a file using mod pl/sql it appears that you are not using APEX, so a number of the approaches APEX offers are not relevant. You appear to be looking for a file download solution using the <tt>wpg_docload.download_file</tt> method, such as:
create or replace procedure download_file (
p_filename in varchar2
, p_mimetype in varchar2
, p_content in out nocopy blob)
is
begin
-- Set up HTTP header.
-- Use "application/octet" as default MIME type.
owa_util.mime_header(nvl(p_mimetype, 'application/octet'), false);
-- Set the size so the browser knows how much to download.
htp.p('Content-length: ' || dbms_lob.getlength(p_content));
-- Filename will be used as default by the browser in "Save as..."
htp.p('Content-Disposition: attachment; filename="' || p_filename || '"');
-- Close header.
owa_util.http_header_close();
-- Stream the file content to the browser.
wpg_docload.download_file(p_content);
end download_file; -
How to write text file in Shockwave?
Does anybody know how to write text file in Shockwave to
user's disk?
Thanks in advance.Those Xtras can wreak to much havoc when used with the wrong
intent.
What you can do is write with setpref and store a list of
saves and the
saves itself seperatly. Then you'd have to build your own
save/open
dialog to let the user:
* pick a previously saved file to load or overwrite
* have the user type the name of a new file to save.
Only thing that remains is that the user cannot decide where
the files
are saved.
Manno
SiuLinda wrote:
> Thanks a lot for your reply.
> Yes, cookies is good but I have to write a program to
save the text file in
> where the user wants, user can open these files later if
they like, like using
> Filextra and Fileio, but I found all of these xtras seem
to be not supported in
> shockwave.
>
Manno Bult
[email protected] -
How to open dat file in labview
how to open dat file in labview.???how to make use of biomedical startup kit for doing so???
Please post this question on the Biomedical User Group here: www.ni.com/biomedusers
This is where you will find the best support for the Biomedical Starter Kit.
Steve
Visit the NI Biomedical User Group at:
www.ni.com/biomedusers -
How to write certain file On jCD through Java
hi all,
I got big problem in java , would anybody tell me how to write certain file onto CD through java. Is there any API available for this.
Thanks in advance
--HarishYou might check this thread.
http://forum.java.sun.com/thread.jspa?threadID=212748&tstart=90 -
How to create backup file on itunes for ipod touch 4g game apps data? Is there a way to do it? I want to try an app on my friend's computer, but you can't add apps on another computer without having your own ipod's data being deleted. Thx for any help!
I want to know how to create a backup file (because I'm pretty new with itunes, and it's hard to use it for me still), how to store my app data/media/videos, etc. And how I can retrieve them back when I'm done with the app I tried on my friend's computer.
If anyone can help, it'd be great! Thank you so much!Sure-glad to help you. You will not lose any data by changing synching to MacBook Pro from imac. You have set up Time Machine, right? that's how you'd do your backup, so I was told, and how I do my backup on my mac. You should be able to set a password for it. Save it. Your stuff should be saved there. So if you want to make your MacBook Pro your primary computer, I suppose, back up your stuff with Time machine, turn off Time machine on the iMac, turn it on on the new MacBook Pro, select the hard drive in your Time Capsule, enter your password, and do a backup from there. It might work, and it might take a while, but it should go. As for clogging the hard drive, I can't say. Depends how much stuff you have, and the hard drive's capacity. As for moving syncing from your iMac to your macbook pro, should be the same. Your phone uses iTunes to sync and so that data should be in the cloud. You can move your iTunes Library to your new Macbook pro
you should be able to sync your phone on your new MacBook Pro. Don't know if you can move the older backups yet-maybe try someone else, anyways,
This handy article from Apple explains how
How to move your iTunes library to a new computer - Apple Support''
don't forget to de-authorize your iMac if you don't want to play purchased stuff there
and re-authorize your new macBook Pro
time machine is an application, and should be found in the Applications folder. it is built in to OS X, so there is nothing else to buy. double click on it, get it going, choose the Hard drive in your Time capsule/Airport as your backup Time Machine and go for it. You should see a circle with an arrow on the top right hand of your screen (the Desktop), next to the bluetooth icon, and just after the wifi and eject key (looks sorta like a clock face). This will do automatic backups of your stuff. -
How to write WSDD file to deploy web service
I write a server code,I want to deploy it as service,but I don't know how to write WSDD file?I use AXIS and SOAP
I need help,thanks a lot.
Regards
William
2.24Yes, put your wsdd with your class files. But if you want AdminClient to work correctly, be sure all environement variables are set correctly.
Me, I never use it, I prefer to modify directly the server-config.wsdd -
How to keep XML file in memory for specified period ?
How to keep XML file in memory for specified period or forever, I have 5 applications running on WebSphere I wants to use XML file for all the applications. I mean when one apllication is not using XML file still I wants to keep it in memory ...
Thanx in advance ,Hello,you can create a DocumentManager class,
here is my solution in the past...
you can use static Hashtable save the xml's Document,if one application want get
a appointed Document.first,you can find it from Hashtable,if can't find it ,you
can create it and put into Hashtable,if the words fail to express the meaning,sorry,my english is limited
package com.foresee.xfiles.util;
import java.util.*;
import org.w3c.dom.*;
import org.apache.log4j.*;
import com.foresee.xfiles.common.*;
import com.foresee.xfiles.server.exception.*;
import com.foresee.xfiles.util.*;
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2002</p>
* <p>Company: </p>
* @author unascribed
* @version 1.0
public final class DocumentManager {
private static Category m_log = Category.getInstance(DocumentManager.class.getName());
static {
PropertyConfigurator.configure(Configurator.getLCF());
public DocumentManager() {
//synchronized
public static synchronized Document getTransitionDoc(String path) throws SchemaCheckOutException{
Document m_TransitionDoc;
m_TransitionDoc = (Document)TransitionDoc.get(path);
if (m_TransitionDoc == null){
XmlHelper m_xh = new XmlHelper();
try{
m_TransitionDoc = m_xh.getDocument(path);
}catch (SchemaCheckOutException se){
m_log.error("������������������������"+path+"����:"+se.getUserMsg());
throw se;
TransitionDoc.put(path,m_TransitionDoc);
return m_TransitionDoc ;
public static synchronized Document getLogicCheckDoc(String path) throws SchemaCheckOutException{
Document m_LogicCheckDoc;
m_LogicCheckDoc = (Document)LogicCheckDoc.get(path);
if (m_LogicCheckDoc == null){
XmlHelper m_xh = new XmlHelper();
try{
m_LogicCheckDoc = m_xh.getDocument(path);
}catch (SchemaCheckOutException se){
m_log.error("������������������������"+path+"����:"+se.getUserMsg());
throw se;
LogicCheckDoc.put(path,m_LogicCheckDoc);
return m_LogicCheckDoc ;
public static Hashtable TransitionDoc = new Hashtable();
public static Hashtable LogicCheckDoc = new Hashtable(); -
How to recover dbf file in dbf VFP database?
How to recover dbf file in dbf VFP database?
The platform writes that can't open dhXXXX.dbf.
What to do? Whether there are utilities where it is possible to bring into accord heading of the dbf-file and directly its contents manually? Where there is a good description of the structure .dbf?1 Delete the indexes.
2. To determine to which document (its cap) belongs to this file.
3. Try to look for this file in the archives
4. DBF Viewer Tool will help view and edit the contents .dbf file.
http://www.dbf.viewertool.com/
5. At a forum you can look at information on your problem
http://www.filerepairforum.com/forum/databases/databases-aa/dbase-iv-clipper-foxpro/1355-help-to-repair-dbf-file -
How to load text file data to Oracle Database table?
By using Oracle Forms, how to load text file data to Oracle Database table?
Metalink note 33247.1 explains how to use text_io as suggested by Robin to read the file into a Multi-Row block. However, that article was written for forms 4.5 and uses CREATE_RECORD in a loop. There was another article, 91513.1 describing the more elegant method of 'querying' the file into the block by transactional triggers. Unfortunately this more recent article has disappeared without trace and Oracle deny its existence. I know it existed as I have a printed copy in front of me, and very useful it is too.
-
How to write code to insert record in database programtically in Jdev rel
Hi Experts,
Please tell me how to write code to insert record in database programtically in Jdev rel .2.
Thanks
Shiv NareshTo insert the record programmatically i will provide you some sample below
ViewObject vo = this.getVoXXXX();
Row vor = vo.getCurrentRow(); // get the current row of the record
ViewObject vo1 = this.getvoYYYY();
Row vor1 = vo1.createNewRow(); //creating new row in the table
vor1.setAttribute("aaaaa",vor.getAttribute("ttttt")) // In this we are getting the current row value of "ttttt" and inserting into "aaaaa"Hope this could help you! -
Could not load library for database connection LCA
Hi,
I am facing RFC connection prblem while connectiong to database. I have installed SCM5.1 and live cache in single server
Please find the logs.
Work process log:
B Mon Jul 20 11:19:13 2009
B create_con (con_name=LCA)
B Loading DB library 'E:\usr\sap\SC7\DVEBMGS03\exe\dbsdbslib.dll' ...
M *** ERROR => DlLoadLib: LoadLibrary(E:\usr\sap\SC7\DVEBMGS03\exe\dbsdbslib.dll) Error 126 [dlnt.c 241]
M Error 126 = "The specified module could not be found."
B *** ERROR => Couldn't load library 'E:\usr\sap\SC7\DVEBMGS03\exe\dbsdbslib.dll'
[dbcon.c 4731]
B ***LOG BYG=> could not load library for database connection LCA [dbds#1 @ 1035] [dbds 1035 ]
A
A Mon Jul 20 11:21:58 2009
A GENER starting remote generation: /SAPAPO/OM_SYNC_LC_DB (requested by W1).
B
SM21:
No shared library found for the database with ID LCA|
No shared library found for the database with ID LCA
/SAPAPO/OM17|/SAPAPO/OM_SYNC_LC_DB|K |SAP Web AS Problem|SBAC |
Documentation for system log message BY G :
As well as the standard connection, an attempt was made to set up
another database connection, under the specified ID. The Shared Library
for this second database could not be found.
The Shared Library is usually found in the the Executable
directory (profile parameter DIR_LIBRARY) under the name dbs
<dbs>slib<os_ext>. <dbs> stands for the database type and <os_ext>
stands for the operating system-specific extension of the Shared
Libraries.
The database type is determined from the entry that corresponds to the
specified DB ID in the table DBDCON. Check whether the data in this
entry is correct.
ST22
Runtime Errors DBIF_DSQL2_CONNECTERR
Exception CX_SY_NATIVE_SQL_ERROR
Date and Time 20.07.2009 11:22:21
Short text
Error setting up a secondary database connection
What happened?
Connection to database system not possible with identifier "LCA".
|----
System environment
SAP-Release 700
Application server... "
Network address...... "
Operating system..... "Windows NT"
Release.............. "5.2"
Hardware type........ "8x AMD64 Level"
Character length.... 16 Bits
Pointer length....... 64 Bits
Work process number.. 8
Shortdump setting.... "full"
Database server... "
Database type..... "ORACLE"
Database name..... "SC7"
Database user ID.. "SAPSC7"
Terminal................. " "
Char.set.... "C"
SAP kernel....... 701
created (date)... "Jul 6 2009 23:47:55"
create on........ "NT 5.2 3790 Service Pack 1 x86 MS VC++ 14.00"
Database version. "OCI_10201_SHARE (10.2.0.2.0) "
Patch level. 50
Patch text.. " "
Database............. "ORACLE 9.2.0.., ORACLE 10.1.0.., ORACLE 10.2.0.."
SAP database version. 701
Operating system..... "Windows NT 5.0, Windows NT 5.1, Windows NT 5.2, Windows
NT 6.0"
Information on where terminated
Termination occurred in the ABAP program "SAPLSLCAPPS" - in
"LCA_EXISTS_LCA_ROUTINE".
The main program was "/SAPAPO/TS_BATCH_RUN ".
In the source code you have the termination point in line 23
of the (Include) program "LSLCAPPSU05".
The program "SAPLSLCAPPS" was started as a background job.
Job Name....... "MACROS"
Job Initiator.. "SC7GEN"
Job Number..... 10222002
The termination is caused because exception "CX_SY_NATIVE_SQL_ERROR" occurred
in
procedure "LCA_EXISTS_LCA_ROUTINE" "(FUNCTION)", but it was neither handled
locally nor declared
in the RAISING clause of its signature.
The procedure is in program "SAPLSLCAPPS "; its source code begins in line
1 of the (Include program "LSLCAPPSU05 ".
Please help me to resolve the issue.
SurajHi Natalia Khlopina,
I have raised OSS message to SAP.
Below is the information
E:\usr\sap\SC7\SYS\exe\uc\Copy_ of_NTAMD64_15062009>sdbregview -l
Server Utilities e:/sapdb/programs 7.7.02.08 64 bit valid
DB Analyzer e:/sapdb/programs 7.7.02.08 64 bit valid
PCR 7301 e:/sapdb/programs 7.3.01.21 valid
PCR 7500 e:/sapdb/programs 7.5.00.42 64 bit valid
SAP Utilities e:/sapdb/programs 7.7.02.08 64 bit valid
APO LC APPS f:/sapdb/lcs/db/sap 6.00.004 64 bit valid
Redist Python e:/sapdb/programs 7.7.02.08 64 bit valid
Base e:/sapdb/programs 7.7.02.08 64 bit valid
JDBC e:/sapdb/programs 7.6.03.02 valid
Messages e:/sapdb/programs MSG 0.5010 valid
ODBC e:/sapdb/programs 7.7.02.08 64 bit valid
SQLDBC 77 e:/sapdb/programs 7.7.02.08 64 bit valid
Database Kernel f:/sapdb/lcs/db 7.7.02.08 64 bit valid
Loader e:/sapdb/programs 7.7.02.08 64 bit valid
SQLDBC e:/sapdb/programs 7.7.02.08 64 bit valid
SQLDBC 76 e:/sapdb/programs 7.6.01.15 64 bit valid
Fastload API e:/sapdb/programs 7.7.02.08 64 bit valid
C:\Documents and Settings\sc7adm>disp+work
disp+work information
kernel release 701
kernel make variant 701_REL
compiled on NT 5.2 3790 Service Pack 1 x86 MS VC++ 14.00
compiled for 64 BIT
compilation mode UNICODE
compile time Jul 6 2009 23:47:55
update level 0
patch number 50
source id 0.050
supported environment
database (SAP, table SVERS) 700
701
operating system
Windows NT 5.0
Windows NT 5.1
Windows NT 5.2
Windows NT 6.0
Thanks for quick responce.
Suraj -
How to use UDL file in Powershell script?
Hello Scripting Guys,
I have a VBScript that works great for connecting to an Oracle DB using a .UDL file. Here is the important part of the script:
Set dataconnect = CreateObject("ADODB.Connection")
Path= "File name=C:\UDLs\TEST.udl"
dataconnect.ConnectionString = Path
dataconnect.open
Set oCmd = CreateObject("ADODB.Command")
oCmd.ActiveConnection = dataconnect
oCmd.CommandText = "SYSTEM.JOB.INSERT_JOB"
oCmd.CommandType = 4
set oParam = oCmd.CreateParameter("job_name_val")
oParam.type = 200
oParam.direction = 1
oParam.size = 255
oParam.value = job_name
oCmd.Parameters.Append oParam
set oParam = oCmd.CreateParameter("description")
oParam.type = 200
oParam.direction = 1
oParam.size = 4000
oParam.value = descrip
oCmd.Parameters.Append oParam
set oParam = oCmd.CreateParameter("status_val")
oParam.type = 200
oParam.direction = 1
oParam.size = 50
oParam.value = status
oCmd.Parameters.Append oParam
oCmd.Execute
As you can see, it creates "ADODB.Connection" and "ADODB.Command" objects. Everything works as intended here.
Now, I'm trying to convert this VBScript to a Powershell script.
Here's what I have so far with my PowerShell Script (non-working, but no errors):
$job_name = $args[0]
$status = $args[1]
$descrip = $args[2]
write-host "Job Name = " $job_name
write-host "Status = " $status
write-host "Description = " $descrip
#Create an object of type: ADODB class: Connection
$objConn = New-Object -com "ADODB.Connection"
#Create Connection String
$connString = "File name=C:\UDLs\TEST.udl"
#Open the connection
$objConn.open($connString)
#Command Object
$oCmd = New-Object -com "ADODB.Command"
#Assign DB connection To Command
$oCmd.ActiveConnection = $objConn
#Set Command text
$oCmd.CommandText = "SYSTEM.JOB.INSERT_JOB"
#Set Command Type
$oCmd.CommandType = 4
#Create parameter list For Command
#Job name Parameter
$oParam1 = $oCmd.CreateParameter("job_name_val")
$oParam1.type = 200
$oParam1.direction = 1
$oParam1.size = 255
$oParam1.value = $job_name
#Append parameter list
$oCmd.Parameters.Append($oParam1)
#Description Parameter
$oParam2 = $oCmd.CreateParameter("description")
$oParam2.type = 200
$oParam2.direction = 1
$oParam2.size = 4000
$oParam2.value = $descrip
#Append parameter list
$oCmd.Parameters.Append($oParam2)
#Status Parameter
$oParam3 = $oCmd.CreateParameter("status_val")
$oParam3.type = 200
$oParam3.direction = 1
$oParam3.size = 50
$oParam3.value = $status
#Append parameter list
$oCmd.Parameters.Append($oParam3)
#Command Execution
$oCmdX = $oCmd.Execute
write-host $oCmdX
#Cleanup
#Set parameters = To NULL
$oParam1 = $null
$oParam2 = $null
$oParam3 = $null
#Set Command = To NULL
$oCmd = $null
#Close DB object
$objConn.Close()
So, not too many changes with the syntax, but it doesn't actually send the ADODB Command to the Database. I have also tried hardcoding the connection string, but no luck there either. Am I not using the right syntax with the Command object? I am fairly new
to both of these languages, so I appreciate any help/suggestions you can offer!
Thank you,
BrianThanks JRV.
I am now getting this error (at least some feedback from Powershell now):
Exception calling "Open" with "1" argument(s): "[Microsoft][ODBC Driver Manager
] Data source name not found and no default driver specified"
At C:\temp\JobMon.ps1:21 char:14
+ $objConn.open <<<< ($connString)
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ComMethodTargetInvocation
The thing is, it shouldn't be using a Microsoft driver. It should be using the Oracle Client driver (which I have installed and tested successfully using TNSPing).
Do I need to declare some sort of "using System.Data.OracleClient namespace" like in C++? How would I do that in Powershell?
Thanks again,
Brian -
Read/Write text files in LabVIEW
We have developed an instrument control and data acquisition system for a mass spectrometer using LabVIEW FPGA. Currently we have 6 counters on the FPGA, counting for 1 second intervals and transferring data to the host using a FIFO.
The data, as a local variable, is used in several different parallel loops on the host. One of these is coded to write the data to a text file. Unfortunately everything we have tried has failed. It is proving impossible using either the write to file VI provided with labVIEW, or to use the Open file, write and close file utilities. Each attempt has failed. Yet when running a dummy code we can write to files. The dummy code consists of 6 random number generators running in one loop and the write to file VI in a second loop. The random numbers are transferred across the loops as local variables.
Can anyone offer any advice as to what we might be doing wrong. We're beginning to feel as though we are banging our heads against a brick wall and getting very frustrated.
Many thanks in advance for any suggestions.Hi Paul,
you neither say, what is failing nor do you show any code... How should we help then?
"impossible using ... the write to file VI"
Well, usually they work just fine.
"Each attempt has failed."
In which way? Error number given? Did you use the debuging tools, like probing, breakpoints and highlighting?
"as local variables."
It seems you're not properly do program "real" LabVIEW code
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome
Maybe you are looking for
-
Itunes wont let me back up the iphone 5 i just restored because it says its not set up.
I had a problem previously where I reset my password and shortly forgot it. In that time, I tried to restore it and then back it up but I couldn't restore it because Find My IPhone was enabled. Unfortunately the only way to disable Find My IPhon
-
3.0 update no longer works with dock!
Hi Since my iphone 3g upgraded to 3.0 I can no longer use my apple usb dock as the computer does nto recognize the device. Why must apple be so annoying? Does anyone else use a dock and can no longer? Having it plugged into a cable on my work desk is
-
When opening an image the image is very hard to see it's not dark enough?
Image is hard to see...
-
I would like to automatically have the german version of mail.tu-chemnitz.de, as I was having it with FF 12.
-
I just got a very strange feeling that this guy was stealing data from my phone or doing something else weird. Then I gave him a what-the-****-are-you-doing look, and he said something that I didn't understand. ( If this gives you any clues, he loo