Skip site navigation (1) Skip section navigation (2)

Fwd: RE: [pgsql-ayuda] PSQL ODBC & Visual Basic

From: "Israel Zavalza Bahena" <izavalza(at)hotmail(dot)com>
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Subject: Fwd: RE: [pgsql-ayuda] PSQL ODBC & Visual Basic
Date: 1999-04-13 10:00:55
Message-ID: 19990413170135.55825.qmail@hotmail.com (view raw or flat)
Thread:
Lists: pgsql-es-ayuda


>From: "Israel Zavalza Bahena" <izavalza(at)hotmail(dot)com>
>To: aferrari(at)jlm(dot)lima(dot)net(dot)pe, izavalza(at)hotmail(dot)com
>CC: pgsql-interfaces(at)hub(dot)org
>Subject: RE: [pgsql-ayuda] PSQL ODBC & Visual Basic
>Date: Tue, 13 Apr 1999 09:56:53 PDT
>
>ALBRICIAS, ALBRICIAS  !!!!
>
>
>
>PARECE que ya quedo ( al menos con delete ), los cambios hechos son:
>
>
>db.execute a db.executeSQL
>
>librerias usadas :
>
>Visual Basic for Applications
>Visual Basic Objects and Procedures
>Microsoft DAO 2.5/3.5 compatibility
>Microsoft Remote Data Object
>
>
>bajo Visual Basic 4.0
>
>
>
>
>
>
>
>
>
>
>>From: "Attilio" <aferrari(at)jlm(dot)lima(dot)net(dot)pe>
>>To: "Israel Zavalza Bahena" <izavalza(at)hotmail(dot)com>
>>Subject: RE: [pgsql-ayuda] PSQL ODBC & Visual Basic
>>Date: Mon, 12 Apr 1999 20:01:57 -0500
>>
>>Se activa en vIsual Basic, menu Proyecto\Referencias y la libreria 
es
>>Microsoft DAO 2.5/3.5 Compatibility Library o Microsoft DAO 3.0 
>Object
>>Library.
>>
>>lamentablemente el codigo no lo tengo, pero es asi como te digo
>>
>>
>>dim BD as Database
>>dim rd as recordset
>>
>>BD.executesql sentecia, DbSQLPassThrough
>>
>>o sino
>>
>>set rd = bd.Openrecordset()
>>
>>mas ayuda la ayuda en linea de Visual Basic
>>
>>Suerte
>>
>>
>>> -----Original Message-----
>>> From: Israel Zavalza Bahena [mailto:izavalza(at)hotmail(dot)com]
>>> Sent: Lunes 12 de Abril de 1999 08:18 AM
>>> To: aferrari(at)jlm(dot)lima(dot)net(dot)pe
>>> Subject: RE: [pgsql-ayuda] PSQL ODBC & Visual Basic
>>>
>>>
>>> Saludos... Muchas gracias por tu ayuda, y aprovechando....
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> >From: "Attilio" <aferrari(at)jlm(dot)lima(dot)net(dot)pe>
>>> >To: <izavalza(at)hotmail(dot)com>
>>> >Subject: RE: [pgsql-ayuda] PSQL ODBC & Visual Basic
>>> >Date: Fri, 9 Apr 1999 22:45:20 -0500
>>> >
>>> >Yo tuve mas o menos el mimo problema
>>> >
>>> >Revisa la configuracion del ODBC.
>>> >
>>> >Si esta bien entonces prueba usando el metodo
>>> >db.ExecuteSQL Comando, con las opciones  dbFailonError o
>>> DbSQLPassThrough
>>> >pero antes tienes que ir a Referencias del proyecto y activar una
>>> libreria
>>> >DAO creo que es verion 2.5/3.0,
>>>
>>>
>>> Esta donde se activa? en visual Basic o en el servidor Linux?
>>>
>>>
>>> no me acuerdo prueba
>>> >
>>> >en VB4 todavia esta disponible ExecuteSQL pues en VB5 ya no
>>> >o sino prueba con el metodo Openrecordset el cual te lo 
recomiendo
>>> >
>>>
>>>
>>>
>>>
>>> No tienes pedazos de codigo ejemplo?
>>>
>>>
>>>
>>>
>>> >Si da resultado pasa la voz.
>>> >
>>> >Suerte
>>> >
>>> >> -----Original Message-----
>>> >> From: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
>>> >> [mailto:owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx]On Behalf Of
>>> Israel
>>> >> Zavalza Bahena
>>> >> Sent: Viernes 9 de Abril de 1999 03:25 PM
>>> >> To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
>>> >> Cc: psql-interfaces(at)postgresql(dot)org
>>> >> Subject: [pgsql-ayuda] PSQL ODBC & Visual Basic
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> Saludos a la lista...
>>> >>
>>> >>
>>> >>
>>> >> Estoy Manejando Postgres *version Linux 5.1 MX con Visual Basic
>>> 4.0 ,
>>> >> utilizando el  manejador  ODBC actual de Insight corp, ya los
>>> declare
>>> >> en mi se conecta a la base de datos, toma los datos de las 
>tablas
>>> >> respectivas e inserta renglones... pero cuando deseo hacer un
>>> UpDate
>>> >> o un delete de las mismas tablas, me dice VB que el objeto no 
es
>>> >> actualizable ( esto erroneo, debido a que cuando inserto 
>valores,
>>> >> tambien estoy escribiendo)... un pedazo de codigo  ejemplo 
para 
>un
>>> >> boton de comando cualquiera es el siguiente en un MsgBox....
>>> >>
>>> >> Private Sub Command4_Click()
>>> >> Dim db As Database
>>> >> Dim Comando As Variant
>>> >> Dim n As Integer
>>> >> Set db = OpenDatabase("PostgreSQL", False, False, "ODBC;")
>>> >> Comando = "delete from alumnos where nombre like 'Israel'"
>>> >> db.Execute Comando
>>> >> ' db.Execute "insert into students values ('Alejandro','23 
>anos')"
>>> >> db.Close
>>> >> End Sub
>>> >>
>>> >> Notese el comentario en la antepenultima linea
>>> >>
>>> >> ejecutado arroja el siguiente error :
>>> >>
>>> >> se ha producido el error 3073 de tiempo de ejecucion
>>> >> LA Operacion debe usar una consulta actualizable
>>> >>
>>> >>
>>> >> pero si comento del delete (update en su caso) y descomento el
>>> >> Insert, ya no marca ningun error , e inserta los valores en la
>>> >> tabla !!!!!!!!!
>>> >>
>>> >>
>>> >> El driver esta configurado para usar el usuario creador de la 
>base
>>> de
>>> >> datos (postgres) y el servidor tiene un archivo pg_hba.conf
>>> parecido
>>> >> al siguiente (pongo un pedazo, lo demas son comentarios):
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> # The above allows any user on the local system to connect to 
>any
>>> >> database
>>> >> # under any username.
>>> >>
>>> >> #host         template1   192.168.0.0   255.255.255.0     ident
>>> >> sameuser
>>> >>
>>> >> # The above allows any user from any host with IP address
>>> 192.168.0.x
>>> >> to
>>> >> # connect to database template1 as the same username that 
ident 
>on
>>> >> that host
>>> >> # identifies him as (typically his Unix username).
>>> >>
>>> >> #host         all        192.168.0.1   255.255.255.255   reject
>>> >> #host         all        0.0.0.0       0.0.0.0           trust
>>> >>
>>> >> # The above would allow anyone anywhere except from 
192.168.0.1 
>to
>>> >> connect to
>>> >> # any database under any username.
>>> >>
>>> >> #host         all        192.168.0.0  255.255.255.0      ident
>>> >> omicron
>>> >> #
>>> >> # The above would allow users from 192.168.0.x hosts to 
connect 
>to
>>> any
>>> >> # database, but if e.g. Ident says the user is "bryanh" and he
>>> >> requests to
>>> >> # connect as Postgres user "guest1", the connection is only
>>> allowed if
>>> >> # there is an entry for map "omicron" in pg_ident.conf that
>>> >> says "bryanh" is
>>> >> # allowed to connect as "guest1".
>>> >>
>>> >> # By default, allow anything over UNIX domain sockets and
>>> localhost.
>>> >>
>>> >> local        all                                         trust
>>> >> host         all         127.0.0.1     255.255.255.255   trust
>>> >> host         all         una-IP        255.255.255.255   trust
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> postgresql esta corriendo como postgres, y como se ve, uso el
>>> metodo
>>> >> OPENDATABASE via ODBC....
>>> >>
>>> >>
>>> >>
>>> >> alguna surgerencia u otro metodo mejor para tal efecto?
>>> >>
>>> >>
>>> >>
>>> >> Gracias
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> ______________________________________________________
>>> >> Get Your Private, Free Email at http://www.hotmail.com
>>> >> --------- Pie de mensaje --------------------------------------
-
>---
>>> -
>>> >> Archivo historico: 
http://tlali.iztacala.unam.mx/maillist/pgsql-
>>> ayuda
>>> >> Cancelar inscripcion:
>>> >> mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
>>> >> text   : cancelacion pgsql-ayuda
>>> >>
>>> >
>>>
>>>
>>> ______________________________________________________
>>> Get Your Private, Free Email at http://www.hotmail.com
>>>
>>
>
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text   : cancelacion pgsql-ayuda

pgsql-es-ayuda by date

Next:From: PostmasterDate: 1999-04-13 10:39:56
Subject: Re: [pgsql-ayuda] PSQL ODBC & Visual Basic
Previous:From: kovalskiDate: 1999-04-13 06:08:34
Subject: [pgsql-ayuda] Re: Base SQL distribuida

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group