Advertisement

07.02.2008 at 04:54AM PDT, ID: 23533180
[x]
Attachment Details

How to represent a null in a string?

Asked by sasllc in Microsoft Visual Basic.Net

Tags: Visual Basic

I am trying to use a serial port utility in my vs 2005 vb project.  The syntax of the statement is outlined on their site as follows:
-----------------------------------------------------------------------------------------------
Syntax 2
Value = object.Read ( StartTrigger, EndTrigger, Timeout )

Part Type Description
object SerialNET.Port An object that evaluates to an SerialNET.Port object.
Value string Data received from serial port. Nothing/null if no data received.
StartTrigger string.
EndTrigger string.
Timeout int See OnRead for details.
---------------------------------------------------------------------------------------------

Elsewhere in their limited documentation it says that I can set the "StartTrigger" string to null if I don't want to utilize a StartTrigger.  So, I tried structuring my code as:

psWork1 = objPort.read( "", EndTrig, 10000)

Where I was hoping the "" would act as a null....but it didn't.  And all I can get from the wiseguy in tech support is a lecture about how "" is the not the same as null....but he won't tell me HOW to represent a null in this "StartTrigger" string.

So....how do I do this?  Could I set up a string variable named StrTrig and put a "value" of null in it?  What would the actual syntax be?  TIAStart Free Trial
[+][-]07.02.2008 at 05:08AM PDT, ID: 21915414

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual Basic.Net
Tags: Visual Basic
Sign Up Now!
Solution Provided By: Dhaest
Participating Experts: 2
Solution Grade: A
 
 
[+][-]07.02.2008 at 05:25AM PDT, ID: 21915543

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 05:27AM PDT, ID: 21915570

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 05:28AM PDT, ID: 21915571

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.02.2008 at 05:29AM PDT, ID: 21915584

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2008 at 07:33AM PDT, ID: 21933342

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628