From sandro@proservvi.com.br Mon Oct 4 19:10:44 2004 X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7AFB2329D9F for ; Mon, 4 Oct 2004 20:10:44 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 25321-01 for ; Mon, 4 Oct 2004 19:10:40 +0000 (GMT) Received: from prata.proservvi.com.br (unknown [200.232.120.179]) by svr1.postgresql.org (Postfix) with ESMTP id 4BA6C32A464 for ; Mon, 4 Oct 2004 20:10:38 +0100 (BST) Received: from localhost (localhost.localdomain [127.0.0.1]) by prata.proservvi.com.br (Postfix) with ESMTP id 4292C3B34E for ; Mon, 4 Oct 2004 16:10:13 -0300 (BRT) Received: from sandroyy (unknown [192.168.20.148]) by prata.proservvi.com.br (Postfix) with SMTP id 2568B3B32D for ; Mon, 4 Oct 2004 16:10:10 -0300 (BRT) Message-ID: <000e01c4aa46$2b35b830$9414a8c0@proservvi.com.br> From: "Sandro Yaqub Yusuf" To: Subject: Executing SP in VB6 Date: Mon, 4 Oct 2004 16:13:01 -0300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000B_01C4AA2D.059EA5F0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: by AMaViS 0.3.12pre8 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.7 tagged_above=0.0 required=5.0 tests=HTML_40_50, HTML_MESSAGE, UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200410/26 X-Sequence-Number: 4501 This is a multi-part message in MIME format. ------=_NextPart_000_000B_01C4AA2D.059EA5F0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, Please, I just trying search in all WEB SITES about using STORED PROCEDURES= with VISUAL BASIC, but I not found anything about this that can help me. I have a table: USERS with colums IDUSER, USER, PASSWORD, FULLNAME I need get the colum FULLNAME with parameter USER. How I do to create and execute a STORED PROCEDURE in VISUAL BASIC 6 to reso= lve this litle problem ? (please, forgiven my english because I living in B= RAZIL and not speak english). Thanks, Sandroyy ------=_NextPart_000_000B_01C4AA2D.059EA5F0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello,
 
Please, I just trying search in all W= EB SITES=20 about using STORED PROCEDURES with VISUAL BASIC, but I not found anyth= ing=20 about this that can help me.
 
I have a table: USERS with colums IDUSER, = USER,=20 PASSWORD, FULLNAME
I need get the colum FULLNAME with paramet= er=20 USER.
How I do to create and execute a STORED PR= OCEDURE=20 in VISUAL BASIC 6 to resolve this litle problem ? (please, forgiven my engl= ish=20 because I living in BRAZIL and not speak english).
 
Thanks,
 
Sandroyy
 
 
------=_NextPart_000_000B_01C4AA2D.059EA5F0-- From DGoulet@vicr.com Mon Oct 4 19:15:49 2004 X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 28DE432A481 for ; Mon, 4 Oct 2004 20:15:49 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 25906-05 for ; Mon, 4 Oct 2004 19:15:44 +0000 (GMT) Received: from smtpgate.vicr.com (smtpgate.vicr.com [207.141.187.5]) by svr1.postgresql.org (Postfix) with ESMTP id BA08032A45B for ; Mon, 4 Oct 2004 20:15:42 +0100 (BST) Received: from 25exch1.vicorpower.vicr.com ([172.20.20.30]) by exchgate.vicorpower.vicr.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 4 Oct 2004 15:15:38 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C4AA46.884EC3F4" Subject: Re: Executing SP in VB6 Date: Mon, 4 Oct 2004 15:15:38 -0400 Message-ID: <4001DEAF7DF9BD498B58B45051FBEA6501B9D50B@25exch1.vicorpower.vicr.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [ODBC] Executing SP in VB6 Thread-Index: AcSqRfbJ5+IZKMiKQb+T06o4YKMG3wAAGYVw From: "Goulet, Dick" To: "Sandro Yaqub Yusuf" , X-OriginalArrivalTime: 04 Oct 2004 19:15:38.0707 (UTC) FILETIME=[8875CA30:01C4AA46] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.9 tagged_above=0.0 required=5.0 tests=HTML_30_40, HTML_FONTCOLOR_BLUE, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200410/28 X-Sequence-Number: 4503 This is a multi-part message in MIME format. ------_=_NextPart_001_01C4AA46.884EC3F4 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable May I ask why you want to use a stored procedure? A simple "Select fullname from users where user =3D '';" should work just fine. =20 Dick Goulet Senior Oracle DBA Oracle Certified 8i DBA=20 =20 _____=20=20 From: Sandro Yaqub Yusuf [mailto:sandro@proservvi.com.br]=20 Sent: Monday, October 04, 2004 3:13 PM To: pgsql-odbc@postgresql.org Subject: [ODBC] Executing SP in VB6 Hello, =20 Please, I just trying search in all WEB SITES about using STORED PROCEDURES with VISUAL BASIC, but I not found anything about this that can help me. =20 I have a table: USERS with colums IDUSER, USER, PASSWORD, FULLNAME I need get the colum FULLNAME with parameter USER. How I do to create and execute a STORED PROCEDURE in VISUAL BASIC 6 to resolve this litle problem ? (please, forgiven my english because I living in BRAZIL and not speak english). =20 Thanks, =20 Sandroyy =20 =20 ------_=_NextPart_001_01C4AA46.884EC3F4 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
May I ask why you want to use a stored procedure?&= nbsp; A=20 simple "Select fullname from users where user =3D '<value>';" should = work=20 just fine.
 

