Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Option Compare Text


If Option Compare Text is in effect, is there any way to check something case sensitive?

e.g.,
If "Test" = "TEST" then

With Option Compare Text, this would be true, but how could I switch back to binary compare just for that statement?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Qs: What Is [Option Compare Text]?
Hi,
What is [Option Compare Text]?

Problem With Option Compare Text
Visual Basic 6.0
When I try to use the Option Compare Text which enforce case
insensitive text comparisons visual basic returns with compile error "Invalid inside procedure". Should I have to add something else in order to be accepted?

Option Compare Text At Runtime???
By inserting option compare text, str comparisons become non case sensitive.

I need to know how at runtime I can switch between binary and string comparisons?

I can do it the messy way by optionally running a ucase or lcase statement to both string to be compared, however this becomes very tedious after a while...

So how can I do what option compare text does at runtime?

Option Compare Text Optional??
Is there a way that I can say:


Code:
If Compare = True Then
Option Compare Text
End If


If not, is there an easy way to simulate that effect?

Explanation For Option Compare Text .. Etc
could someone please explain what are these and what is there main purpose. And also is there anymore like these.

Option Explicit
Option Compare Text



------------------
OmarSwan

omarswan@yahoo.com

http://omarswan.cjb.net

"Jesus is Lord"

Option Compare?
Can anyone give me some insight as to the benefit of using option compare.. i pretty much know what it does.. and that it is compare binary by default... but when should you use option compare text instead?

Option Compare Binary?
What is it? I saw it at the top of a project someone else made and I had never seen it before?

Does it just change the IF statements are treated (and other comparisons)?

Option Compare Database
Anyone know how to change the default sort order of an Access database from Text to Binary?

Using Word XP Compare Option In Visual Basic
Hi,

Does anyone know about how to programmatically identify (Using VB 6.0) the styles in two different source documents using the Compare and Merge Documents option in the Word XP?

Thanks,
Anitha

Please Help Newbie, Why Can't I Compare The Text In A Listbox With A Text Record?
Hello,

