pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Ayers <aayers@eldocomp.com>
To: james@digconn.co.uk <james@digconn.co.uk>
Cc: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: Re: visual basic
Date: Fri, 12 Sep 2003 09:34:04 -0700
Message-ID: <3F61F57C.4000804@eldocomp.com> (raw)

james@digconn.co.uk wrote:
> i need to get visual basic and my postgresql database interacting, i've 
> really just started with postsql so if anyone can help me it would be 
> much appreciated. I'm running vb6. Please reply

I have posted many messages and gotten replies relating to my issues 
that I had with getting VB6 and PostgreSQL communnicating. You should be 
able to find the postings in the archives for both the ODBC and GENERAL 
mailing lists (look from March of this year onward).

Basically, you will need to use ODBC (I suppose it might be possible to 
also use whatever interface lib DLL exists for Windows, with custom VB 
declarations to the functions, if your VB code and PG are living on a 
Windows server), so you will need to obtain the ODBC driver:

http://gborg.postgresql.org/project/psqlodbc/projdisplay.php

Once you have that set up, you will need to decide on whether you want a 
DSN or DSN-less connection. Both have pros and cons, depending on what 
you are trying to do. Typically, DSN connections are best when you only 
have the application on a single machine, like a web application. 
DSN-less are best where you are distributing the app in a multi-tier 
fashion, such as if the app is a VB application on multiple clients, 
where you aren't physically able, or it isn't practical to set up a 
bunch of DSN names.

Then, set things up in your VB app like you would if you were using an 
Access DB - you will need to select either DAO or ADO. If you read my 
messages, you will find that I had particular trouble with DAO, and 
changed my code over to use ADO. I reccommend that you do the same. I 
don't know anything about RDO - in theory it could work, but I have 
never tried it.

 From there it should be easy. Now, I have left out a bunch of stuff 
that I am not familiar with (like how you set up the database and such). 
If you are saddled with that task, others here or on other lists can 
probably help you. But I was able to quickly and easily get VB 
communicating and updating a PG database.

I recently posted (September 8) to the ODBC list a very quick rundown of 
what I am using, with sample code. It would probably help to get you 
started. It isn't meant to be a complete and thorough tutorial. But it 
should get you moving in the proper direction.

Good luck,

Andrew Ayers
Phoenix, Arizona

-- 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.



view thread (4+ messages)

Message-ID: <3F61F57C.4000804@eldocomp.com>
Permalink:  ../3F61F57C.4000804@eldocomp.com/
Also on:    postgresql.org/message-id/3F61F57C.4000804@eldocomp.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: aayers@eldocomp.com, james@digconn.co.uk
  Subject: Re: visual basic
  In-Reply-To: <3F61F57C.4000804@eldocomp.com>
  References: <3F61F57C.4000804@eldocomp.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox