|
-
September 25th, 2000, 03:36 PM
#1
Slow database search
Before I start, I am new to VB programming. I am converting a DOS payroll program to VB 6.0. I am using an Access 2000 database with 132 fields.
Finding an employee to display all their data is extremely slow. There must be a faster way to do it, or I'm going to have major problems.
Here is how I am currently searching for the employee and displaying the data:
public Sub FindEmp(Num as string)
ErrFl$ = ""
sSQL$ = "SELECT * From Master"
rsAccess.Open sSQL$, Access, adOpenKeyset, adLockOptimistic
With rsAccess
.MoveFirst
.Find "PAYEMP='" & Num & "'", , , 0
End With
If rsAccess.EOF = true then
ErrFl$ = "Y"
Exit Sub
End If
""then set textboxes to the appropriate fields
Is this the only way I can get all the fields to
a record? It runs so slowly on my machine, and I have a fairly quick system. I do not want to bind the text boxes, because certain fields will not be displayed to all users. Any advice would be appreciated.
Thanks
Catrina
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
|