I'm new to vb and I'm stuck on this problem:
(I'm doing a school project, but don't worry, I won't ask you to do my homework for me :-).

The problem is that I want to compare a name in a list box that has been selected with (& my syntax might not be accurate here) "records" in a text file.

What is happening is I have a user defined type, and I declare a variable so that I can put information into this user defined type. (record I call it) I also open a text file to Put the records into.

I have a list box that updates itself with the name of the record each time a new record is entered. eg: It's johns record and the listbox has a john in it.

However I need to also delete some of these records from the list box, part of doing this for me involves comparing the names in the list box, with the names of records in a text file I've set up.

Pesduocode is like this:

If "listbox text that user selected" is equal to
"name of record in text file" Then

'do code


now the trouble is that although the listbox.name and record.name have the same string, I cannot get them to compare as being equal.

Why?

btw: I can post the relevant code if you want, but I wanted to just make first sure that I wasn't making a simple mistake of some kind.

Text Compare
Hi guys i have a problem with some code need to try to resolve either one of 2 ways

1/ this code looks for a match between text1 & text2 if if finds one then it does a command - any command not relevent. but it seems so fall over and find a positive if the text2 is empty can this be stopped?


VB Code:
Dim mytextfile As StringDim linearr As VariantDim i As Variant  mytextfile = Text1.Textlinearr = Split(mytextfile, vbNewLine)For i = 0 To UBound(linearr)    If Not InStr(linearr(i), Text2.Text) = 0 Then ' Do some thing                Next


2 this code is scrolling 2 text files into text1 and text2 in a loop problem is lcount & bcount mean that it scrolls +1 to bring next line therefore this means it reaches the end of the file and displays an empty string for one line then loops. this basically means a match is made as the comparing code above see's an empty box as a false match is made.


VB Code:
Private Sub Command5_Click() Open App.Path & "player.dat" For Input As #2        aLines = Split(Input(LOF(2), #2), vbCrLf)    Close #2    Text2.Text = aLines(0)    bCount = 1 End Sub Private Sub Command6_Click() If bCount < UBound(aLines) Then        Text2.Text = aLines(bCount)        bCount = bCount + 1    Else        'Do Something     End IfEnd Sub


so to recap either a way of ignoring the empty box or a way of looping the files but not going +1 at the end of the loop and showing empty box. but i dont want to stop the loop just want to avoid the blank line.

thanks in advance.

Text Compare
Dear All,
I found the attached text compare project from some other site. It is comparing word by word. I want all the option avalible in this as it is.But the comparing should be faster.How can I do that.
Thanks In Advance.

Text Compare
hi, im creating a simple program that can enabled or disabled

like for example you have 1 command button and 2 textbox

if text1 and text2 is not match the command button will be disabled
if match the button is enabled.

Enabled the command button


VB Code:
Text1.text = "ABC123"Text2.Text = "ABC123"


Disabled the command button


VB Code:
Text1.text = "ABC123"Text2.Text = "123ABC"


how to work with this?

br,

Compare Text
Hello,I am new to vb and I had this question.
I need to read a file that has different fields.
one of the fields has to be uppercase.
what i need to do is a validation if the string is lowercase raise an error.
It only has to be upper.
Thanx for your help

Text Compare
Hello All!

I am writing a program that will compare two text files. I have successfully gotten to the point where I am ready to compare the two text files that I have opened and read. I understand how to get the file length/count, I am just having a hard time figuring out how to step through each data string and compare the differences between the two.

The program is suppose to find the difference between the two files and then display it in another text box for editing/saving.

Example would be:

Text1:

1234 5678 0000

Text2:

1234 5677 0001

The difference between the to would be:

5678 5677
0000 0001

Any help would be greatly appreciated!

Thank you in advance!

Dan

Text Vs Binary Compare
Can you please explain what is a VBBinaryCompare?
What is advantages and disavantas of below two methods?


MSDN
vbBinaryCompare 0 Performs a binary comparison.
vbTextCompare 1 Performs a textual comparison.

Compare Text In Listview
How can i compare a string with a string in a listview. I have a listview on my form and i can add lines of text into it. But i want it to notify me when it see's a line thats already been entered, but i dont know how to do this.

Compare And Replace Text
Hello,
Im working on a project for a friend right now and im about to finish it up, but iv ran into a couple of problems. I have a list of words on the left (each word on a different line in a text box) and a text box on the right with the string "i love to drive my red car" i want the user to be able to click on seach and the program will search through the string on the right and go through each word and if that word is not in the list of words on the left then give the option to the user to change that word into something else or replace the word with a word on the left. This doesnt sound too diffacult but im having a lot of problems...

This is how i think the code will work:
1. make an array of the words on the left
2. make an array of the word on the right
3.find the length of both arrays
4.for statement that runs through all the words on the right and inside of it a for statement that runs though all the words on the left for each word on the right.
5. inside the second for statement have an if statement checking if the word is in the array of words in on the left. if it is go on to next word if it isnt select the word in the text box and replace with variable x (i can take care of getting variable x to equal the word that the user would like to use to replace the word on the right with)

Iv programmed a lot, just not in vb. If someone would like to convert this to vb or help me do it i would be very thankful.

jordan

Exact Text Compare
How can I make an exact mach of text?

If I have a "John" and "john" this should not mach. Is there a function or something for this?

Text Compare Function
Hi Guys,

Please I need help urgently with the following:
Just to give you an idea with what I am busy with:
I am developing a speech recognition program. Listbox1 gives the user text to read (50 words). As the user reads the text, the words that are recognized by the dictation engine, is displayed in ListBox2.

ListBox1 : Contains text, say for example 50 words.
ListboX2 : Must contain the same text as ListBox 1, after the user have finished reading the text in Listbox1.

The problem:

After the user have finished reading the text in ListBox1, he clicks on a button (name the button: bResult) and then the text of ListBox1 must be compared with the text of Lixtbox1 in order to give an percentage of how accurate the text of Listbox1, compares with the text of Listbox 2.

Could someone please help me with the code for this problem. Spaces between words must be taken in consideration also.
All I want is the code for the bResult button.

Thanks Guys
Regards
Cballe

Compare Text Files
I want to be able to tell if a project has been changed since last saved. The project files That the user can save are fairly small so I think that just saving the current project to a temp file and comparing it with the last saved file would be the best way to do this.

My question is what would be the fastest / easiest way to compare text files that should have the same exact content?

Text File Compare?
hello,
I am new in this site but I hope I can find answers to my questions. I have two text files and I want to compare them. After that I want a notification which informs me if the files are the same or not. If not it should tell me where the difference is. I know that it is a long question but can anybody help me please, urgently...

thanks to everybody who trouble by answering...

Compare Text In Two Fields
Looking for ways to compare text in two different MS Access cells, and output "SAME" or "DIFFERENT" in a table. I have though about the CompareMode or the VbCompareText, but not sure of the code to perform this action.

Thanks,
Tim

Compare Text Files
Hi All

Can anyone help me , i have written a program that reads from two (textfiles old.txt and new.txt) , the program checks for differences in the textfiles and if there are differences it writes it to a new textfile called output.txt.

This side is working fine , but my problem is that i need to show a report on what data has change in each record (if there are any changes) , and also show where the change has been made.

i.e. UID | Field Name | data

Show i need to generate a full report on what data has changed , in what field it has changed etc.

I hope this makes sense.

I have attached one of the text files.

Compare Text Files
Has anyone written something that can compare two text files and output the differences, or know of freewhere I can download to do this?

Text Compare And Replace
Hi all,

I am having trouble trying to find a Char in a fixed position and then replacing it if it exists.

I was using something like this:
ElseIf Right(DSCode, 1) = "." Then
DSCstr = Replace("DSCode", ".", "_", , 1, vbTextCompare)

But It does not work (no laughing pls, I am still in the novice learning stage)

Can any one point me in the right direction pls.

Any help / advice would be great.

Thanks in advance,
Rocks.

Compare Two Text Docs
Hi,

Anyone know of some code available or examples to compare two text files
using visual basic 6?

Thanks

Del

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Delbert M. Hundley
Security +, MCSA, MCSE Win2K ID# 2292547
L-3COM MPRI
Information Systems Analyst
(757) 232-6774 ext 326

Compare Text In A Combobox
Hello,
I'm trying to get te index of a specific text in a ComboBox.
The ComboBox is filled by searching for filenames in a directory.
The text of the last item selected in the ComboBox is saved in a
textfile in the OnExit Event of the Mainform.
While loading the Mainform I want the text that was saved in the file
to be compared with the items in the ComboBox ad get the index of the
found item, so that I can set it as selected.

I thought i could do it something like this, but the program hangs
before I can see anything.
---------
Code
---------
Dim i, As Integer
Dim line As String
For i = 0 To ComboBox1.Items.Count
If ComboBox1.Items(i) = line Then
IndexFound = i
Exit For
End If
Next
---------
Code
---------

Can anyone help me please,

Thanx

How Can I Compare Text In A Grid
i want to see if there is any text in the row of the grid. if theer is any than i skip to next row and can enter the data.
please help me out.

thanx

Want To Compare Values Of A Text
hi ,

i have two datetime fields......current date getdate() and expirey date datetime.

i want to compare this exp date value with the current getdate. as to the expirey date should never be less than the the data enterd into the currnt getdate text box.i am using sql as my database and using adodc .

thnx in adv

sid





Edited by - siddharthmoharil on 6/17/2002 3:59:53 AM

How To Compare Two Text Files
I want to compare two text files .
Showing character level differences and have diff. forecolor for the erroneous ones.
It shoud allow add or delete row operations.
what controls shall i use.
what logic shall i use to mark errors



Edited by - sam on 4/19/2002 12:52:39 AM

Compare Text File In Vb
i have two text file having particular fomat
means RECORD 01 and then 4 lines of details,
it contain more than 50 recors
i have to check each record from both files
if mismatches found in record then show record in form with different color
then user will correct the particular entry and save,then it will again check
next record and so on


e.g. of text file
Data for Respondent ID #0001

00814512002 13?1211213312122112211272 1533 01
00814512002 0001U5580200102
.
.
.
.

How To Compare 2 Text Files. PLEASE HELp
my problem is that i now have 2 text files that need to be compared to make sure that the content of 1 of the file is exist in the other text file.
for further information please look at the information below. the content for the files are:

first.txt

abcdef,123
have,444
no,888


second.txt

lim,000
goh,890
abcdef,123
have,444
no,888


i want to make sure that the content of first.txt exist in second.txt. no spacing allow and the string must be exactly the same in the file? please help! need it urgently.thanx!

Help With Handling And Compare Text Files!
Hi,

I have not been working alot in VB6 and would therefore need some help and advice to solve a problem I have.
My wish is to create a program that reads a textfile that could look like this:

0CF00400 X 8 F8 7D 7D 00 00 FF FF FF 2218.401 R
00EFD100 X 8 3D 3D 3D 3D 3D 3D 3D 3D 2218.400 R
00EFD200 X 8 3D 3D 3D 3D 3D 3D 3D 3D 2218.399 R
0CFF5800 X 8 07 00 00 01 67 01 06 00 2218.399 R
0C000011 X 8 00 00 00 FA 00 00 00 00 2218.397 R
0CF00400 X 8 F8 7D 7D 00 00 FF FF FF 2218.391 R
00EFD200 X 8 3D 3D 3D 3D 3D 3D 3D 3D 2218.390 R
0CFF4800 X 8 F8 7C 30 FF FF FF FF 00 2218.389 R

-----------------------------------------
The textfile is built like this:
It starts with three “blank steps” (three taps on space…I’m not sure what it is called)
Then the 8-char. long identifier.
One blank step.
One X.
Three blank steps.
One 8.
Three blank steps.
Then comes 8 2-char long groups with two blanksteps between.
Three blank steps.
Combination of “4-char.3-char”
One blank step.
And finally one R.
-----------------------------------------

I want the prog. to check the first 8 char. long group (that is an identifier) and compare it to a few chosen combinations. If it is a match, then the whole row will be printed.
In the 8 char. long combination is it the 4 char in the middle (those in position 3,4,5 & 6) that will be compared to a few 4 char. long chosen combinations.

Examples of chosen combinations that I am interested in could be:
F004
F006
EFD2
FFFF
In this case, row 1, 3, 6 & 7 would be printed.

I would like to be able to change these set combinations (but always 4 char. long). Would it be a good idea to keep them in a separate text file then!?

While I have not been working in VB in a long time (and not very much at all earlier) I would be very grateful for suggestions how I should tackle this problem.

Best Regards
Mathias

Compare Text1 And Text File
I have a big problem. I am into this app and find that my code is not doing what it says that it is. Basicly I am trying to get the code to look at a textbox and compare the contents of the textbox to that of a text file. If it is differant then I am trying to get it to save the textbox to the file.

What is happening is that as I save the item to a file then run the code even though the items are identical, the code thinks that the textbox has changed. I am adding the code below.


Code:
Public thefile As String

Code:
Private Sub MNUopen_Click()
If File1.filename = "" Then
MsgBox "please select a file"
Exit Sub
End If
CheckIt
GetFilePath
Text1.Text = FileText(thefile)
Me.Caption = "Quick Edit - " + thefile
End Sub

Code:
Function CheckIt()
Dim Rev1 As String
Dim NewOne As String
If thefile = "" Then
Exit Function
End If
NewOne = Text1.Text
Rev1 = FileText(thefile)
If Rev1 = NewOne Then
Exit Function
Else
If MsgBox("This file has changed, would you like to save it before opening another." + Chr(13) + "If not all changes will be lost.", vbYesNo, "Save Now?") = vbYes Then
SaveAs
End If
End If
End Function

Code:
Function GetFilePath()
If File1.Path = "C:" Then
thefile = File1.Path + File1.filename
Else
thefile = File1.Path + "" + File1.filename
End If
End Function

Code:
Function FileText(filename$) As String
Dim handle As Integer
handle = FreeFile
Open filename$ For Input As #handle
FileText = Input$(LOF(handle), handle)
Close #handle
End Function
The problem is strange as when I put a breakpoint in and check the values of rev1 and newone in the line "If Rev1 = NewOne Then" they appear to be the same.

Any help would be thanked over and over again.
Rich

Compare Contents Of Text Files
Hi,
I have 2 text files which contains a list of 500 computer names. How can i
run a script to compare the contents and list out the differences between
the 2 files?

sample content of the text file:
computer1
computer2
computer3
computer4
.... and so on....

pls advice. thanks

Compare A Value And Show The Result In A Text Box
Hey Guys,

This is getting to me its just not working and as far as I can see my code is ok.

I have a combobox control and a textbox control.

The combo is filled with a recordset and when the user picks a record from the combo i need to get the id number of this record to display in the textbox.

The combobox loads on the form_load event with:
'Combo lists code1
Dim strConnect
strConnect = ";DATABASE=" & App.Path & "sbt.mdb" & _
";PWD=not tellin"
Dim rs5 As DAO.Recordset
Dim db5 As DAO.Database
Combomales.AddItem "Add New" & _
"[" & "Add" & "]"
Combomales.AddItem "Unknown"
Set db5 = OpenDatabase("", False, False, strConnect)
Set rs5 = db5.OpenRecordset("select * FROM males " & _
"ORDER By field_kcname")

Do Until rs5.EOF
Combomales.AddItem rs5.Fields("field_kcname")
rs5.MoveNext

Loop

rs5.Close
Set rs5 = Nothing
' end of Combo lists code1


Private Sub Combomales_Change()
Dim strResults
Dim strConnect
Dim rs As DAO.Recordset
Dim db As DAO.Database
strConnect = ";DATABASE=" & App.Path & "sbt.mdb" & _
";PWD=not tellin"


Set db = OpenDatabase("", False, False, strConnect)
Set rs = db.OpenRecordset("select * FROM sbt where field_kcname like '" & Combomales.Text & "'")
strResults = rs.Fields("field_id").Value
Me.TextBox(5).Text = strResults
Me.TextBox(5).Refresh
Set rs = Nothing
rs.Close
End Sub

so far this runs without erroring out but the textbox doesnt get the value.
Any help is appreciated.
Regards as ever.
C

Compare Vb6 Text To Mysql Record??
I am trying to find out if there is a simpler way of finding out if a record is in a table besides downloading the whole table to a list box. Lets say I have a table called ISO and it has two fields in in called name and pass. I know I can download the content of ISO into a list box and comapre name.text and pass.text to see if the are in there butttttt is there a simple way of just querying the table to see if these two items are in the table?
Robert

Help With Handling And Compare Text Files!
Hi,

I have not been working alot in VB6 and would therefore need some help and advice to solve a problem I have.
My wish is to create a program that reads a textfile that looks something like this:

0CF00400 X 8 F8 7D 7D 00 00 FF FF FF 2218.401 R
00EFD100 X 8 3D 3D 3D 3D 3D 3D 3D 3D 2218.400 R
00EFD200 X 8 3D 3D 3D 3D 3D 3D 3D 3D 2218.399 R
0CFF5800 X 8 07 00 00 01 67 01 06 00 2218.399 R
0C000011 X 8 00 00 00 FA 00 00 00 00 2218.397 R
0CF00400 X 8 F8 7D 7D 00 00 FF FF FF 2218.391 R
00EFD200 X 8 3D 3D 3D 3D 3D 3D 3D 3D 2218.390 R
0CFF4800 X 8 F8 7C 30 FF FF FF FF 00 2218.389 R

-----------------------------------------
The textfile is built like this:
It starts with three “blank steps” (three taps on space…I’m not sure what it is called )
Then the 8-char. long identifier.
One blank step.
One X.
Three blank steps.
One 8.
Three blank steps.
Then comes 8 2-char long groups with two blanksteps between.
Three blank steps.
Combination of “4-char.3-char”
One blank step.
And finally one R.
-----------------------------------------

I want the prog. to check the first 8 char. long group (that is an identifier) and compare it to a few chosen combinations. If it is a match, then the whole row will be printed.
In the 8 char. long combination is it the 4 char in the middle (those in position 3,4,5 & 6) that will be compared to a few 4 char. long chosen combinations.

Examples of chosen combinations that I am interested in could be:
F004
F006
EFD2
FFFF
In this case, row 1, 3, 6 & 7 would be printed.

I would like to be able to change these set combinations (but always 4 char. long). Would it be a good idea to keep them in a separate textfiel then!?

While I have not been working in VB in a long time (and not very much at all earlier) I would be very grateful for suggestions how I should tackle this problem.

Best Regards
Mats

How To Compare 2 Files In Rich Text Box?
I'm new in VB6.I have RichTextBox1 and RichTextBox2 in my form.I looking for how to compare the texts inputed in these boxes,and then to see the relult as marked words or letters in RichTextBox2 as new text file.

Odd Results With Text Compare... (Resolved)
Ok, I'm lost and confused and even a little annoyed.

I have an index listbox set. Each one contains a bunch of entries, one of which is the mp3 filename.

Using this code,


VB Code:
If InStr(1, LCase(Replace(List1.List(l), " ", "")), ".mp3", vbTextCompare) And InStr(1, LCase(Replace(List1.List(l), " ", "")), "href", vbTextCompare) ThenText5.Text = List1.List(l)End If


I'm getting intermittent results.

This entry DOES work,
<Ref href = "D:mp3SoundtrackLord Of The Rings - Fellowship Of The Ring - 03 - The Shadow of the Past.mp3"/>

But this one doesn't work,
<Ref href = "D:mp3SoundtrackLord Of The Rings - Fellowship Of The Ring - 08 - Flight To The Ford.mp3"/>

Now, I simply see no difference here between the two, from a technical standpoint...

Any ideas? Can you see any obvious logic flaws in my little code snippet?
(Edited to remove redundant code, the code had no effect on anything.)

Using VB To Look At A Text File And Compare To An Access DB
I am creating a program which will need to look at the first 15 digits on each line of a text file, and replace these with the corresponding info found in an access database.

eg - 15r 0805 1% (found in first column of database) would be replaced wth 15r 0805 (found in 2nd column of database)

Does anyone have any ideas on the best way to start looking at this.

Thanks

Christine

Compare Two Text Files Using VB...........URGENT Please HELP!!!!
Hello Friends,

One text file(txt1) is dumped from file maker and the other text file(txt2) is dumped from Oracle. And the text files contain three fields Emp number, Name and password. (till here it is done)

So the question is:-

Each time it should compare txt2 with txt1 (compare two fields in each record i.e with Emp number and as well as password). And if any record is different then that particular record from txt2 should be stored in a third text file(txt3).

Please help me showing an example in VB6 it is Urgent!!!!!!!

Thanks,

Compare Text And Perform Action In Word
Hello, I'm a total newbie, so I would appreciate any help on this.

Basically, I've got a long document that I want to get ready for importing into a database. What I need automated is the following:

1. Go to a new line.
2. Check the first character.
3. If the first character is a number, go to the next line.
4. If the first character is not a number, then go up one line, go to the end of the line, and hit "delete" then type "!"
--> then go to the next line and repeat the comparison.

I know this should be so easy, but I don't know how to make VBA actually check the value of the first character of a line (or how to make it go to the next line).

If anyone could help with this, I would very much appreciate it!

Regards,

Bhavesh Patel

Compare Two Text Box Strings As Simple And Complex
I want to compare two strings from two text boxs as input.
I have divided as Basic and Complex requirement.
Please help me out in this whether it can be done or not.

The two paragraph will not much similar in alignment and in font but has same content and meaning as given below

Compare two text box strings

Text Box 1


Code:
Key to success for any <<individual>> commencing new
employment is appropriate support during the first months.

The induction process is dedicated to enabling the provision
of this support both within your School / Service and on a
University wide basis from Personnel and Staff Development.


Text Box 2


Code:
Key to success for any &value1 commencing new employment
is appropriate support during the first monthsss.

The induction process is dedicated to enabling the provision of this
support both within your School / Service and on a University wide
basis from Personnel and Staff Development


I am looking for result or output as given below


Basic Mismatch

Individual as &value1
Months as monthsss

or

Individual as &value1 in 1st line
Months as monthsss in 2nd line

Complex Mismatch

Development. as Development ( dot is not found at end )
from Personnel as from Personnel ( extra Spaces)


I think i am very clear about my requirement .

Thanks to everyone for viewing my post and replying . ..

Thanks,
Bharani

Compare Between Two Lines From Two Differnt Text File
hi every one

i have text file and it updated every day and i want to copy first line from this file and pasted in new text file to compare between the first line in both text file
what is the code can i use to do this

thank you .

Compare IP Address With IP Ranges In A Text File
Hello, I have a 2+mb text file with IP ranges from many countries, which looks like this:


Code:
AFGHANISTAN:202.174.154.200-202.174.154.207
AFGHANISTAN:202.174.154.180-202.174.154.187
AFGHANISTAN:202.174.154.160-202.174.154.167
ALBANIA:84.20.64.0-84.20.95.255
ALBANIA:193.220.74.0-193.220.74.31
ALGERIA:193.41.146.0-193.41.147.255
ALGERIA:192.52.232.0-192.52.232.255
ALGERIA:195.24.80.0-195.24.87.255
ALGERIA:193.251.152.0-193.251.152.255

I'd like to write a function that takes a certain IP address, checks in which IP range it belongs and then returns the name of the country.

For example, I have IP address: 193.41.147.69.
The function has to return ALGERIA, because the IP address is in the range: 193.41.146.0-193.41.147.255

I know how to read the text file and eventually return the name of the country, but how do I compare an IP address with the IP ranges? And what is the fastest way, because I need to check about 30 IP addresses every 2 seconds?

How To Compare Partial String From A Text With Out Spliting It?
Hey Guys

I am looking for a way to find if a text includ a certain word or a sentence with out spliting the entire text into a array. can this be done?

Thanks

Can Anybody Suggest A Solution To Compare One Text File To Another
Hi all,

I have many files each containing an SQL statement. each file is represented by a different record in my Access table.

Some of these files are duplicate (i.e the SQL is the same in both) and some are very similar (e.g only the parameters change)...

could anybody suggest a solution that would allow me to iterate through the records and pick out the records which are the same or very similar?

Thanks in advance

Carlos

Copyright © 2005-08 www.BigResource.com, All rights reserved