Ver Mensaje Individual
  #30 (permalink)  
Antiguo 07/01/2003, 13:41
Avatar de mauriciolangea
mauriciolangea
 
Fecha de Ingreso: enero-2002
Mensajes: 59
Antigüedad: 22 años, 3 meses
Puntos: 0
Interbase

Tema : Interbase

Pregunta : ¿Como conecto ASP con Interbase?

Respuesta

Lo primero que debes hacer (Asumiendo que tienes instalado el driver ODBC de Easysoft) es agregar en el archivo GLOBAL.ASA, la siguiente línea ...

Application("ConexionInterbase") = "{DRIVER=Easysoft IB6 ODBC;DSN=employee;UID=sysdba;PWD=masterkey;"

Después crea una página EMPLOYEE.ASP y agregale el siguiente código ...

<%
set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open Application("ConexionInterbase")

Set rs = Server.CreateObject("ADODB.Recordset")

SQL = "select first_name||' '||last_name name from employee"
rs.Open SQL, oConn

If rs.EOF then
%>
<FONT face="Verdana" size="1">
<%
Response.Write("No encontró registros ...")
%>
</FONT>
<%
Else
Do Until rs.EOF
%>

<table border="0" width="100%">
<tr>
<td width="100%">
<font face="Verdana" size="1">
<%=ucase(rs.Fields("name").Value)%>
</font></td>
</tr>
</table>
<%
rs.movenext
Loop

rs.Close
oConn.Close
set rs = nothing
set oConn = nothing
End If
%>