Solved

vbscript variable with hyphen

Posted on 2001-08-07
9
546 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
  • 2
  • 2
  • 2
  • +3
9 Comments
 
LVL 22

Expert Comment

by:CJ_S
Comment Utility
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
Comment Utility
yes.. don't use the dash sign - try instead to use the underscore _
0
 

Author Comment

by:mscproj
Comment Utility
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
 

Author Comment

by:mscproj
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 22

Expert Comment

by:CJ_S
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Force-accepted by
Netminder
CS Moderator
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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 information …
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This video discusses moving either the default database or any database to a new volume.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

728 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now