function checksqlname(sqlname:string):boolean;<br>var<br> i:integer;<br>begin<br> result:= true;<br> for i:=1 to length(sqlname) do<br> begin<br> if i=1 then<br> begin<br> if not(Copy(sqlname,i,1)[1] in ['a'..'z','A'..'Z']) then<br> begin<br> showmessage('不合法');<br> result:= false;<br> break;<br> end;<br> end<br> else<br> begin<br> if not(Copy(sqlname,i,1)[1] in ['a'..'z','A'..'Z','0'..'9']) then<br> begin<br> showmessage('不合法');<br> result:= false;<br> break;<br> end;<br> end<br> end;<br>end;