'Function used to split a string on two or more lines if its length is greater than the specified max length ' str : the string to be splited ' maxlenght : the maxlenght each line of string should be ' forcessplit : tells if a string can be splited anywhere, meaning it can split a word ' useHtml : use the HTML way of line break (<br/>) instead of vb way (vbCrLf) function splitStr(str, maxlength, forcesplit, useHtml) if useHtml then replacewith = "<br/>" else replacewith = vbCrLf end if pos = maxlength do while pos < len(str) if forcesplit then str = mid(str, pos-maxlength,maxlength) & replacewith & mid(str,pos) 'Mid(string,start[,length]) else start = instrrev(str, vbSpace, pos) 'InStrRev(string1,string2[,start[,compare]]) call Replace(str,vbSpace,replacewith,start,1,1) 'Replace(string,find,replacewith[,start[,count[,compare]]]) end if pos = pos + maxlength loop splitStr = str end function
RecordExist = not (rs.BOF And rs.EOF) 'Response.Write("record exist ? = " & RecordExist)