Dick Goulet
Senior Oracle DBA
Oracle Certified 8i= =20 DBA

 


From: Sandro Yaqub Yusuf=20 [mailto:sandro@proservvi.com.br]
Sent: Monday, October 04, 2004 = 3:13=20 PM
To: pgsql-odbc@postgresql.org
Subject: [ODBC] Execut= ing=20 SP in VB6

Hello,
 
Please, I just trying search in all W= EB SITES=20 about using STORED PROCEDURES with VISUAL BASIC, but I not found anyth= ing=20 about this that can help me.
 
I have a table: USERS with colums IDUSER, = USER,=20 PASSWORD, FULLNAME
I need get the colum FULLNAME with paramet= er=20 USER.
How I do to create and execute a STORED PR= OCEDURE=20 in VISUAL BASIC 6 to resolve this litle problem ? (please, forgiven my engl= ish=20 because I living in BRAZIL and not speak english).
 
Thanks,
 
Sandroyy
 
 
------_=_NextPart_001_01C4AA46.884EC3F4-- From sandro@proservvi.com.br Mon Oct 4 19:22:14 2004 X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id EEC08329E3D for ; Mon, 4 Oct 2004 20:22:14 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 29262-01 for ; Mon, 4 Oct 2004 19:22:10 +0000 (GMT) Received: from prata.proservvi.com.br (unknown [200.232.120.179]) by svr1.postgresql.org (Postfix) with ESMTP id 9E2DC329CA4 for ; Mon, 4 Oct 2004 20:22:09 +0100 (BST) Received: from localhost (localhost.localdomain [127.0.0.1]) by prata.proservvi.com.br (Postfix) with ESMTP id 0AAB63B369; Mon, 4 Oct 2004 16:21:44 -0300 (BRT) Received: from sandroyy (unknown [192.168.20.148]) by prata.proservvi.com.br (Postfix) with SMTP id 68FF93B337; Mon, 4 Oct 2004 16:21:41 -0300 (BRT) Message-ID: <002c01c4aa47$c7438f30$9414a8c0@proservvi.com.br> From: "Sandro Yaqub Yusuf" To: "Goulet, Dick" Cc: References: <4001DEAF7DF9BD498B58B45051FBEA6501B9D50B@25exch1.vicorpower.vicr.com> Subject: Re: Executing SP in VB6 Date: Mon, 4 Oct 2004 16:24:33 -0300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0029_01C4AA2E.A1B863D0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: by AMaViS 0.3.12pre8 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.6 tagged_above=0.0 required=5.0 tests=HTML_40_50, HTML_FONTCOLOR_BLUE, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200410/29 X-Sequence-Number: 4504 This is a multi-part message in MIME format. ------=_NextPart_000_0029_01C4AA2E.A1B863D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello my friend, That is simple. I work developing programs in Visual Basic using complex St= ored Procedures in SQL-SERVER 7/2000. I want to make STORED PROCEDURES in PostGresQL using Visual Basic 6. I need= one example to begin. Thanks, Sandroyy ----- Original Message -----=20 From: Goulet, Dick=20 To: Sandro Yaqub Yusuf ; pgsql-odbc@postgresql.org=20 Sent: Monday, October 04, 2004 4:15 PM Subject: RE: [ODBC] Executing SP in VB6 May I ask why you want to use a stored procedure? A simple "Select fulln= ame from users where user =3D '';" should work just fine. Dick Goulet Senior Oracle DBA Oracle Certified 8i DBA=20 ---------------------------------------------------------------------------= --- From: Sandro Yaqub Yusuf [mailto:sandro@proservvi.com.br]=20 Sent: Monday, October 04, 2004 3:13 PM To: pgsql-odbc@postgresql.org Subject: [ODBC] Executing SP in VB6 Hello, Please, I just trying search in all WEB SITES about using STORED PROCEDUR= ES with VISUAL BASIC, but I not found anything about this that can help me. I have a table: USERS with colums IDUSER, USER, PASSWORD, FULLNAME I need get the colum FULLNAME with parameter USER. How I do to create and execute a STORED PROCEDURE in VISUAL BASIC 6 to re= solve this litle problem ? (please, forgiven my english because I living in= BRAZIL and not speak english). Thanks, Sandroyy ------=_NextPart_000_0029_01C4AA2E.A1B863D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello my friend,
 
That is simple. I work developing programs= in=20 Visual Basic using complex Stored Procedures in SQL-SERVER 7/2000.
I want to make STORED PROCEDURES in PostGr= esQL=20 using Visual Basic 6. I need one example to begin.
 
Thanks,
 
Sandroyy
----- Original Message -----
Fro= m:=20 Goulet, Dick= =20
To: Sandro Yaqub Yusuf ; pgsql-odbc@postgresql.org <= /DIV>
Sent: Monday, October 04, 2004 4:1= 5=20 PM
Subject: RE: [ODBC] Executing SP i= n=20 VB6

May I ask why you want to use a stored procedure= ?  A=20 simple "Select fullname from users where user =3D '<value>';" shoul= d work=20 just fine.
 

