|
-
Nov 6th, 2000, 07:37 PM
#1
Thread Starter
New Member
I cannot work out why the open statement for the SQL statement below returns 0 matches. Can anyone suggest work arounds/possibly explanations why this will not work.
I have executed the SQL from Access and it returns the the records I expect. Could the syntax for ADODB we different to that of Access?
Many thanks.
Martin
Private Sub performSearch2()
Dim strSELECTStatement As String
Dim strSQLOrderByClause As String
Dim dsDataSource As ADODB.Recordset
strSELECTStatement = "Select fd_group.fdgp_desc From fd_group"
If Not txtContainingText.Text = "" Then
strSELECTStatement = strSELECTStatement & " WHERE fd_group.fdgp_desc LIKE '*" & txtContainingText.Text & "*'"
End If
Set dsDataSource = New ADODB.Recordset
' !!!!!! This open statement does not work.
dsDataSource.Open strSELECTStatement, DataEnvironment1.dBConnect
While Not (dsDataSource.EOF)
<< logic goes here >>
dsDataSource.MoveNext
Wend
Set dsDataSource = Nothing
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|