X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BBDC03A5856 for ; Tue, 25 Jan 2005 19:29:53 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 09304-02 for ; Tue, 25 Jan 2005 19:29:49 +0000 (GMT) Received: from pd6mo4no.prod.shaw.ca (idcmail-mo2no.cg.shawcable.net [64.59.134.9]) by svr1.postgresql.org (Postfix) with ESMTP id 0B7A63A581B for ; Tue, 25 Jan 2005 19:29:49 +0000 (GMT) Received: from pd8mr5no.prod.shaw.ca (pd8mr5no-qfe2.prod.shaw.ca [10.0.144.226]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IAW0056P0TNTNC0@l-daemon> for pgsql-odbc@postgresql.org; Tue, 25 Jan 2005 12:29:47 -0700 (MST) Received: from pn7ml2no.prod.shaw.ca ([10.0.149.111]) by pd8mr5no.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IAW00JJ40TN0FE0@pd8mr5no.prod.shaw.ca> for pgsql-odbc@postgresql.org; Tue, 25 Jan 2005 12:29:47 -0700 (MST) Received: from Dell4500 (S01060004236fc1f7.wp.shawcable.net [24.77.13.13]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with SMTP id <0IAW00EDQ0TGSQ@l-daemon> for pgsql-odbc@postgresql.org; Tue, 25 Jan 2005 12:29:47 -0700 (MST) Date: Tue, 25 Jan 2005 13:29:56 -0600 From: George Weaver Subject: Re: Error connecting a visual studio .NET "app" and PostgreSQL To: Amadeo Garcia , pgsql-odbc@postgresql.org Message-id: <00b401c50314$43fd7340$6400a8c0@Dell4500> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Mailer: Microsoft Outlook Express 6.00.2900.2180 Content-type: text/plain; reply-type=original; charset=iso-8859-1; format=flowed Content-transfer-encoding: 7bit X-Priority: 3 X-MSMail-priority: Normal References: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.6 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, FORGED_RCVD_HELO X-Spam-Level: * X-Archive-Number: 200501/77 X-Sequence-Number: 4872 Hi Amadeo, Try Driver={postgresql};Server=localhost;Port=5432;Database=libroteca;Uid=tapanez;Pwd=****;" ^^^^^^^^ Regards, George ----- Original Message ----- From: "Amadeo Garcia" To: 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@postgresql.org so that your > message can get through to the mailing list cleanly >