Dick Goulet
Senior Oracle DBA
Oracle Certified 8i= =20 DBA

 


From: Sandro Yaqub Yusuf=20 [mailto:sandro@proservvi.com.br]
Sent: Monday, October 04, 200= 4=20 3:13 PM
To: pgsql-odbc@postgresql.orgSubject:=20 [ODBC] Executing SP in VB6

Hello,
 
Please, I just trying search in all= WEB=20 SITES about using STORED PROCEDURES with VISUAL BASIC, but I not fou= nd=20 anything about this that can help me.
 
I have a table: USERS with colums IDUSER= , USER,=20 PASSWORD, FULLNAME
I need get the colum FULLNAME with param= eter=20 USER.
How I do to create and execute a STORED = PROCEDURE=20 in VISUAL BASIC 6 to resolve this litle problem ? (please, forgiven my en= glish=20 because I living in BRAZIL and not speak english).
 
Thanks,
 
Sandroyy
 
 
<= /HTML> ------=_NextPart_000_0029_01C4AA2E.A1B863D0-- From sandro@proservvi.com.br Mon Oct 4 21:50:29 2004 X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8642C32A17A for ; Mon, 4 Oct 2004 22:50:29 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 73545-09 for ; Mon, 4 Oct 2004 21:50:24 +0000 (GMT) Received: from prata.proservvi.com.br (unknown [200.232.120.179]) by svr1.postgresql.org (Postfix) with ESMTP id 63B5032A179 for ; Mon, 4 Oct 2004 22:50:24 +0100 (BST) Received: from localhost (localhost.localdomain [127.0.0.1]) by prata.proservvi.com.br (Postfix) with ESMTP id 944E33B361; Mon, 4 Oct 2004 18:50:01 -0300 (BRT) Received: from sandroyy (unknown [192.168.20.148]) by prata.proservvi.com.br (Postfix) with SMTP id AAF8A3B360; Mon, 4 Oct 2004 18:49:59 -0300 (BRT) Message-ID: <007d01c4aa5c$806396e0$9414a8c0@proservvi.com.br> From: "Sandro Yaqub Yusuf" To: "Rick Sivernell" Cc: References: <4001DEAF7DF9BD498B58B45051FBEA6501B9D50B@25exch1.vicorpower.vicr.com><002c01c4aa47$c7438f30$9414a8c0@proservvi.com.br> <20041004160742.18064e16@RickSivernell> Subject: Re: Executing SP in VB6 Date: Mon, 4 Oct 2004 18:52:53 -0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: by AMaViS 0.3.12pre8 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/38 X-Sequence-Number: 4513 Hello my friend, I know. I have worked with VB about 6 years. I´m using ACCESS, ORACLE, SQL_SERVER, XBASE integrated with Visual Basic. Now, for my experience, I would like to use PostGresQL with VB6. OK ??!! Thanks for you colaboration. Sandroyy ----- Original Message ----- From: "Rick Sivernell" To: "Sandro Yaqub Yusuf" Sent: Monday, October 04, 2004 1:07 PM Subject: Re: [ODBC] Executing SP in VB6 > On Mon, 4 Oct 2004 16:24:33 -0300 > "Sandro Yaqub Yusuf" wrote: > >> Hello my friend, >> >> That is simple. I work developing programs in Visual Basic using complex >> Stored >> Procedures in SQL-SERVER 7/2000. I want to make STORED PROCEDURES in >> PostGresQL >> using Visual Basic 6. I need one example to begin. >> >> Thanks, >> >> Sandroyy >> ----- Original Message ----- >> From: Goulet, Dick >> To: Sandro Yaqub Yusuf ; pgsql-odbc@postgresql.org >> Sent: Monday, October 04, 2004 4:15 PM >> Subject: RE: [ODBC] Executing SP in VB6 >> >> >> May I ask why you want to use a stored procedure? A simple "Select >> fullname from >> users where user = '';" should work just fine. >> >> Dick Goulet >> Senior Oracle DBA >> Oracle Certified 8i DBA >> >> >> >> >> >> ------------------------------------------------------------------------------ >> From: Sandro Yaqub Yusuf [mailto:sandro@proservvi.com.br] >> Sent: Monday, October 04, 2004 3:13 PM >> To: pgsql-odbc@postgresql.org >> Subject: [ODBC] Executing SP in VB6 >> >> >> Hello, >> >> Please, I just trying search in all WEB SITES about using STORED >> PROCEDURES with >> VISUAL BASIC, but I not found anything about this that can help me. >> >> I have a table: USERS with colums IDUSER, USER, PASSWORD, FULLNAME >> I need get the colum FULLNAME with parameter USER. >> How I do to create and execute a STORED PROCEDURE in VISUAL BASIC 6 to >> resolve >> this litle problem ? (please, forgiven my english because I live in >> BRAZIL and >> not speak english). >> >> Thanks, >> >> Sandroyy >> >> > Sandro > > You do not need to use stored procedure, VB has database objects for you > to use. > Personally I would use C++ and OLE DB. It is much better, faster and if > you are > working across OSes, you still connect to db using odbc. From your > description your > are on M$. ODBC or OLE DB do not care what the database is, as long as > there is a ODBC > driver. There are plenty of examples in books and on the net. > > cheers > > -- > Rick Sivernell > Dallas, Texas 75287 > 972 306-2296 > res005ru@verizon.net > Gentoo Linux > Registered Linux User #193859 > > .~. > / v \ > /( _ )\ > ^ ^ > In Linux we trust! From aayers@eldocomp.com Mon Oct 4 23:29:25 2004 X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CBAEA32A283 for ; Tue, 5 Oct 2004 00:29:25 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 98410-05 for ; Mon, 4 Oct 2004 23:29:19 +0000 (GMT) Received: from ecintweb.eldocomp.com (ecintweb.eldocomp.com [205.159.99.8]) by svr1.postgresql.org (Postfix) with ESMTP id D0452329FA3 for ; Tue, 5 Oct 2004 00:29:20 +0100 (BST) Received: by ecintweb.eldocomp.com with XWall v3.29f ; Mon, 4 Oct 2004 16:29:18 -0700 From: Andrew Ayers To: PostgreSQL ODBC List Subject: Re: Executing SP in VB6 Date: Mon, 4 Oct 2004 16:29:18 -0700 X-Assembled-By: XWall v3.29f Message-ID: <4161DCCE.6070502@eldocomp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.2 tagged_above=0.0 required=5.0 tests=EXCUSE_16, LINES_OF_YELLING X-Spam-Level: X-Archive-Number: 200410/39 X-Sequence-Number: 4514 Sandro Yaqub Yusuf wrote: > Hello my friend, >=20 > I know. > I have worked with VB about 6 years. I=B4m using ACCESS, ORACLE,=20 > SQL_SERVER, XBASE integrated with Visual Basic. > Now, for my experience, I would like to use PostGresQL with VB6. OK ??!! Yes, it is possible to use PostgreSQL with VB6, via ODBC (I have posted=20 numerous times in the past on this - see the archives if you are=20 interested, I am not going to repeat myself here) - I am doing it as we=20 speak. But I don't think this is what you are asking. If I am understanding you correctly, you are wanting to code stored=20 procedures in VB and load them into your PostgreSQL DB, correct? As far=20 as I know, this is *not* possible. You can, however, write SP's using=20 PL/PgSQL, which is similar to PL on Oracle, from what I understand. Once you have your SP written, there should be a way to call/use it via=20 ODBC. I have never done this, but I did find this post, which may give=20 you some help: http://archives.postgresql.org/pgsql-novice/2004-04/msg00050.php Andrew Ayers > ----- Original Message ----- From: "Rick Sivernell" > To: "Sandro Yaqub Yusuf" > Sent: Monday, October 04, 2004 1:07 PM > Subject: Re: [ODBC] Executing SP in VB6 >=20 >=20 >> On Mon, 4 Oct 2004 16:24:33 -0300 >> "Sandro Yaqub Yusuf" wrote: >> >>> Hello my friend, >>> >>> That is simple. I work developing programs in Visual Basic using=20 >>> complex Stored >>> Procedures in SQL-SERVER 7/2000. I want to make STORED PROCEDURES in=20 >>> PostGresQL >>> using Visual Basic 6. I need one example to begin. >>> >>> Thanks, >>> >>> Sandroyy >>> ----- Original Message ----- From: Goulet, Dick >>> To: Sandro Yaqub Yusuf ; pgsql-odbc@postgresql.org >>> Sent: Monday, October 04, 2004 4:15 PM >>> Subject: RE: [ODBC] Executing SP in VB6 >>> >>> >>> May I ask why you want to use a stored procedure? A simple "Select= =20 >>> fullname from >>> users where user =3D '';" should work just fine. >>> >>> Dick Goulet >>> Senior Oracle DBA >>> Oracle Certified 8i DBA >>> >>> >>> >>> >>> >>> -----------------------------------------------------------------------= -------=20 >>> >>> From: Sandro Yaqub Yusuf [mailto:sandro@proservvi.com.br] >>> Sent: Monday, October 04, 2004 3:13 PM >>> To: pgsql-odbc@postgresql.org >>> Subject: [ODBC] Executing SP in VB6 >>> >>> >>> Hello, >>> >>> Please, I just trying search in all WEB SITES about using STORED=20 >>> PROCEDURES with >>> VISUAL BASIC, but I not found anything about this that can help me. >>> >>> I have a table: USERS with colums IDUSER, USER, PASSWORD, FULLNAME >>> I need get the colum FULLNAME with parameter USER. >>> How I do to create and execute a STORED PROCEDURE in VISUAL BASIC 6= =20 >>> to resolve >>> this litle problem ? (please, forgiven my english because I live in= =20 >>> BRAZIL and >>> not speak english). >>> >>> Thanks, >>> >>> Sandroyy >>> >>> >> Sandro >> >> You do not need to use stored procedure, VB has database objects for= =20 >> you to use. >> Personally I would use C++ and OLE DB. It is much better, faster and=20 >> if you are >> working across OSes, you still connect to db using odbc. From your=20 >> description your >> are on M$. ODBC or OLE DB do not care what the database is, as long as= =20 >> there is a ODBC >> driver. There are plenty of examples in books and on the net. >> >> cheers >> >> --=20 >> Rick Sivernell >> Dallas, Texas 75287 >> 972 306-2296 >> res005ru@verizon.net >> Gentoo Linux >> Registered Linux User #193859 >> >> .~. >> / v \ >> /( _ )\ >> ^ ^ >> In Linux we trust!=20 >=20 >=20 >=20 > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? >=20 > http://www.postgresql.org/docs/faqs/FAQ.html >=20 >=20 >=20 -- CONFIDENTIALITY NOTICE -- This message is intended for the sole use of the individual and entity to w= hom it is addressed, and may contain information that is privileged, confid= ential and exempt from disclosure under applicable law. If you are not the = intended addressee, nor authorized to receive for the intended addressee, y= ou are hereby notified that you may not use, copy, disclose or distribute t= o anyone the message or any information contained in the message. If you ha= ve received this message in error, please immediately advise the sender by = reply email, and delete the message. Thank you. From iain@mst.co.jp Tue Oct 5 01:32:30 2004 X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0092C32A280 for ; Tue, 5 Oct 2004 02:32:30 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 25413-02 for ; Tue, 5 Oct 2004 01:32:21 +0000 (GMT) Received: from millenium.mst.co.jp (unknown [210.230.185.241]) by svr1.postgresql.org (Postfix) with ESMTP id 7EAB832A260 for ; Tue, 5 Oct 2004 02:32:20 +0100 (BST) Received: from mst1x5r347kymb (lc12114 [192.168.1.114]) by millenium.mst.co.jp (8.11.6p2/3.7W) with SMTP id i951Vrq00018; Tue, 5 Oct 2004 10:31:53 +0900 Message-ID: <009901c4aa7b$1c0d75c0$7201a8c0@mst1x5r347kymb> From: "Iain" To: "Sandro Yaqub Yusuf" Cc: References: <4001DEAF7DF9BD498B58B45051FBEA6501B9D50B@25exch1.vicorpower.vicr.com> <002c01c4aa47$c7438f30$9414a8c0@proservvi.com.br> Subject: Re: Executing SP in VB6 Date: Tue, 5 Oct 2004 10:31:54 +0900 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0095_01C4AAC6.88B9C8E0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.2 tagged_above=0.0 required=5.0 tests=HTML_60_70, HTML_FONTCOLOR_BLUE, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200410/41 X-Sequence-Number: 4516 This is a multi-part message in MIME format. ------=_NextPart_000_0095_01C4AAC6.88B9C8E0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit I've never done it either, but I have some code (which incidentally I got from asktom.oracle.com) that you may be able to adapt. The original code uses a simple select and bind variables. Because it uses binds it should be easy to adapt to a SP's parameters: Sub ParameterExample() Dim cmd As New ADODB.Command Dim rs As New ADODB.Recordset Dim prm As ADODB.Parameter cmd.ActiveConnection = Provider=OraOLEDB.Oracle;User ID=scott;Password=tiger;Data Source=oraDSN; ' Set the command's text, and specify that it is an SQL statement. cmd.CommandText = "SELECT item_name FROM v_syouhin_info WHERE deptno = ?" cmd.CommandType = adCmdText ' Set up a new parameter for the select. Set prm = cmd.CreateParameter("deptno", adInteger, adParamInput, , 10) cmd.Parameters.Append prm ' Create a recordset by executing the command. Set rs = cmd.Execute ' Loop through the recordset and print the first field. Do While Not rs.EOF Debug.Print rs(0) rs.MoveNext Loop ' Close the recordset. rs.Close End Sub Modify it as follows to use a stored procedure: Sub ParameterExample() Dim cmd As New ADODB.Command Dim rs As New ADODB.Recordset Dim prm As ADODB.Parameter cmd.ActiveConnection = Provider=OraOLEDB.Oracle;User ID=scott;Password=tiger;Data Source=oraDSN; ' Set the command's text, and specify that it is an SQL statement. cmd.CommandText = "STORED_PROCEDURE_NAME" ' <-- changed cmd.CommandType = adCmdStoredProc ' <-- changed this part too ' Set up a new parameter for the select. Set prm = cmd.CreateParameter("deptno", adInteger, adParamInput, , 10) cmd.Parameters.Append prm ' Create a recordset by executing the command. Set rs = cmd.Execute ' Loop through the recordset and print the first field. Do While Not rs.EOF Debug.Print rs(0) rs.MoveNext Loop ' Close the recordset. rs.Close End Sub In the second case the stored procedure has one in parameter which is deptno and the out parameter (or possibly the function return) is a result set. As I said, I havn't tried it myself, so I'd be interested to know if you get it working on PG. Regards Iain ----- Original Message ----- From: Sandro Yaqub Yusuf To: Goulet, Dick Cc: pgsql-odbc@postgresql.org Sent: Tuesday, October 05, 2004 4:24 AM Subject: Re: [ODBC] Executing SP in VB6 Hello my friend, That is simple. I work developing programs in Visual Basic using complex Stored Procedures in SQL-SERVER 7/2000. I want to make STORED PROCEDURES in PostGresQL using Visual Basic 6. I need one example to begin. Thanks, Sandroyy ----- Original Message ----- From: Goulet, Dick To: Sandro Yaqub Yusuf ; pgsql-odbc@postgresql.org Sent: Monday, October 04, 2004 4:15 PM Subject: RE: [ODBC] Executing SP in VB6 May I ask why you want to use a stored procedure? A simple "Select fullname from users where user = '';" should work just fine. Dick Goulet Senior Oracle DBA Oracle Certified 8i DBA ---------------------------------------------------------------------------- From: Sandro Yaqub Yusuf [mailto:sandro@proservvi.com.br] Sent: Monday, October 04, 2004 3:13 PM To: pgsql-odbc@postgresql.org Subject: [ODBC] Executing SP in VB6 Hello, Please, I just trying search in all WEB SITES about using STORED PROCEDURES with VISUAL BASIC, but I not found anything about this that can help me. I have a table: USERS with colums IDUSER, USER, PASSWORD, FULLNAME I need get the colum FULLNAME with parameter USER. How I do to create and execute a STORED PROCEDURE in VISUAL BASIC 6 to resolve this litle problem ? (please, forgiven my english because I living in BRAZIL and not speak english). Thanks, Sandroyy ------=_NextPart_000_0095_01C4AAC6.88B9C8E0 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable
I've never done it either, but I = have some=20 code (which incidentally I got from asktom.oracle.com) that you may be able= to=20 adapt. The original code uses a simple select and bind variables. Because i= t=20 uses binds it should be easy to adapt to a SP's parameters:
 

