Article ID: 186277
Article Last Modified on 1/9/2003
Create procedure GetAuthor
@TestParam Varchar(11) As
If @TestParam = " "
Select au_id From Authors
Else
Select au_lname From Authors
Endif
GO
NOTE: GetAuthor returns a Resultset with author id if the input parameter
is a single-space string (" "). Otherwise, it returns a Resultset with
authors' last names.
Dim cn As New UserConnection1
Dim rs As rdoResultset
cn.EstablishConnection
cn.Query1 "" ' Pass a zero-length string
Set rs = cn.LastQueryResults
Debug.Print rs(0).Name & "=" & rs(0).Value
' Because of the problem described above,
' the input parameter becomes a single-space string (" ").
' au_id, instead of au_lname, is returned back.
166281 HOWTO: Create and Implement a UserConnection
Additional query words: kbVBp500 kbDSupport kbdse kbVBp600 kbVBp kbNoKeyWord
Keywords: kbprb KB186277