<%
‘
‘ Arquivo Classe.asp
‘
Class classe
Private vSQL,vCon,vconString ‘variavel de conexao e de comandos SQL
Public vRS ‘variavel do recordset
Private Sub Conexao
Set vCon = CreateObject(”adodb.connection”) ‘criação do objeto que manipula o adodb
vconString = “Driver=Firebird/InterBase(r) driver;Uid=SYSDBA;Pwd=masterkey;DbName=D:\FIREBIRD\examples\TEST.FDB;” ‘String de conexão
vCon.execute(vconString) ‘execução no adodb
End Sub
Public Sub clientes
vSQL = “select * from clientes order by nome asc” ‘Comando SQL
Set vRS = vCon.execute(vSQL) ‘Record Set
End Sub
end class
%>
<%
‘
‘ Arquivo default.asp
‘
%>
<%@Language=”VBSCRIPT”%>
<html>
<head>
</head>
<body>
<!–#include file=”planilha.asp”–>
<%
objeto = new classe
while (not objeto.vRS.eof)
Response.Write(objeto.vRS(”nome”)&”<BR>”)
wend
%>
</body>
</html>