Solved

vbscript variable with hyphen

Posted on 2001-08-07
9
578 Views
Last Modified: 2008-07-03
I got the error at the following code of my asp file:

ax_FromWoID = lo_Conn.ACNS022V_ACAS022.FROM-WO-ID

It seems that the VBScript handled WO as a separate varible, and treated it as subtraction. But, it should be FROM-WO-ID is a element/attribute of a dll.

Therefore, how can do what I want? Just pass the attribute value from the dll to the variable ax_FromWoID without re-design and compile the dll.

Thanks!
0
Comment
Question by:mscproj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +3
9 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 6358530
it's generally not a good idea to use the - sign.

Not sure if it will work but you can try:
Eval("lo_Conn.ACNS022V_ACAS022.FROM-WO-ID")

Regards,
CJ
0
 
LVL 20

Expert Comment

by:Silvers5
ID: 6358564
yes.. don't use the dash sign - try instead to use the underscore _
0
 

Author Comment

by:mscproj
ID: 6358575
ax_FromWoID = Eval("lo_Conn.ACNS022V_ACAS022.FROM-WO-ID")

I got the following error:
Object doesn't support this property or method "lo_Conn.ACNS022V_ACAS022.FROM"

Any help?

0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

Author Comment

by:mscproj
ID: 6358578
But, I don't have the coding to re-write the dll to use underscore!!! Therefore, I want to seek ways to solve this. Thanks!
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6358597
In the eval statement the - sign is also evaluated. I think you are out of luck. AFAIk there is no way of retrieving what you want to retrieve with plain ASP.

regards,
CJ
0
 
LVL 20

Expert Comment

by:Silvers5
ID: 6358927
Try to create a 2nd component that will call that component and return the values..
0
 
LVL 5

Accepted Solution

by:
GeoffKell earned 100 total points
ID: 6358936
It may be worth trying

ax_FromWoID = lo_Conn.ACNS022V_ACAS022.[FROM-WO-ID]

VB enums allow the use of spaces and - inside []. Although I agree with the others that I'd avoid it.

Regards
GK
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6833193
This question appears to have been abandoned. ALL open questions for you are listed below.  Your options are:
 
1.  Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3.  Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4.  Delete the question. Again, you must tell the other participants why you wish to do this.
 
For special handling needs, please post a zero point question in the link below, include the question QID/link.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click this Help Desk link for Member Guidelines, Member Agreement and the Question/Answer process:  Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues.
http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp
 
 
PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:
 
Please leave any comments regarding this question here on closing recommendations if this item remains inactive another three days.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange
 
P.S.  For year 2000 question, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.

http://www.experts-exchange.com/jsp/qShow.jsp?qid=11916758
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20065262
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20067556
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20164373
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20245406
0
 
LVL 5

Expert Comment

by:Netminder
ID: 6891250
Force-accepted by
Netminder
CS Moderator
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question