Sub ParameterExample()

&nbs= p; =20 Dim cmd As New ADODB.Command

&nbs= p; =20 Dim rs As New ADODB.Recordset

&nbs= p; =20 Dim prm As ADODB.Parameter

 &nbs= p;=20

&nbs= p; =20 cmd.ActiveConnection =3D Provider=3DOraOLEDB.Oracle;User=20 ID=3Dscott;Password=3Dtiger;Data Source=3DoraDSN;

&nbs= p; =20 ' Set the command's text, and specify that it is an SQL=20 statement.

&nbs= p; =20 cmd.CommandText =3D "SELECT item_name FROM v_syouhin_info WHERE dept= no =3D=20 ?"

&nbs= p; =20 cmd.CommandType =3D adCmdText

 

&nbs= p; =20 ' Set up a new parameter for the select.

&nbs= p; =20 Set prm =3D cmd.CreateParameter("deptno", adInteger, adParamInput, ,= =20 10)

&nbs= p; =20 cmd.Parameters.Append prm

 =

&nbs= p; =20 ' Create a recordset by executing the command.<= /P>

&nbs= p; =20 Set rs =3D cmd.Execute

 &nbs= p;=20

&nbs= p; =20 ' Loop through the recordset and print the first=20 field.

&nbs= p; =20 Do While Not rs.EOF

      Debug.Pri= nt=20 rs(0)

     =20 rs.MoveNext

