Private Declare Sub DBL_Init Lib "cfront.dll" () Private Declare Sub DBL_Exit Lib "cfront.dll" () Private Declare Sub DBL_ConnectServerAndOpenDatabase Lib "cfront.dll" (NDBCDriverName, ServerName, NetType, DatabaseName, CacheSize, UseCommitCache, UseNTAuthentication, UserID, PassWord) Private Sub ConnectToDatabaseDBL() Dim DatabaseName As String Dim DriverName As String Dim ServerName As String Dim NetType As String Dim UserID As String Dim PassWord As String DatabaseName = "database.fdb" DriverName = "NDBCN" ServerName = "localhost" NetType = "tcp" UserID = "super" PassWord = "" Call DBL_Init Call DBL_ConnectServerAndOpenDatabase(DriverName, ServerName, NetType, DatabaseName, 10000, 1, 0, UserID, PassWord) Call DBL_Exit Exit Sub End Sub
Comments
Any ideas?
Thx in advance
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
of course I have the permissions. If you try to use a license without that permission, you get a different error message.
But I heard that the cfront.dll is not working with Visual Basic at all.
There are two different "Calling Conventions".
a) _CDECL (C++, Delphi, etc.) The cfront.dll is compiled this way.
b) StdCall (VisualBasic)
So there is no possibility to use the dll with Visual Basic.
But we got the OCX work again. So we will use this further.
Thx
Tim