X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 08E2AD1B4EE for ; Fri, 12 Sep 2003 16:34:37 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 16667-02 for ; Fri, 12 Sep 2003 13:34:05 -0300 (ADT) Received: from ecintweb.eldocomp.com (smtp.eldocomp.com [205.159.99.8]) by svr1.postgresql.org (Postfix) with ESMTP id BAC05D1B4F6 for ; Fri, 12 Sep 2003 13:34:04 -0300 (ADT) Received: by ecintweb.eldocomp.com with XWall v3.27j ; Fri, 12 Sep 2003 09:34:04 -0700 From: Andrew Ayers To: "james@digconn.co.uk" Cc: "pgsql-odbc@postgresql.org" Subject: Re: visual basic Date: Fri, 12 Sep 2003 09:34:04 -0700 X-Assembled-By: XWall v3.27j Message-ID: <3F61F57C.4000804@eldocomp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/49 X-Sequence-Number: 3247 james@digconn.co.uk wrote: > i need to get visual basic and my postgresql database interacting, i've= =20 > really just started with postsql so if anyone can help me it would be=20 > much appreciated. I'm running vb6. Please reply I have posted many messages and gotten replies relating to my issues=20 that I had with getting VB6 and PostgreSQL communnicating. You should be=20 able to find the postings in the archives for both the ODBC and GENERAL=20 mailing lists (look from March of this year onward). Basically, you will need to use ODBC (I suppose it might be possible to=20 also use whatever interface lib DLL exists for Windows, with custom VB=20 declarations to the functions, if your VB code and PG are living on a=20 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=20 DSN or DSN-less connection. Both have pros and cons, depending on what=20 you are trying to do. Typically, DSN connections are best when you only=20 have the application on a single machine, like a web application.=20 DSN-less are best where you are distributing the app in a multi-tier=20 fashion, such as if the app is a VB application on multiple clients,=20 where you aren't physically able, or it isn't practical to set up a=20 bunch of DSN names. Then, set things up in your VB app like you would if you were using an=20 Access DB - you will need to select either DAO or ADO. If you read my=20 messages, you will find that I had particular trouble with DAO, and=20 changed my code over to use ADO. I reccommend that you do the same. I=20 don't know anything about RDO - in theory it could work, but I have=20 never tried it. From there it should be easy. Now, I have left out a bunch of stuff=20 that I am not familiar with (like how you set up the database and such).=20 If you are saddled with that task, others here or on other lists can=20 probably help you. But I was able to quickly and easily get VB=20 communicating and updating a PG database. I recently posted (September 8) to the ODBC list a very quick rundown of=20 what I am using, with sample code. It would probably help to get you=20 started. It isn't meant to be a complete and thorough tutorial. But it=20 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 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.