&nbs= p; =20 Loop

 &nbs= p;=20

&nbs= p; =20 ' Close the recordset.

&nbs= p; =20 rs.Close

 =

End Sub

 
 
    Modify it= as=20 follows to use a stored procedure:
 

Sub ParameterExample()

&nbs= p; =20 Dim cmd As New ADODB.Command

&nbs= p; =20 Dim rs As New ADODB.Recordset

&nbs= p; =20 Dim prm As ADODB.Parameter

 &nbs= p;=20

&nbs= p; =20 cmd.ActiveConnection =3D Provider=3DOraOLEDB.Oracle;User=20 ID=3Dscott;Password=3Dtiger;Data Source=3DoraDSN;

&nbs= p; =20 ' Set the command's text, and specify that it is an SQL=20 statement.

&nbs= p; =20 cmd.CommandText =3D "STORED_PROCEDURE_NAME"    ' <= --=20 changed

&nbs= p; =20 cmd.CommandType =3D adCmdStoredProc     '=20 <-- changed this part too

 =

&nbs= p; =20 ' Set up a new parameter for the select.

&nbs= p; =20 Set prm =3D cmd.CreateParameter("deptno", adInteger, adParamInput, ,= =20 10)

&nbs= p; =20 cmd.Parameters.Append prm

 =

