Article ID: 166281
Article Last Modified on 6/29/2004
The UserConnection designer uses Visual Basic's ActiveX designer architecture to provide design-time support for programmatic data access. It allows you to create connection and query objects at design time. These connections and queries are persisted as project-level objects. You can pre-set properties, define new properties and methods, and write code behind the objects to catch events.
Create procedure GetAuthorInfo
@au_id Varchar(11), @testOut Varchar(10) OUTPUT As
Select * from authors Where au_id = @au_id
Select @testOut = 'Hello'
Debug.Print "Connect"
Private Sub Command1_Click()
Dim objSP As New StoredProcs 'creatable UC object
Dim objRs As rdoResultset 'pointer to rdoResultset
Dim lngRet As Long, strOut As String 'vars to hold output
objSP.EstablishConnection rdDriverNoPrompt 'establish connection
lngRet = objSP.GetAuthorInfo("648-92-1872", strOut) 'SP method
Set objRs = objSP.LastQueryResults 'get results off objRs
Debug.Print lngRet, strOut, objRs(0) 'output example results
End Sub
Guide to Building Client Server Applications in Visual Basic (Enterprise)
Part 1: Overview
Client/Server Tools
The UserConnection Designer
Additional query words: kbDSupport kbdse kbvbp500 kbole kbNoKeyword kbVBp600
Keywords: kbhowto KB166281