Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 378111E62E82 for ; Wed, 25 Apr 2012 11:06:12 -0300 (ADT) Received: from nm5-vm0.bullet.mail.sp2.yahoo.com ([98.139.91.204]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1SN2r7-0007JF-L4 for pgsql-odbc@postgresql.org; Wed, 25 Apr 2012 14:06:11 +0000 Received: from [98.139.91.67] by nm5.bullet.mail.sp2.yahoo.com with NNFMP; 25 Apr 2012 14:05:50 -0000 Received: from [98.139.44.77] by tm7.bullet.mail.sp2.yahoo.com with NNFMP; 25 Apr 2012 14:05:50 -0000 Received: from [127.0.0.1] by omp1014.access.mail.sp2.yahoo.com with NNFMP; 25 Apr 2012 14:05:50 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 900566.76939.bm@omp1014.access.mail.sp2.yahoo.com Received: (qmail 28312 invoked by uid 60001); 25 Apr 2012 14:05:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1335362750; bh=fKMR07AducDKsM3lPdY2ZuWHopMdo9QqTNSHjCeFMgA=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=l9sbDlvceJ7c96vWPwnFoDWsNsFNb83dzArHSLFk878a3yUkezRMNCkzWAAPkaWemMo4dE5dvRbNrWG4u+iUwyOaorZGJlsV3jkIR3XNsUVPsLlZq9Les62/JcmJP+LPQR39b0ZyZQt+kkVLRbgd9pJGM1DWfG3daDbFCOCTBD8= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=Y+z4SNIjPhlZoqEMjfZMFUwKcNpl39jGAlyVd2+4ud5z5UU6LTuuYVkThRLQDlctXKZxOlB2500mjDFMtsmsB+NizcBb1ER65gp41jR2YyxnKjwUd1zLH7Ab+j9BiKW9YPkeSjF8Agym8cHzsoXdJ0fZC4Dax3J+RsPTM06h6t4=; X-YMail-OSG: ksswr_EVM1m05KFnx1D5MgPFqebro7QlCRIVosOddy6qe12 hRVaxLJq8FAyFtA6nqXCcOhT5WlZoC..8YFsKvo48Pvl75QFL6Ik.hYF_rp1 zOF1V0uAccU3JssUjd4O1pkshYxPdUN4nDDNrKkFv93nH0ZBkLGj9gQplo8B B4ZFiiWmc8zmZyslQyfFWFfRYH141fP38InxiO_mMH1ykYqedvCHZzdJmhY9 gD0YMZPi8KW4PSGJyeqVImI.pcuMq9gBAu8hechAmZ83FjiGTy5JFqv5U3Fv L8TpnOk.lC0cGcs_.pumdTs0YB4rX9uiTJpWufKXzMJxqd3Sz_0UHN3rbPRu W512uZBrP4XyTKPn1DjG9RxRQUR9Sv9vqZHZSKPw1wyCX3OwToLaU4p316tA fl_eruFQTR6.ItKUGkbdwPJlq3m6FaVhyOT5pb_NO0SOI1J1ulmD0eYW.THJ AvUXkDuz8cUEmO6si1IAR Received: from [76.190.128.211] by web83604.mail.sp1.yahoo.com via HTTP; Wed, 25 Apr 2012 07:05:50 PDT X-Mailer: YahooMailRC/708 YahooMailWebService/0.8.117.340979 References: <20120425135420.91A461E62E82@mail.postgresql.org> Message-ID: <1335362750.25657.YahooMailRC@web83604.mail.sp1.yahoo.com> Date: Wed, 25 Apr 2012 07:05:50 -0700 (PDT) From: Rob Richardson Reply-To: Rob Richardson Subject: How can I keep an OdbcDataAdapter from using fully qualified tble names? To: pgsql-odbc@postgresql.org In-Reply-To: <20120425135420.91A461E62E82@mail.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Pg-Spam-Score: -2.0 (--) X-Archive-Number: 201204/18 X-Sequence-Number: 10832 Hello! How can I keep an OdbcDataAdapter from insisting on the fully qualified table name? In VS 2008, I am trying to use the System.Data.Odbc namespace to work with a PostGres database. I don't want to use npgsql because I want to work with DSNs so that I get the flexibility of changing databases without changing my program. When I use an OdbcCommandBuilder object to create the insert, update and delete commands for me, the table names are fully qualified. For example, an insert command might begin with "insert into MyDatabase.public.MyTable...". When I try to use that, I get an exception thrown that complains that cross-database references are not implemented (even though the connection I am using is to the MyDatabase database). So, I wrote a little function that converts a string containing "MyDatabase.public.MyTable" into "MyTable", and use that to replace the fully qualified name in the command text with the bare table name. But when it comes to time to call the adapter's Update() method to add a new row into my table, the first thing the adapter does is to change the bare table name back to the full "MyDatabase.public.MyTable" name, and then I get the same exception. Thank you very much. RobR