Jump to content
Nas

Not converting VBScript classes in Classic ASP

Recommended Posts

The VBUC does not convert all asp files.

 

The code below is such an example

Original: \general\data\app_code\Query.asp
<%
  Class Query
    Private m_commandText
    Private m_commandTypeEnum
    Private m_commandParameters
  
    Public Property Let CommandText(strText)
      m_commandText = strText
    End Property
    
    Public Property Get CommandText()
      CommandText = m_commandText
    End Property

    Public Property Let CommandParameters(parameters)
      m_commandParameters = parameters
    End Property
    
    Public Property Get CommandParameters()
      CommandParameters = m_commandParameters
    End Property

    Public Property Let CommandTypeEnum(commandType)
      m_commandTypeEnum = commandType
    End Property
    
    Public Property Get CommandTypeEnum()
      CommandTypeEnum = m_commandTypeEnum
    End Property
  End Class
%>

Converted: \general\data\app_code\Query.aspx
<script language="C#" runat="Server">
//@Class:Query
</script>

 

Is there a reason why they fail and how can I solve that?

Thanks

 

Share this post


Link to post
Share on other sites

Hi Nas,

We were able to reproduce the error in a very specific scenario. The issue happens only if the ASP file has two classes with the same name. For instance, if you have an ASP file with only one class “Query” the VBUC delivers the expected output. If the user has the name of the class duplicated in the same file the error occurs as you state, can you please check if you have the class “Query” in the same file without noticing.

Share this post


Link to post
Share on other sites

Hi,

There is only one class in the file.
The file Query.asp in my previous post is complete.

I have also looked in all files at classes/methods/variables named 'query' and have not found any occurrences.

 

Share this post


Link to post
Share on other sites

Hi Nas,

I would like to ask for two things. Could you provide the Log file generated and also could you provide the project/solution you are using. It'd help us find the issue.

image.png

Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use