<%@ Language=VBScript %>
<!--#INCLUDE file="ADOVBS.inc"-->
<% 
Response.Buffer=true
dim sqlQuery, clave, dsn

clave= Request.QueryString("clave")

dsn = application("bd_sieps")

set rs = server.CreateObject("ADODB.Recordset")
set connection = server.CreateObject("ADODB.CONNECTION")

connection.Open dsn

sqlQuery = "SELECT empr_clave FROM empresa WHERE empr_clave ='" & clave & "'"
rs.Open sqlQuery, connection, adOpenForwardOnly,adLockReadOnly,1
if rs.EOF = true then ' no existe
	Response.Write("false") 'false = no existe registro
else
	Response.Write("true") 'true = ya existe el registro
end if

' clean up
If rs.State = adStateOpen then
	rs.Close
End If
If connection.State = adStateOpen then
	connection.Close
End If
Set rs = Nothing
Set connection = Nothing
%>