Results 1 to 5 of 5

Thread: Module

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2009
    Posts
    7

    Module

    This is my vb6 programme for creating recordset in a module. and call it in class
    and form
    module :ModMain
    Public Function getRec(strQry As String) As ADODB.Recordset
    Dim r As New ADODB.Recordset
    On Error Resume Next
    If r.State = adStateOpen Then r.Close
    r.CursorLocation = adUseClient
    r.Open strQry, Con, adOpenStatic, adLockReadOnly, adCmdText
    Set getRec = r
    End Function

    class:clsOrganization
    Public Function fillOrgName() As ADODB.Recordset
    strQry = "select NAME,CODE FROM ORGANIZATION ORDER BY NAME"
    Set fillOrgName = getRec(strQry)
    End Function


    is there any way to create dataset in a module and call it in a class????
    Last edited by si_the_geek; Aug 8th, 2009 at 06:38 AM. Reason: removed email address to prevent spam bots reading it - other members will contact you via the forums

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