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

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 (view raw or flat)
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: psqlodbc_2856.log
Description: application/octet-stream (2.3 KB)
Attachment: mylog_2856.log
Description: application/octet-stream (6.9 KB)
Attachment: error.jpg
Description: image/jpeg (19.5 KB) (inlined above)

Responses

pgsql-odbc by date

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

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