Help; if possible

From: Nasir Mahmood <nasirsol(at)hotmail(dot)com>
To: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: Help; if possible
Date: 2020-11-17 18:29:17
Message-ID: SG2PR04MB3077E0B4428AE96365142D8ED8E20@SG2PR04MB3077.apcprd04.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Dear Sirs,

I want to access postgreSQL Database from VB2013

I installed the following

PSQLODBC.DLL - A library to talk to the PostgreSQL DBMS using ODBC.
Copyright (C) 1998 Insight Distribution Systems
Copyright (C) 1998 - 2020 The PostgreSQL Global Development Group
Multibyte support was added by Sankyo Unyu Service, (C) 2001.

Now, my following code giving error; which I can't understand what to do

************
Dim MyCon As New System.Data.Odbc.OdbcConnection
MyCon.ConnectionString = "Driver={PostgreSQL ANSI};database=database_name;server=127.0.0.1;port=5432;uid=postgres;sslmode=disable;readonly=0;protocol=7.4;User ID=postgres;password=password;"

MyCon.Open()
If mCon.State = ConnectionState.Open Then
MsgBox("Connected To PostGres", MsgBoxStyle.MsgBoxSetForeground)
End If

The above mCon giving following error
************

mCon not declared; please guide,

or any example, how to access postgre sql from vb2013 or VB

Regards

Nasir Mahmood
Lahore - Pakistan

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message George Weaver 2020-11-17 19:17:58 Re: Help; if possible
Previous Message kato-sho@fujitsu.com 2020-10-26 10:46:03 RE: when a new version of psqlodbc compatible with PostgreSQL 13 will be released?