Error connecting a visual studio .NET "app" and PostgreSQL

From: Amadeo Garcia <amadeogarciaserrano(at)gmail(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Error connecting a visual studio .NET "app" and PostgreSQL
Date: 2005-01-22 17:07:19
Message-ID: aec84fa50501220907470e341f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

ODBC Driver Version: 07_03_0200
PostgreSQL 8.0
SO: Windows XP with Service Pack 2
Visual Studio .NET with Framework 1.1

Hi, this is my visual basic code, very very simple, i'm first trying
to connect with the database, no success at this moment.

Dim cadenaConexion =
"Driver={postgresql};Server=(localhost:5432);Database=libroteca;Uid=tapanez;Pwd=****;"
Dim conexion As Microsoft.Data.Odbc.OdbcConnection = New
OdbcConnection(cadenaConexion)
Dim comando As String = "INSERT INTO LIB_AUTORES VALUES (2,
'Ken Follet')"
Dim cmd As Microsoft.Data.Odbc.OdbcCommand = New
OdbcCommand(comando, conexion)
Try
MsgBox("Abriendo conexion")
cmd.Connection.Open()
Console.WriteLine("Abriendo conexion2")
cmd.ExecuteNonQuery()
cmd.Connection.Close()
Catch ex As Exception
MsgBox(ex.ToString)
End Try

Attachment Content-Type Size
image/jpeg 19.5 KB
mylog_2856.log application/octet-stream 6.9 KB
psqlodbc_2856.log application/octet-stream 2.3 KB

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message oli.sennhauser 2005-01-23 10:42:56 Problem with psqlodbc drivers
Previous Message Franco Bruno Borghesi 2005-01-21 20:14:56 Re: [JDBC] Schema?