&nbs= p; =20 ' Create a recordset by executing the command.<= /P>

&nbs= p; =20 Set rs =3D cmd.Execute

 &nbs= p;=20

&nbs= p; =20 ' Loop through the recordset and print the first=20 field.

&nbs= p; =20 Do While Not rs.EOF

      Debug.Pri= nt=20 rs(0)

     =20 rs.MoveNext

&nbs= p; =20 Loop

 &nbs= p;=20

&nbs= p; =20 ' Close the recordset.

&nbs= p; =20 rs.Close

 =

End Sub

 
In the second case the stored pro= cedure=20 has one in parameter which is deptno and the out parameter (or possibly the= =20 function return) is a result set.
 
As I said, I havn't tried it myse= lf, so=20 I'd be interested to know if you get it working on PG.
 
Regards
Iain
 
 
----- Original Message -----
From:=20 Sandro=20 Yaqub Yusuf
Cc: pgsql-odbc@postgresql.org <= /DIV>
Sent: Tuesday, October 05, = 2004=20 4:24 AM
Subject: Re: [ODBC] Executi= ng SP=20 in VB6

Hello my friend,
 
That is simple. I work developing progra= ms in=20 Visual Basic using complex Stored Procedures in SQL-SERVER=20 7/2000.
I want to make STORED PROCEDURES in Post= GresQL=20 using Visual Basic 6. I need one example to begin.
 
Thanks,
 
