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

Re: Executing SP in VB6

From: Andrew Ayers <aayers(at)eldocomp(dot)com>
To: PostgreSQL ODBC List <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Executing SP in VB6
Date: 2004-10-04 23:29:18
Message-ID: 4161DCCE.6070502@eldocomp.com (view raw or flat)
Thread:
Lists: pgsql-odbc
Sandro Yaqub Yusuf wrote:
> 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 ??!!

Yes, it is possible to use PostgreSQL with VB6, via ODBC (I have posted 
numerous times in the past on this - see the archives if you are 
interested, I am not going to repeat myself here) - I am doing it as we 
speak. But I don't think this is what you are asking.

If I am understanding you correctly, you are wanting to code stored 
procedures in VB and load them into your PostgreSQL DB, correct? As far 
as I know, this is *not* possible. You can, however, write SP's using 
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 
ODBC. I have never done this, but I did find this post, which may give 
you some help:

http://archives.postgresql.org/pgsql-novice/2004-04/msg00050.php

Andrew Ayers

> ----- Original Message ----- From: "Rick Sivernell" <res005ru(at)verizon(dot)net>
> To: "Sandro Yaqub Yusuf" <sandro(at)proservvi(dot)com(dot)br>
> 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" <sandro(at)proservvi(dot)com(dot)br> 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(at)postgresql(dot)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 = '<value>';" should work just fine.
>>>
>>>   Dick Goulet
>>>   Senior Oracle DBA
>>>   Oracle Certified 8i DBA
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------ 
>>>
>>>   From: Sandro Yaqub Yusuf [mailto:sandro(at)proservvi(dot)com(dot)br]
>>>   Sent: Monday, October 04, 2004 3:13 PM
>>>   To: pgsql-odbc(at)postgresql(dot)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(at)verizon(dot)net
>> Gentoo Linux
>> Registered Linux User #193859
>>
>>   .~.
>>  / v \
>> /( _ )\
>>   ^ ^
>> In Linux we trust! 
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
>               http://www.postgresql.org/docs/faqs/FAQ.html
> 
> 
> 


-- CONFIDENTIALITY NOTICE --

This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email, and delete the message. Thank you.

pgsql-odbc by date

Next:From: Andrew AyersDate: 2004-10-04 23:31:16
Subject: Re: Access and PG ODBC problem
Previous:From: Sandro Yaqub YusufDate: 2004-10-04 21:52:53
Subject: Re: Executing SP in VB6

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