5 th Apr 2020 00:17:29
Hai Friend , Sign In
Chennai City
G. K.
Tamil Nadu Government Holiday List 2018 in English and Tamil   *   Trichy: Wanted - PHP, MySql Programmers. Contact trichy people only 84894 28 444.   *   Indian Railways New Train Number List [Search / Enquiry / Locator / Finder]   *   பன்றிக் காய்ச்சல் பற்றி அறிந்து கொள்ளுங்கள் (Swine Flu H1N1)
See Also
String Functions String Functions
Option Compare Statement Option Compare
Visual Basic Functions Visual Basic Functions
Visual Basic Home Visual Basic Home
Description  Syntax  Return Datatype  Example  Migration

StrComp Function - Visual Basic 6.0 (VB 6.0)

Returns a Variant (Integer) indicating the result of a string comparison.
Parameter Description
string1 Required. String expression being searched.
string2 Required. String expression searched for.
compare Optional. Numeric value indicating the kind of comparison to use when evaluating substrings.

StrComp Function's compare argument:
Constants Value Description
vbUseCompareOption -1 Performs a comparison using the setting of the Option Compare statement.
vbBinaryCompare 0 Default. Perform a binary comparison.
vbTextCompare 1 Perform a textual comparison.
vbDatabaseCompare 2 Microsoft Access only. Performs a comparison based on information in your database.

StrComp Function's return value:
If input Return
string1 is less than string2 -1
string1 is equal to string2 0
string1 is greater than string2 1
string1 or string2 is Null Null

Return Data type:
Statement Result Remark
StrComp("CHENNAIIQ", "chennaiiq", 1) 0 vbTextCompare
StrComp("CHENNAIIQ", "chennaiiq", 0) -1 vbBinaryCompare
StrComp(5, SearchStr, SearchChar, 1) 5 Second occurrence
StrComp(6, SearchStr, SearchChar, 1) 0  
StrComp(SearchStr, LCase(SearchChar)) 4  
StrComp("", SearchChar) 0  
StrComp(4, SearchStr, "") 4 Value of start argument
StrComp(Null, SearchChar) Error Invalid use of null
StrComp(SearchStr, Null) Error Invalid use of null

Migration from Visual Basic 6.0 (VB 6.0) to
  StrComp Function in VB Script (VBS)
  StrComp Function in JScript (JS)
  StrComp Function in ASP (Active Server Page)
  StrComp Function in PHP Script
  StrComp Function in MS-Access
  StrComp Function in MS SQL Server
  StrComp Function in Oracle
  StrComp Function in C Language
  StrComp Function in C++ Language
  StrComp Function in Foxpro
  StrComp Function in Fortran
  StrComp Function in MS Excel Sheet
Go to top

© 2005 - 2007 Chennaiiq.com. All Rights Reserved.

Our Sites: ChennaiIQ.com || Tamil Calendar || Tamil Panchangam || KP Astrology
Our Blogs: Tamil Calendar