Sandroyy
----- Original Message -----
F= rom:=20 Goulet, Di= ck=20
To: Sandro Yaqub Yusuf ; pgsql-odbc@postgresql.org=
Sent: Monday, October 04, 2004 4= :15=20 PM
Subject: RE: [ODBC] Executing SP= in=20 VB6

May I ask why you want to use a stored procedu= re? =20 A simple "Select fullname from users where user =3D '<value>';" s= hould=20 work just fine.
 

Dick Goulet
Senior Oracle DBA
Oracle Certified = 8i=20 DBA

 


From: Sandro Yaqub Yusuf=20 [mailto:sandro@proservvi.com.br]
Sent: Monday, October 04, 2= 004=20 3:13 PM
To: pgsql-odbc@postgresql.org=
Subject:=20 [ODBC] Executing SP in VB6

Hello,
 
Please, I just trying search in a= ll WEB=20 SITES about using STORED PROCEDURES with VISUAL BASIC, but I not f= ound=20 anything about this that can help me.
 
I have a table: USERS with colums IDUS= ER, USER,=20 PASSWORD, FULLNAME
I need get the colum FULLNAME with par= ameter=20 USER.
How I do to create and execute a STORE= D=20 PROCEDURE in VISUAL BASIC 6 to resolve this litle problem ? (please,=20 forgiven my english because I living in BRAZIL and not speak=20 english).
 
Thanks,
 
