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

From: George Weaver <gweaver(at)shaw(dot)ca>
To: Amadeo Garcia <amadeogarciaserrano(at)gmail(dot)com>, pgsql-odbc(at)postgresql(dot)org
Subject: Re: Error connecting a visual studio .NET "app" and PostgreSQL
Date: 2005-01-25 19:29:56
Message-ID: 00b401c50314$43fd7340$6400a8c0@Dell4500
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi Amadeo,

Try
Driver={postgresql};Server=localhost;Port=5432;Database=libroteca;Uid=tapanez;Pwd=****;"
^^^^^^^^
Regards,
George

----- Original Message -----
From: "Amadeo Garcia" <amadeogarciaserrano(at)gmail(dot)com>
To: <pgsql-odbc(at)postgresql(dot)org>
Sent: Saturday, January 22, 2005 11:07 AM
Subject: [ODBC] Error connecting a visual studio .NET "app" and PostgreSQL

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

--------------------------------------------------------------------------------

>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message lothar.behrens 2005-01-25 20:24:56 Re: ODBC (win32) X PostgreSQL(Linux)
Previous Message aboster 2005-01-25 19:26:24 Backslash parsing