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 E087A329F49 for ; Tue, 5 Oct 2004 15:32:55 +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 25583-07 for ; Tue, 5 Oct 2004 14:32:49 +0000 (GMT) Received: from prata.proservvi.com.br (unknown [200.232.120.179]) by svr1.postgresql.org (Postfix) with ESMTP id 27A3E329F18 for ; Tue, 5 Oct 2004 15:32:47 +0100 (BST) Received: from localhost (localhost.localdomain [127.0.0.1]) by prata.proservvi.com.br (Postfix) with ESMTP id 6C2763B2C3 for ; Tue, 5 Oct 2004 11:32:20 -0300 (BRT) Received: from sandroyy (unknown [192.168.20.148]) by prata.proservvi.com.br (Postfix) with SMTP id 141763B2C6 for ; Tue, 5 Oct 2004 11:32:19 -0300 (BRT) Message-ID: <002d01c4aae8$851e0c10$9414a8c0@proservvi.com.br> From: "Sandro Yaqub Yusuf" To: References: <6C0CF58A187DA5479245E0830AF84F4208041D@poweredge.attiksystem.ch> Subject: Thanks - Part One - Re: Executing SP in VB6 Date: Tue, 5 Oct 2004 11:35:11 -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.3 tagged_above=0.0 required=5.0 tests=UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200410/53 X-Sequence-Number: 4528 Hello my dears friends, Thanks for yours colaborations. Itīs here the part of solution about my problem with colaboration of everbody that help me (Philippe Lang, Iain, Andrew Ayers, Rick Sivernell, Corey W. Gibbs): --------------------------------------------------------------------------------------------------------------------------------------- POSTGRESQL: CREATE OR REPLACE FUNCTION sp_user_search(varchar) RETURNS SETOF user AS ' select * from user where user = $1' LANGUAGE 'sql' VOLATILE; --------------------------------------------------------------------------------------------------------------------------------------- VISUAL BASIC 6 with ADO 2.8 without STORED PROCEDURE: Dim adoBD As ADODB.Connection Dim rsTB As New ADODB.Recordset Set adoBD = New ADODB.Connection adoBD.ConnectionString = "driver=PostgreSQL};server=localhost;database=SICCEV;port=5432;uid=ryan;pwd=displace;" adoBD.Open Set rsTB = adoBD.Execute("select * from user where user = 'Sandro';") Do While Not rsTB.EOF MsgBox rsTB!Usuario rsTB.MoveNext Loop rsTB.Close adoBD.Close RESULT OF EXECUTION: Sandro Yaqub Yusuf --------------------------------------------------------------------------------------------------------------------------------------- VISUAL BASIC 6 with ADO 2.8 with STORED PROCEDURE: Dim adoBD As ADODB.Connection Dim rsTB As New ADODB.Recordset Set adoBD = New ADODB.Connection adoBD.ConnectionString = "driver=PostgreSQL};server=localhost;database=SICCEV;port=5432;uid=ryan;pwd=displace;" adoBD.Open Set rsTB = adoBD.Execute("select sp_user_search('Sandro');") Do While Not rsTB.EOF MsgBox rsTB(0) rsTB.MoveNext Loop rsTB.Close adoBD.Close RESULT OF EXECUTION: (1,Sandro,123,"Sandro Yaqub Yusuf") --------------------------------------------------------------------------------------------------------------------------------------- The question is how I do for to isolate the columns when come (1,Sandro,123,"Sandro Yaqub Yusuf"). I would like to get only the column FULLNAME using the STORED PROCEDURE. Have I do a function in VB for to isolate the RESULTS of STORED PROCEDURES in POSTGRESQL ? Thanks more one times... Sandroyy