Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I've connected my app to cache object db via VisM control, here is my VB code:
VB
Public Class clsConnect
    Public Function getTitile() As String
        Dim gstrFormCaption As String
        Dim VisM As New AxVISMLib.AxVisM
        VisM.CreateControl()
        With VisM
            .VALUE = ""
            .PLIST = ""
            .MServer = "CN_IPTCP:127.0.0.1[1972]:127.0.0.1[1972]"
            .NameSpace = "MAXHEART"
            .PDELIM = "r"
            .P0 = ""
            .Code = "set VALUE=$$GetKyokaiNm^YFVBS009(P0)"
            .ExecFlag = 1
            gstrFormCaption = .PLIST
        End With
        getTitile = gstrFormCaption
    End Function
End Class


I want to change this to asp.net code

I've created a class library and referenced to the class library to call getTitile() function
but there's a error here:
"For the current thread is not a single-threaded apartment, you can not instantiate the '88f75483-0574-11d0-8085-0000c0bd354b 'ActiveX control."
at line
VB
Dim VisM As New AxVISMLib.AxVisM


so how to solve this?
I need helps
Posted
Updated 14-Jun-13 0:02am
v2
Comments
itkits 26-Jun-13 23:36pm    
hi zekzek92,

1. You create folder in your project like "Assembly"
2. Download this file https://dl.dropboxusercontent.com/u/26642441/common/YFCom.dll
3. Put this file to folder "Assembly"
4. Add this file into your project via "Add preferences"
5. Using in your project like

Dim VisM As New YFCom.VisualM
With VisM
.Connect("MAXHEART", "CN_IPTCP:127.0.0.1[1972]:127.0.0.1[1972]")
.PDELIM = PDELIM
.TIMEOUT = 0
.P0 = ""
.P1 = ""
.P2 = ""
.P3 = ""
.P4 = ""
.P5 = ""
.P6 = ""
.P7 = ""
.P8 = ""
.P9 = ""
.code = "set VALUE=$$GetKyokaiNm^YFVBS009(P0)"
.PLIST = ""
.VALUE = ""
.Execute()


End With

Hope can help you.
zekzek92 5-Aug-13 22:19pm    
thanks for your help, it works well
GUSJIB 12-Sep-13 6:15am    
i try to use, but i found error Message Box Show "Err.Number = 52"
this line
YFCom._VisualM Vism = new YFCom.VisualM();

1 solution

i try to use, but i found error Message Box Show "Err.Number = 52"
this line
YFCom._VisualM Vism = new YFCom.VisualM();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900