Results 1 to 5 of 5

Thread: Dll with Database Connections (altered)

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Posts
    2

    Dll with Database Connections (altered)

    i tried to make dll with database connection but when i tried to create object of that dll class. i get an error in

    The code in dll class(named cusotmer) is

    Public rs As Recordset
    Public name As String


    Private Sub Class_Initialize()
    rs.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\Nwind.mdb;Persist Security Info=False"
    Set rs = New Recordset
    rs.Open "select * from customers", , adOpenKeyset, adLockOptimistic

    End Sub

    Public Sub Class_Terminate()
    rs.Close
    Set rs = Nothing
    End Sub

    the reference is made and then i created an object

    Private Sub Command1_Click()
    Dim test As Customer
    ****Set test = New Customer
    MsgBox test.Customerid
    end sub

    gives an error 91

    please check this and for reference see the com tutorial part 3
    Last edited by mirghouse; Nov 14th, 2002 at 07:33 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width