Hi
You should read and learn this article.
http://www.dreamincode.net/forums/topic/24677-connecting-to-a-sql-server-database-using-adodb/[
^]
Then implement your code to connect vb6 application and Sql server.
And code for percentage similarity between two strings as below.
dim numMatch as integer = 0
dim numNotMatch as integer = 0
dim numCharLargestString as integer = 0
dim strFirstLength as integer
dim strSecondLength as integer
dim counter as integer
dim percentage as double
dim LoopControl as integer
dim str1 as string
dim str2 as string
strFirstLength = str1.Length()
strSecondLength = str2.Length()
if strFirstLength > strSecondLength
loopControl = strSecondLength - 1
numCharLargestString= strFirstLength
else LoopControl = strFirstLength - 1
numCharLargestString= strSecondLength
endif
for counter = 0 to LoopControl
if (string1(counter).compareTo(string2(i) = 0
numMatch ++
else numNotMatch ++
end if
next
percentage = numMatch/numCharLargestString