Re: mysql odbc 3.51.06 frequent hangups in ms access 97 search function

miguel solorzano <[email protected]>
Newsgroups gmane.comp.db.mysql.bugs
Message-ID <[email protected]>
At 17:22 12/8/2003 +0200, MPS GmbH wrote:
Hi,

>Dear Sir/s,
>
>I am using myodbc 3.51.06 on a w2k sp4 workstationa, connected to a suse
>linux 8.2 server running mysql 4.013.
>
>Microsoft access 97 (SR2b with jet35sp3) hangs frequently using the search
>function (ctrl-f) several times in a row (buttons "search from beginning" or
>"search again").

This a well known Access issue when using the CTRL-F search over
record set. The recommend work around and too much more faster
method is:

1- Create a module for to create a SQL statement with LIKE clause
    e.g:

Sub AddCriteria(FieldValue As Variant, FieldName As String, MyCriteria As 
String, ArgCount As Integer)

If FieldValue <> "" Then
   If ArgCount > 0 Then
     MyCriteria = MyCriteria & " and "
   End If

   MyCriteria = (MyCriteria & FieldName & " Like " & Chr(39) & FieldValue & 
Chr(42) & Chr(39))

   ArgCount = ArgCount + 1
End If
End Sub

2- Add to the form text boxes for the fields you want to filter and
    one button for to call the module and another one for to remove
    the filter.
3- The button event click for to add the criteria is e.g.:

Private Sub apply_Click()
On Error GoTo Err_apply_Click
Dim Warn As Integer

Dim MyCriteria As String, MyRecordSource As String
Dim ArgCount As Integer
Dim Tmp As Variant

ArgCount = 0

MyCriteria = ""

AddCriteria Me![tfirst], "firstname", MyCriteria, ArgCount
AddCriteria Me![tlast], "lastname", MyCriteria, ArgCount

If MyCriteria = "" Then
   MyCriteria = "True"
End If

DoCmd.ApplyFilter , MyCriteria

If Forms![customer].RecordsetClone.RecordCount = 0 Then
   DoCmd.Beep

  Warn = MsgBox("Not Records.", vbInformation, "My Program")
  DoCmd.ShowAllRecords
  Me![tfirst] = Null
  Me![tlast] = Null
End If

Exit_apply_Click:
     Exit Sub

Err_apply_Click:
     MsgBox Err.Description
     Resume Exit_apply_Click

End Sub

2- OnClick event button code for to remove the filter:

Private Sub remov_Click()
On Error GoTo Err_remov_Click

DoCmd.ShowAllRecords
Me![tfirst] = Null
Me![tlast] = Null

Exit_remov_Click:
     Exit Sub

Err_remov_Click:
     MsgBox Err.Description
     Resume Exit_remov_Click

End Sub



>The hourglass doesn't disappear and ms access can only be ended by the task
>manager.
>
>I also tried odbc version 3.51.05 and mysql server version 4.011 on a nt4
>machine with the same results.
>
>Is this a known bug of the odbc driver?
>
>Looking forward to hearing from you soon,
>
>yours sincerely,
>
>Markus.W.Weiler

-- 
Regards,

For technical support contracts, visit https://order.mysql.com/
Are you MySQL certified?, http://www.mysql.com/certification/

Miguel Angel Solórzano <[email protected]>
São Paulo - Brazil

-- 
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.