Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

vbscript variable with hyphen

Posted on 2001-08-07
9
Medium Priority
?
603 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:Michel Sakr
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:Michel Sakr
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 400 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

670 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