Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 DB compare integer help
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

es4725
Junior Member

205 Posts

Posted - 28 February 2002 :  12:14:47  Show Profile
here is the code I have to compare text in a db:

Do Until objRS.EOF or bolFound
If (StrComp(objRS("Name"), strName, vbTextCompare) = 0) Then
'found it
bolFound = True
Else
objRS.MoveNext
End If
Loop

I need something to do the same thing with an integer field. I don't recall how to do this right now.

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 28 February 2002 :  13:17:21  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
Try this:


Do Until objRS.EOF or bolFound
If (strValue = objRS("FieldName")) Then
'found it
bolFound = True
Else
objRS.MoveNext
End If
Loop



-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

es4725
Junior Member

205 Posts

Posted - 28 February 2002 :  23:37:33  Show Profile
I thought about that - I just wasn't sure if there was something similar to StrComp for integers.
I'll use that though. Thanks.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07