Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

vbscript variable with hyphen

Posted on 2001-08-07
9
Medium Priority
?
614 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
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
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.

 

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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

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…
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…
Integration Management Part 2
Screencast - Getting to Know the Pipeline

782 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