Solved

vbscript variable with hyphen

Posted on 2001-08-07
9
565 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

763 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