Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2009
    Posts
    2

    Unanswered: Like with dbIII tables

    I am using a datacontrol to connect to a DBIII database
    and display the contents in Flexguid (VB6)

    I can find exact matches no problem.
    When I use LIKE in the query no records are returned.

    Is the problem that the database is a DBIII data base.
    This code works fine with an Access database, with either exact or partial matches.

    Only exact matches are found when the data control is connected
    to a DBIII database.

    Code....

    If Me.optDwgNo = True Then
    .RecordSource = "select * from morder where drawing like '%" & SearchText & "%' order by shipdate asc "
    .Refresh
    If .Recordset.RecordCount > 0 Then
    .Recordset.MoveFirst
    SetUpFlex
    Else
    msg = MsgBox("No Records found", vbInformation, "Attention")
    End If

    When this query runs the message box message is displayed.

    Thanks for your help

    Charlie

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    The cursor may not support recordcount.

    Instead of
    Code:
    If .Recordset.RecordCount > 0 Then
    try
    Code:
    If Not .EOF Then
    If that doesn't work, DBIII may use a non-standard character for the wildcard character (as MS Access did use internally) - try using the asteriks (*) as the wildcard character.

    Code:
    .RecordSource = "select * from morder where drawing like '*" & SearchText & "*' order by shipdate asc "
    Last edited by loquin; 03-25-09 at 14:36.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  3. #3
    Join Date
    Mar 2009
    Posts
    2
    I tried # $ % everything but *

    and guess what!!!!

    * worked

    Thank You

Posting Permissions

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