X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id BF187D1B8E3 for ; Fri, 5 Sep 2003 08:51:24 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 14448-02 for ; Fri, 5 Sep 2003 05:50:54 -0300 (ADT) Received: from Tux.reetec.de (unknown [62.206.144.94]) by svr1.postgresql.org (Postfix) with ESMTP id E983AD1B965 for ; Fri, 5 Sep 2003 05:50:50 -0300 (ADT) Received: from henry ([192.168.65.221]) by Tux.reetec.de (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) with SMTP id h858oob23152 for ; Fri, 5 Sep 2003 10:50:50 +0200 From: "Henry Alfke" To: Subject: Re: Change connection (IP, or Databasename) Date: Fri, 5 Sep 2003 10:49:59 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 In-Reply-To: X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/22 X-Sequence-Number: 3220 please take a look at http://gborg.postgresql.org/project/psqlodbc/genpage.php?howto-accessvba with the Sub Link_ODBCTbl() you can link your tables automatically with vba an example: Public Function pgtest() Dim DB As Database Dim t As TableDef Set DB = CurrentDb Set t = New TableDef t.Name = "mytable" t.Connect = "ODBC;database=mydatabase;uid=myusername;pwd=mypassword;dsn=mypostgresqlodbc dsn;" t.SourceTableName = "public.mytable" DB.TableDefs.Append t End Function regards henry -----Ursprungliche Nachricht----- Von: pgsql-odbc-owner@postgresql.org [mailto:pgsql-odbc-owner@postgresql.org]Im Auftrag von E. Zorn (RDG-rational) postsql Gesendet: Freitag, 5. September 2003 09:18 An: Jeff Eckermann; pgsql-odbc@postgresql.org Betreff: Re: [ODBC] Change connection (IP, or Databasename) hi again, I do so, but exact the relinking of the database is the problem. I the new result of the frontend is ready for using in production environment, I always have to relink / reconnect the frontend to the "on air" database. In my frontend I use the tables without the header "public_" witch is provided from the server. I now have to relink all the tables and after that I have to rename the tables (erase the "public_"). This takes a long time (lot's of tables :-) ), isn't there a shorter method ? thanks -----Ursprungliche Nachricht----- Von: Jeff Eckermann [mailto:jeff_eckermann@yahoo.com] Gesendet: Donnerstag, 4. September 2003 22:41 An: edv@rdg-rational.de; pgsql-odbc@postgresql.org Betreff: Re: [ODBC] Change connection (IP, or Databasename) Not sure what you are asking... If you want to create a copy of your production database for development/testing purposes, the easiest way is: CREATE DATABASE myseconddatabase WITH TEMPLATE myfirstdatabase; Then just create a new DSN pointing to the new database (or change your code, if you are not using a DSN). You would need to relink your tables also. --- "E. Zorn (RDG-rational)" wrote: > hi, > I am using Access as a front-end for postgresql via > ODBC. > > The postgresql-server is hosted on a separate > linux-computer. > > I like to change the database on the SQL-server for > developing or > change the IP of the connected SQL-server so that > the original data wouldnt > be changed. > > Does anybody know a quick and comfortable way to do > this. I know the > possibility of importing the whole tables once again > but they all have a > header like "public_" which I have than manually to > change. > > Elmar Zorn > > > > ---------------------------(end of > broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org