cfront.ocx, NDBCN, ASP.Net

AxemanAxeman Member Posts: 8
Hi,
My web application connects to a NDBCN server via cfront.ocx. I use the following code:
CF.ConnectServerAndOpenDatabase("NDBCN", serverName, "TCP", databasename, dbCache, True, False, UserID, Pword).
Everything works fine on my machine and one other machine. However when I install the application on any other machine it crashes at CF.ConnectServerAndOpenDatabase. I am able to use the CF.ConnectServerAndOpenDatabase method using VB6 and VB.net on these machines but not ASP.net. What on earth is going on?

Somebody please help me!
Cfront.ocx misery

Comments

  • dick11dick11 Member Posts: 60
    What is the error message?
    Dick van der Sar

    www.dasautomatisering.nl
  • AxemanAxeman Member Posts: 8
    That's the trouble! I don't get an error message from cfront even if hideError is set to false. I get an asp error msg:
    System.Runtime.InteropServices.COMException (0x80010108): Method '~' of object '~' failed

    which as you can see is not very helpful.
    Cfront.ocx misery
  • dick11dick11 Member Posts: 60
    I suppose you did register CFront.ocx.

    Can you give us the source code?

    What is your development environment?
    Dick van der Sar

    www.dasautomatisering.nl
  • AxemanAxeman Member Posts: 8
    Yes it's registered. This is the thing: I can access the server and database using VB6 and VB.Net but not ASP.net. The trouble is our application is developed in ASP.Net.

    The other thing is it works fine on my machine and one other machine. There seems to be something whithin ASP.net.

    Anyway, heres the code:
    Public Sub connectUserToDatabase(ByVal sUser As String, ByVal sPw As String)
    Dim databasename As String = ConfigurationSettings.AppSettings("NavisionNativeDatabase")
    Dim serverName As String = ConfigurationSettings.AppSettings("NavisionNativeServer")
    Dim dbCache As Int32 = CLng(ConfigurationSettings.AppSettings("NavisionNativeCache"))
    Dim sPath As String = ConfigurationSettings.AppSettings("NavisionNativePath")

    CF.SetNavisionPath(sPath)
    CF.ConnectServerAndOpenDatabase("NDBCN", serverName, "TCP", databasename , dbCache, True, False, sUser, sPw)
    End Sub
    Cfront.ocx misery
  • clee666clee666 Member Posts: 3
    Hi,

    I have the exact same problem when calling ConnectServerAndOpenDatabase.

    The only difference is that I'm not using ASP.NET, but VB.NET.

    System.Runtime.InteropServices.COMException (0x80010108): Method '~' of object '~' failed

    Did you find any solutions to the problem since your post ?

    It would be really helpful.
    Thanks!
Sign In or Register to comment.