I have been given a dll by a trusted business partner and am trying to use it in a vb 2010 application I am writing.
When I run the app in the IDE debug mode I get the error: “Unable to find an entry point named 'OpenDBConnection' in DLL 'c:\ims\mtcomponents\mtexecutedbchanges.dll'"
I get the same error for all three functions except with the appropriate entry point name; I understand that the ExecuteQuery and CloseDBConnection functions would error if the Open function did not execute, but I believe they would return a different error than the entry point one.
I want to determine if the problem is with my code or with the dll as I am not very experienced at incorporating dlls into my code.
I have run regsvr32 on the dll and it registered ok.
Your assistance will be appreciated.
When I run the app in the IDE debug mode I get the error: “Unable to find an entry point named 'OpenDBConnection' in DLL 'c:\ims\mtcomponents\mtexecutedbchanges.dll'"
I get the same error for all three functions except with the appropriate entry point name; I understand that the ExecuteQuery and CloseDBConnection functions would error if the Open function did not execute, but I believe they would return a different error than the entry point one.
I want to determine if the problem is with my code or with the dll as I am not very experienced at incorporating dlls into my code.
I have run regsvr32 on the dll and it registered ok.
Your assistance will be appreciated.
Code:
Public Class Form1
Public Declare Function OpenDBConnection Lib "c:\ims\mtcomponents\mtexecutedbchanges.dll" _
(ByVal strDSNName As String, ByVal strEngineName As String, ByVal strDatabaseName As String) _
As Boolean
Public Declare Function ExecuteQuery Lib "c:\ims\mtcomponents\mtexecutedbchanges.dll" _
(ByVal strSQL As String) As String
Public Declare Function CloseDBConnection Lib "c:\ims\mtcomponents\mtexecutedbchanges.dll" () _
As Boolean
Private Sub cmdTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles cmdTest.Click
Dim Results As String
Dim bolDBOpen As Boolean = Opendbconnection("dialysistest", "dialysistest", "dialysistest")
Results = ExecuteQuery("SELECT * FROM dba.patient_master")
Dim bolDBclosed As Boolean = CloseDBConnection
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Label4.Text = ""
Label2.Text = ""
End Sub
Private Sub cmdEnd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdEnd.Click
End
End Sub
End Class