este
es un peque�o ejemplo de una pagina ASP que yo tengo y asi es como hago la
conexion usando el ODBC de client access
<%@
Language=VBScript
%>
<HTML>
<HEAD>
<title>AS400 Spool Files</title>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<%
wfile=request.querystring("pfile")
wuser=request.querystring("puser")
wjob=request.querystring("pjob")
wnumber=request.querystring("pnumber")
wspln=request.querystring("pspln")
<HTML>
<HEAD>
<title>AS400 Spool Files</title>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<%
wfile=request.querystring("pfile")
wuser=request.querystring("puser")
wjob=request.querystring("pjob")
wnumber=request.querystring("pnumber")
wspln=request.querystring("pspln")
xblank="x
x"
zuser=trim(wuser) & mid(xblank, 2, 10-len(trim(wuser)))
zfile=trim(wfile) & mid(xblank, 2, 10-len(trim(wfile)))
zjob=trim(wjob) & mid(xblank, 2, 10-len(trim(wjob)))
znumber=cstr(wnumber)
zspln=cstr(wspln)
zuser=trim(wuser) & mid(xblank, 2, 10-len(trim(wuser)))
zfile=trim(wfile) & mid(xblank, 2, 10-len(trim(wfile)))
zjob=trim(wjob) & mid(xblank, 2, 10-len(trim(wjob)))
znumber=cstr(wnumber)
zspln=cstr(wspln)
cmdtxt="call utilib.spoolw2c ('" & zuser & "', '" & zfile & "', '" & znumber & "', '" & zspln & "', '" & zjob & "')"
Dim cnt
Dim rs
Dim cmd
Set cnt = Server.CreateObject("ADODB.Connection")
cnt.open "dsn=myas400", "myusuario", "mypassword"
set cmd=cnt.execute(cmdtxt)
Set rs = cnt.execute("SELECT * FROM qtemp.verspool")
%>
</HEAD>
<BODY>
<h1 align="center">AS400 Spool Files</h1>
<pre>
Dim rs
Dim cmd
Set cnt = Server.CreateObject("ADODB.Connection")
cnt.open "dsn=myas400", "myusuario", "mypassword"
set cmd=cnt.execute(cmdtxt)
Set rs = cnt.execute("SELECT * FROM qtemp.verspool")
%>
</HEAD>
<BODY>
<h1 align="center">AS400 Spool Files</h1>
<pre>
<%
do until rs.eof
%>
<%=rs(0)%></td>
<%
rs.moveNext
loop
cnt.close
Set cnt = Nothing
%>
</pre>
<P> </P>
do until rs.eof
%>
<%=rs(0)%></td>
<%
rs.moveNext
loop
cnt.close
Set cnt = Nothing
%>
</pre>
<P> </P>
</BODY>
</HTML>
</HTML>
Saludos
Gerardo Santillana
IT Department
Delphi Mechatronic Systems
US Ph: (956) 554.5832
MX Ph:
(88) 12.81.63/64/65 Ext. 5832
e-mail [EMAIL PROTECTED]
-----Original Message-----
From: Oscar Andres Ortega Basualto [mailto:[EMAIL PROTECTED]
Sent: Monday, October 06, 2003 4:52 PM
To: [EMAIL PROTECTED]
Subject: Necesito AyudaHola a todos, quer�a ver si me pod�an dar una ayuda con un temita.Necesito Acceder a un AS/400 a partir de una pagina ASP.Tengo el canal de conexi�n pero no me realiza la conexi�n.Quer�a ver si me pod�an ayudar con esto.Saludos desde Chile.Oscar.
**************************************************************************************** Note: The information contained in this message may be privileged and confidential and thus protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. **************************************************************************************** |