Sandroyy
 
 
------=_NextPart_000_0095_01C4AAC6.88B9C8E0-- From iain@mst.co.jp Tue Oct 5 02:07:34 2004 X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B7A3C329F9C for ; Tue, 5 Oct 2004 03:07:34 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 32619-08 for ; Tue, 5 Oct 2004 02:07:24 +0000 (GMT) Received: from millenium.mst.co.jp (unknown [210.230.185.241]) by svr1.postgresql.org (Postfix) with ESMTP id E0A0A329F4E for ; Tue, 5 Oct 2004 03:07:27 +0100 (BST) Received: from mst1x5r347kymb (lc12114 [192.168.1.114]) by millenium.mst.co.jp (8.11.6p2/3.7W) with SMTP id i9527Cq00167; Tue, 5 Oct 2004 11:07:12 +0900 Message-ID: <001601c4aa80$0b157d30$7201a8c0@mst1x5r347kymb> From: "Iain" To: "Sandro Yaqub Yusuf" Cc: References: <4001DEAF7DF9BD498B58B45051FBEA6501B9D50B@25exch1.vicorpower.vicr.com> <002c01c4aa47$c7438f30$9414a8c0@proservvi.com.br> Subject: Re: Executing SP in VB6 Date: Tue, 5 Oct 2004 11:07:14 +0900 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="ISO-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/42 X-Sequence-Number: 4517 Hi Yusef, I just realized that it probably isn't the VB code you wanted to see, but the pg stored procedure code. I don't have an example on hand, but presumably all you have to do is return a ref cursor from you pg procedure and the same VB code that you used for sql server would work on pg. Maybe... Anyway, I think that you should check the docs for "refcursor" - maybe section 37.8 and see if that is what you are looking for. Regards Iain ----- Original Message ----- From: Sandro Yaqub Yusuf To: Goulet, Dick Cc: pgsql-odbc@postgresql.org Sent: Tuesday, October 05, 2004 4:24 AM Subject: Re: [ODBC] Executing SP in VB6 Hello my friend, That is simple. I work developing programs in Visual Basic using complex Stored Procedures in SQL-SERVER 7/2000. I want to make STORED PROCEDURES in PostGresQL using Visual Basic 6. I need one example to begin. Thanks, Sandroyy ----- Original Message ----- From: Goulet, Dick To: Sandro Yaqub Yusuf ; pgsql-odbc@postgresql.org Sent: Monday, October 04, 2004 4:15 PM Subject: RE: [ODBC] Executing SP in VB6 May I ask why you want to use a stored procedure? A simple "Select fullname from users where user = '';" should work just fine. Dick Goulet Senior Oracle DBA Oracle Certified 8i DBA From: Sandro Yaqub Yusuf [mailto:sandro@proservvi.com.br] Sent: Monday, October 04, 2004 3:13 PM To: pgsql-odbc@postgresql.org Subject: [ODBC] Executing SP in VB6 Hello, Please, I just trying search in all WEB SITES about using STORED PROCEDURES with VISUAL BASIC, but I not found anything about this that can help me. I have a table: USERS with colums IDUSER, USER, PASSWORD, FULLNAME I need get the colum FULLNAME with parameter USER. How I do to create and execute a STORED PROCEDURE in VISUAL BASIC 6 to resolve this litle problem ? (please, forgiven my english because I living in BRAZIL and not speak english). Thanks, Sandroyy From philippe.lang@attiksystem.ch Tue Oct 5 06:45:21 2004 X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C384F32A2BB for ; Tue, 5 Oct 2004 07:45:21 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 90206-09 for ; Tue, 5 Oct 2004 06:45:15 +0000 (GMT) Received: from poweredge.attiksystem.ch (adsl-soholight-4-c59-p029.vtx.ch [212.147.59.29]) by svr1.postgresql.org (Postfix) with ESMTP id 4D831329E12 for ; Tue, 5 Oct 2004 07:45:11 +0100 (BST) Subject: Re: Executing SP in VB6 Date: Tue, 5 Oct 2004 08:45:10 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-ID: <6C0CF58A187DA5479245E0830AF84F4208041D@poweredge.attiksystem.ch> X-MS-Has-Attach: X-MS-TNEF-Correlator: X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 Thread-Topic: [ODBC] Executing SP in VB6 content-class: urn:content-classes:message Thread-Index: AcSqRfZpxjz6eu9LRGC9u69cwafe4wAXo1hA From: "Philippe Lang" To: "Sandro Yaqub Yusuf" , X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.5 tagged_above=0.0 required=5.0 tests=WEIRD_QUOTING X-Spam-Level: X-Archive-Number: 200410/44 X-Sequence-Number: 4519 Hello Sandro. Good idea to use stored procedures. I'm using MS Access, so I= guess you may have to adapt the code a bit... This code uses DAO, not ADO or whatever. I hope it will help you. Here we are: 1) The stored procedure: ------------------------ CREATE FUNCTION public.search_your_tbl_name(varchar) RETURNS SETOF your_tbl_name AS ' SELECT * FROM public.your_tbl_name WHERE lower(id) LIKE lower($1) OR lower(foo1) LIKE lower($1) OR lower(foo2) LIKE lower($1) OR lower(foo3) LIKE lower($1) OR lower(foo4) LIKE lower($1) ORDER BY foo2 LIMIT 50 ' LANGUAGE 'sql' VOLATILE; 2) The VBA code: ---------------- Public Function global_dsn_name() As String global_dsn_name =3D "your_dns_name" End Function Sub query_run(query As String, p As String) On Error GoTo query_runError Dim MyWorkspace As DAO.Workspace Dim MyConnection As DAO.Connection Dim MyRecordset As DAO.Recordset Dim MySQLString As String Dim MyODBCConnectString As String =20=20=20=20 Set MyWorkspace =3D CreateWorkspace("ODBCWorkspace", "", "", dbUseODBC) MyODBCConnectString =3D "ODBC;DSN=3D" & global_dsn_name() & ";" Set MyConnection =3D MyWorkspace.OpenConnection("Connection1", dbDriver= NoPrompt, , MyODBCConnectString) MySQLString =3D "SELECT * FROM public." & """" & query & """" & "('" & = p & "');" Set MyRecordset =3D MyConnection.OpenRecordset(MySQLString, dbOpenDynam= ic) =20=20=20=20 With MyRecordset Do While Not .EOF =20=20=20=20=20=20=20=20 Debug.Print _ MyRecordset("id") & " / " & _ MyRecordset("foo1") & " / " & _ MyRecordset("foo2") & " / " & _ MyRecordset("foo3") & " / " & _ MyRecordset("foo4") =20=20=20=20=20=20=20=20=20=20=20=20 .MoveNext Loop End With =20=20=20=20 MyRecordset.Close Set MyRecordset =3D Nothing =20=20=20=20 MyConnection.Close Set MyConnection =3D Nothing =20=20=20=20 MyWorkspace.Close Set MyWorkspace =3D Nothing query_runExit: Exit Sub query_runError: MsgBox "Error in query_run." Resume query_runExit End Sub=20 3) How you use it: ------------------ query_run("search_your_tbl_name", "test%") 4) MS Access & reports: ----------------------- The problem with MS Access is that sometimes you may want to use the result= of your stored procedure in a report, for example. In this case, you have = to store the query instead of simply running it. You won't need this with V= B6, but I put the code here also, it might help others. Sub search_store(query As String, p As String) On Error GoTo search_storeError Dim MyDatabase As DAO.DataBase Dim MyQueryDef As DAO.QueryDef =20=20=20=20 Set MyDatabase =3D CurrentDb() If (QueryExists(query)) Then MyDatabase.QueryDefs.Delete query Set MyQueryDef =3D MyDatabase.CreateQueryDef(query) MyQueryDef.Connect =3D "ODBC;DSN=3D" & global_dsn_name() & ";" MyQueryDef.SQL =3D "SELECT * FROM public." & """" & query & """" & "('"= & p & "');" MyQueryDef.ReturnsRecords =3D True =20=20=20=20 MyQueryDef.Close Set MyQueryDef =3D Nothing =20=20=20=20 MyDatabase.Close Set MyDatabase =3D Nothing =20=20=20=20 search_storeExit: Exit Sub search_storeError: MsgBox "Error in search_store." Resume search_storeExit End Sub This routine creates a querydef called "search_your_tbl_name" you can incor= porate in a report. ________________________________ De : pgsql-odbc-owner@postgresql.org [mailto:pgsql-odbc-owner@postgresql.or= g] De la part de Sandro Yaqub Yusuf Envoy=E9 : lundi, 4. octobre 2004 21:13 =C0 : pgsql-odbc@postgresql.org Objet : [ODBC] Executing SP in VB6 Hello, =20 Please, I just trying search in all WEB SITES about using STORED PROCEDURES= with VISUAL BASIC, but I not found anything about this that can help me. =20 I have a table: USERS with colums IDUSER, USER, PASSWORD, FULLNAME I need get the colum FULLNAME with parameter USER. How I do to create and execute a STORED PROCEDURE in VISUAL BASIC 6 to reso= lve this litle problem ? (please, forgiven my english because I living in B= RAZIL and not speak english). =20 Thanks, =20 Sandroyy =20