Mike C
-
Posts
43 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by Mike C
-
-
What idea!
Unfortunately, the method works only with files that Internet Explorer is able to show independently or as a plug-in...
does not work with Excel spreadsheets, which instead are downlod and opened directly with Excel ...
Among the activeX is also available ThumbCtl ... I tried it and I saw the preview that makes the files as shown in the File Explorer ... but excel is not made the preview ... only the icon!
Thanks for your help ... 'm open to any suggestions!
Hello
Osvaldo
Could you convert it to a pdf before showing?
Alternatively you can use an activex control called DSO Framer that will allow you to open an office document to display. I don't know if you can open it directly in preview mode though.
I hope this helps
Michael
-
Osvald, I am sure there is a more elegant way than what I am about to suggest but it has worked for me for viewing PDF files.
Just create a web browser activex container and load the file to preview there. Let the browser decide that the correct application is to view the file (acrobat, other pdf viewer, excel, etc).
Michael
-
Hi All,
I am in the process of developing a VI which would be able to send text messages to multiple mobile numbers if any error occurs in the main application.
I tried to use Internet Connectivity toolkit's SMTP E-Mail VI, then created a filter in gmail, but still I cant get the SMS thing from LV to work.
Is there any other way to do this?
Thanks!
Typically cellphone providers have email addresses associated with cellphone numbers. Maybe you can simply send an email to the phone. Here is a list of some examples I found with a quick search:
Alltel
[10-digit phone number]@message.alltel.com
Example: 2125551212@message.alltel.com
AT&T (formerly Cingular)
[10-digit phone number]@txt.att.net
Example: 2125551212@txt.att.net
Boost Mobile
[10-digit phone number]@myboostmobile.com
Example: 2125551212@myboostmobile.com
Nextel (now part of Sprint Nextel)
[10-digit telephone number]@messaging.nextel.com
Example: 7035551234@messaging.nextel.com
Sprint PCS (now Sprint Nextel)
[10-digit phone number]@messaging.sprintpcs.com
Example: 2125551234@messaging.sprintpcs.com
T-Mobile
[10-digit phone number]@tmomail.net
Example: 4251234567@tmomail.net
Verizon
[10-digit phone number]@vtext.com
Example: 5552223333@vtext.com
Virgin Mobile USA
[10-digit phone number]@vmobl.com
Example: 5551234567@vmobl.com
-
QUOTE (alukindo @ Sep 27 2008, 07:18 PM)
Mike:The SQL Server Compact Edition database requires that you reference the System.Data.SqlServerCE.dll so that it can run in-process with your executable. In this case your executable environment is LabVIEW. Once you have compiled your executable, then it will be your custom LabVIEW application run-time environment.
I have attached a commented LabVIEW example that shows successful connection, data insert, and data read from an SQL Server CE database file. The database was created using (SQL Server Management Studio Express) SSMSE free edition downloaded from Microsoft Web Site. The database used in this example has an empty password. I tried uploading the CETest.sdf (*.sdf database) file but the upload failed. ---Rejected by the LAVA FTP server?
Be sure to download the latest version of SQL Server CE which is 3.5 SP 1
I hope this helps.
Anthony L.
Anthony,
Thanks very much for the reply. I'll give it a try once I get a chance (unfortunately something else came up that needs my attention). This is new programming territory for me and I needed some help. Your approach makes sense and I expect it would work for me. I am surprised to see that your vi does not use any of the database vi's. Thanks again for the help.
Michael
-
QUOTE (rbogomir @ Sep 26 2008, 01:57 PM)
I am also using sql server compact. I tried that connection string also and it didn't work neither. I found the strings http://www.connectionstrings.com/?carrier=sqlserver2005ce' rel='nofollow' target="_blank">here. I didn't give any password when creating the database. I got that error message few times. As a matter of fact, this is the only error message that I got - even for syntax errors in sql statements. Not very informative.Rbogomir,
I can get the same error message even if I point to a non existent sdf file. This makes me think that the service is not even running. Is there anything else you needed to do? How did you solve your problem? I have a suspicion that I need to have IIS running for this to work, is IIS running on your machine?
Thanks again for taking the time to help me out.
-
QUOTE (rbogomir @ Sep 26 2008, 05:21 AM)
QUOTE (Shaun Hayward @ Sep 26 2008, 08:09 AM)
Jim,Thanks for the hint - I hadn't come across SQLite before - it looks like its doing much of the same kind of thingMy only question is that the link you posted does not seem to have anywhere to actually download the toolkit - am I missing something?Shaun, I was just looking at that myself. I found the vi's here. I have not had a chance to try it but it looks interesting
QUOTE (jcarmody @ Sep 26 2008, 04:32 AM)
on ni.com that I've had some success with.Anyway, good luck with your project. Please forgive me if I'm way off base.jmI writing an application that needs the database to be contained in a single file. My first choice was Access but I've recently heard of SQL Server Compact and I thought it may be a much better alternative. I have worked with SQL Server before so I figured it would be an easy transition. If I could only figure out how to connect to the database!
I have no reason to want to use MS products. I will give SQLite a try, thanks for the suggestion.
-
QUOTE (Yair @ Sep 25 2008, 01:04 PM)
QUOTE (Shaun Hayward @ Sep 25 2008, 02:11 PM)
I havent looked into it yet (due to time constraints) but SQL Compact Edition looks interesting.From what I have read so far (which isn't so much) it seems that it embeds a database within a particular applicatio. Therefore I would wonder whether you need to do some calls to its DLL / .Net trickery instead of a conventional UDL approach. The MSDN pages are suitably cryptic and basically talk you though using a Wizard in Visual Studio, which doesnt help so much.Shaun, thanks for the responce. That's exactly what I gathered by reading through various sites. I am afraid that you are probably correct in that I would need to make some dll calls. SQL server compact is a neat idea but it seems complicated to get working.
Michael
-
-
Hi everyone. I was wondering if anyone has had any experience connecting to an SQL Server Compact 3.5 database using the LabVIEW database connectivity toolkits. I cannot figure out a way to created a valid connection string or if I let the "open connection to db" vi prompt me for connection info I cannot figure how to configure it.
Thanks in advance for all the help.
Michael
-
Well, I figured out a way to do it. I had to create a stored procedure to do the insert and include the "select scope_identity()" as part of it. The funny part to this is that if you do execute the stored procedure from a query the insert happens correctly but the scope_identity is not returned.
What does work is a parameterized query where you can set parameters (what you need to insert) as well as read parameters (the scope_identity). It took some looking around to find out the correct syntax to do this (the examples in LabVIEW do not explain this well).
I am listing below the stored procedure and the code. This was just a test so please excuse any cosmetic sloppiness.
Stored Procedure:
CREATE PROCEDURE [dbo].[uSER_INS] (@userFullNM varchar(100),@username varchar(50),@adminpass varchar(50), @roleid int, @isactive int, @userid int output)
AS
BEGIN
SET @USERID = NULL
SELECT @USERID = [uSER_ID] FROM [uSER] WHERE USER_FULL_NM = @userFullNM
IF @USERID IS NULL
BEGIN
INSERT INTO [user]
(user_full_nm, username, admin_password, user_role_id, is_active, create_dtm, last_update_dtm)
VALUES(@userFullNM, @username, @adminpass, @roleid, @isactive, GetDate(),GetDate())
SELECT @userid=SCOPE_IDENTITY()
END
ELSE
BEGIN
UPDATE [uSER]
SET username = @username,
admin_password = @adminpass,
user_role_id=@roleid,
is_active=@isactive,
last_update_dtm = GetDate()
WHERE [uSER_ID] = @USERID
END
END
-
I have tried using a semicolon to indicate where each query ends but it did not work. I suppose the LabVIEW toolkit cannot execute more than one query per SQL statement. I did take a quick look at the blog and it seems that there is still a more than one query per SQL statement so it will probably not work. I'll give it a try though.
QUOTE (orko @ Apr 25 2008, 04:06 PM)
Not true. They are actually two seperate queries that are run one right after the other. The SQL 2005 management studio is smarter than the LabVIEW DBC Toolkit, in that it knows every command that the SQL server is capable of processing, and what syntax they require. So it doesn't care if you put a semicolon at the end of the statement or not.oh wait, here's a http://weblogs.asp.net/esanchez/archive/2006/04/24/443757.aspx' rel='nofollow' target="_blank">Blog article that describes it.
-
Thanks for the quick responses. I'll try and provide some answers to your questions:
1. There are no error messages
2. Using a termination character has no effect
3. The insert and select scope_identity() need to be in the same command. The scope_identity() is supposed to return the table primary key ID the insert had
4. Database: SQL Server 2005, ODBC connection
-
Hello everyone. 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 am using the LabVIEW database connectivity kit with LabVIEW 8.5.
Does anyone have a solution to this problem?
Thanks,
Michael
-
QUOTE(rolfk @ Nov 27 2007, 04:41 PM)
If you want to use the internet toolkit you certainly can go into the VI library and modify it in such a way to provide somehow some information in a global variable about the current size. The internet toolkit FTP VIs if you dig into them, does basically read multiple blocks inside a loop writing them to the desired file, until all data has been retrieved or the connection is aborted.There is no current progress information because the high level VI to download a file is written in such a way to only return on a finished download or on error. So there would be never a meaningful progress return value from that VI itself. The information you want to know is deeper inside that VI hierarchy and you will have to modify those VIs somewhat to give you that information in a meaningful way.
Rolf Kalbermatter
After Aristos' comment I started looking into the low level vis and found that there is a single vi (tcp read) in a loop that reads a specific amount of data (4kb by default) every iteration until the entire file is downloaded. I guess I need to do some rearraging in order to get the info I want.
Thanks for all the help everyone.
Mike C
-
Thanks for the suggestion everyone.
I am planning on using the Labview internet toolkit VIs for this project but was unable to find any output indicating how much data was received at any point in time. Justin's suggestion of polling the file size of the downloded file might work but I agree that it's not very elegant.
How do other programs (FTP clients, browsers, download utilities, etc) know how much data was received?
MikeC
-
Hello all. I am using FTP to tranfer a file from a remote server. I want to be able to monitor the download progress but I don't know how to do that. Getting the file size is not a problem, but how can I find out how much data has been trasferred at a given point during the download?
Thanks in advance for all the help.
MikeC
-
Hello all. I am using FTP to tranfer a file from a remote server. I want to be able to monitor the download progress but I don't know how to do that. Getting the file size is not a problem, but how can I find out how much data has been trasferred at a given point during the download?
Thanks in advance for all the help.
MikeC
-
hello Mike C,
Thank you for the explanation. Then it is possible send sms indirectly with Labview, through one
SMS gateway.
thank you, Mike C
Eerc, I am not sure how one would use an SMS gateway to sent an sms to a cell phone. From what I have seen you would need to subscribe to some kind of service that allows you to do that.
In searching for an answer to your question (I've been wondering myself how to do this), I have found that you may be able to send an sms to a phone by simply sending an email to the phone. In my case my mobile provider (US Cellular) allows an email to be sent to a phone. I can send an email to 'myphonenumber@email.uscc.net' and it will show up as a text message on my phone. Other providers may allow this or provide it as a service (maybe for free).
Check with your mobile provider if you can do this.
I hope this helps
Michael
-
And possible to send sms with labview?
Thank
Hugo Fernandes
Hugo, I was looking to do the same thing some time ago but I had to postpone that project. I did find some information on the NI Knowledge base that may give you some direction:
"Problem:
Can LabVIEW send a text message to my mobile phone email address?
Solution:
LabVIEW can indirectly send text messages to a cellular phone with the SMTP E-Mail VI
-
I have used LabSQL (open source) in the past and it works great. You can get it from http://www.jeffreytravis.com/lost/labsql.html. A number of examples are also included with LabSQL to get you started.
Good luck
-
If anyone is interested here is the 7.0 version
-
I talked with NI about this and it turns out that LabView executables do not have a version resource area for any version information to be stored in. NI may implement this in a future version of LabView.
-
Hello everybody. I have an interesting problem. The company I work for requires that all programs released have a version number associated with them that can be read by the GetFileVersionInfo function. None of my LabView programs return a version number, they actually return 0.0.0.0. Is there a way to provide version information that will eventually be stored in the final executable?
Thanks
java script:emoticon(':headbang:')
smilie
-
Does anyone know of a way to programmatically get the application data folder path (i.e. C:\Documents and Settings\username\Application Data)
Thanks
What can affect the size of a front panel object between versions of Windows?
in User Interface
Posted
You need to define the the fonts in the ini file of the specific application. In all my apps I add the following in the ini and it works just fine, regardless of the user OS or font/screen settings.
appFont="Tahoma" 13
dialogFont="Tahoma" 13
systemFont="Tahoma" 13
I hope this helps
Michael