| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: What`s wrong in this |
> This search engine works very well with a 82kb database (MYDB001.mdb),
> but it freezes with another file with 1590kb (MYDB002.mdb). What's
> wrong? Is "mydb002" too large? Any tip to refine this code?
Sure. You're thinking inside the wrong box. That's how you'd load a
text file into memory and then search it, but a database isn't a text
file. A database is a powerful thing. How 'bout this:
Public Sub Search(SearchText as string)
rs = db.open("SELECT * From MyTable WHERE Author = '" &
SearchText &
"';")
Then you've got every listing for that author. It sounds like you're
just trying to add something if that record exists in the database, so
it migt be easier to use:
rs = db.open("SELECT Count(*) As Cnt WHERE Author = '" &
SearchText &
"';")
Then it's either 0, if it's not listed, or the number of times it
shows up.
If you're trying to build a list-box or combo-box of all the authors
in a table, VB has databinding to do that for you.
---
þ RIMEGate(tm)/RGXPost V1.14 at BBSWORLD * Info{at}bbsworld.com
---
* RIMEGate(tm)V10.2áÿ* RelayNet(tm) NNTP Gateway * MoonDog BBS
* RgateImp.MoonDog.BBS at 11/17/04 9:38:29 AM
* Origin: MoonDog BBS, Brooklyn,NY, 718 692-2498, 1:278/230 (1:278/230)SEEN-BY: 633/267 270 5030/786 @PATH: 278/230 10/345 106/1 2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.