gracias Pedro Pinedo Hernandez TIPO Programmer/Analyst & AS400 Analista-Programador Departamento de Informática / IT Department tfno.:+34 941 28 60 90 - 941 03 01 39 fax: +34 941 03 01 39 Amcor Flexibles T +34 941 286 090 F +34 941 207 543 www.amcor.com
P Antes de imprimir, piensa en el MEDIO AMBIENTE P From: [email protected] To: "forum.help400" <[email protected]> Date: 12/03/2010 13:18 Subject: RE: Conexion a traves de ADO/old db En el iSeries access tienes los drivers para acceder desde .NET al iSeries. En la instalación selectiva, opción acceso a datos debes instalar el proveedor de datos para .NET. A partir de ahí, en tu proyecto .NET incluye la referencia a la dll (C:\Program Files\IBM\Client Access\IBM.Data.DB2.iSeries.dll) y en el encabezamiento de cada clase la cláusula using (en C#) o import (en VisualBasic) IBM.Data.DB2.iSeries. Debes crearte en el formulario una conexión (un control tipo iDB2Connection) y un procesador de mandatos (control del tipo iDB2Command). En la propia conexión puedes definirle la base de datos, el usuario y la contraseña o, posteriormente, indicárselo por código. En el procesador de mandatos le indicarás la sentencia sql a ejecutar. Y necesitarás crearte un datareader. Por Ejemplo: iDB2Command.CommandText=?select count(*) from qgpl.usuarios where baja=0?; iDB2DataReader lector = iDB2Command.ExecuteReader(); while (lector.Read()) { Sentencias a ejecutar } Lector.Close(); Saludos. Juan Carlos De: Pedro Pinedo [mailto:[email protected]] Enviado el: viernes, 12 de marzo de 2010 12:52 Para: [email protected] Asunto: Conexion a traves de ADO/old db Si alguien trabaja este tipo de conexion (visual .net- iseries), le agradecería, que me diga como lo hace. (Todo, hasta lo mas simple sera bienvenido) ¡Buen fin de semana a todos! Pedro Pinedo Hernandez TIPO Programmer/Analyst & AS400 Analista-Programador Departamento de Informática / IT Department tfno.:+34 941 28 60 90 - 941 03 01 39 fax: +34 941 03 01 39 Amcor Flexibles T +34 941 286 090 F +34 941 207 543 www.amcor.com P Antes de imprimir, piensa en el MEDIO AMBIENTE P ______________________________________________________ Amcor - Creating a new world of packaging ______________________________________________________ CAUTION - This message may contain privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify Amcor immediately. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Amcor .[attachment "image001.gif" deleted by Pedro Pinedo/Logrono/AFE] ____________________________________________________ © Publicaciones Help400, S.L. - Todos los derechos reservados http://www.help400.es ---------------------------------------------------- Para darte de baja visita la siguente URL: http://listas.combios.es/mailman/listinfo/forum.help400 ______________________________________________________ Amcor - Creating a new world of packaging ______________________________________________________ CAUTION - This message may contain privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify Amcor immediately. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Amcor .
<<image/gif>>
____________________________________________________ © Publicaciones Help400, S.L. - Todos los derechos reservados http://www.help400.es ---------------------------------------------------- Para darte de baja visita la siguente URL: http://listas.combios.es/mailman/listinfo/forum.help400

