Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTrtg-0004kH-TM for pgsql-odbc@arkaria.postgresql.org; Wed, 18 Jan 2017 15:11:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cTrtg-0000L4-GD for pgsql-odbc@arkaria.postgresql.org; Wed, 18 Jan 2017 15:11:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cTrtg-0000Ky-1G for pgsql-odbc@postgresql.org; Wed, 18 Jan 2017 15:11:36 +0000 Received: from [66.111.4.25] (helo=out1-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cTrtb-0001VF-Jg for pgsql-odbc@postgresql.org; Wed, 18 Jan 2017 15:11:35 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 96C7D206A2; Wed, 18 Jan 2017 10:11:09 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Wed, 18 Jan 2017 10:11:09 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=ramqMIF3gleX/Nq 1lE4Ysrb4TPU=; b=GVD1GuTzjlHJoI59W+lTfUH6lHow3VN35TO4gJujHxNr9I6 hdbhSKbIvwnOvd+CTDFIpFF2xxZpZhiKGYuogC6vMgineD846+3ZkvWk2Cx6S4/K 0JCDCjk24Tnc3CgGbG8Ktqg3zQeh2fS3jp0AmQDLMrgSNPemVY50pCKOGKds= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= smtpout; bh=ramqMIF3gleX/Nq1lE4Ysrb4TPU=; b=cutgiY+53V9YaYN0EYBl RdlJIPUmj6plmx3fkFLWl/dK8eY+A2KxNfimAbfGFBQdcHp5zJ4eMmiexWqPkkK/ wlumXrc1f9OQgj9e37Mvh55ats95Y/oQiBfG5VDq8F8xmkTCkzGDVY76k8q9mfXe N9icaSdrLkADz2ArLlHN2hM= X-ME-Sender: X-Sasl-enc: o3MKEdZ+Bi1V5C4YEDU/MsFNJbnFEK23Kg0HOBt7eQjX 1484752269 Received: from [192.168.1.2] (174-21-203-58.tukw.qwest.net [174.21.203.58]) by mail.messagingengine.com (Postfix) with ESMTPA id 1ED6E7E2B3; Wed, 18 Jan 2017 10:11:09 -0500 (EST) Subject: Re: Driver issue ? Default value not recognized in access To: patrick.le-calvez@engie.com, pgsql-odbc@postgresql.org References: <2a41d058b82847748ceaf99104299d03@DP07CEXC21.MELINDA.LOCAL> <649651bf-6a61-c642-9903-f8abe9b771e5@aklaver.com> <6809b3d089224930a5ab977f74828b03@DP07CEXC21.MELINDA.LOCAL> From: Adrian Klaver Message-ID: Date: Wed, 18 Jan 2017 07:11:08 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <6809b3d089224930a5ab977f74828b03@DP07CEXC21.MELINDA.LOCAL> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.25 (deferred) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org On 01/17/2017 07:39 AM, patrick.le-calvez@engie.com wrote: > Hello, > > > > Thanks for your answer, > > Here are the elements you asked : > > > > > > 1) How is the table in Access linked to the Postgres database? > > I create tables linked through a ODBC connection. > > > > Here are the parameters of the connection. > > > > > > > > 2) Where do you except the default value to show up? > > > > I expect the default value to appear in 2 places. > > First, I would like to see it there : From what I can gather Access does not pull in the default values from linked tables. The default value in the table description is something you have to fill in yourself and is applicable only to Access itself. > > > > Second (and most of all), when I run my vba subs, I need to use the > default values of some fields. At this state, vba does see any. > > > > > > 3) Is the default value created in the database when you INSERT a > value without specifying it? > > > > Yes it is. > > More specifically, most of my records are inserted via a vba sub. That’s > where I need those default values the most. I do not use VBA so I will not be of much help there. All I can do is point at: https://msdn.microsoft.com/en-us/library/ms711683(v=vs.85).aspx where there is: COLUMN_DEF (ODBC 3.0) 13 Varchar The default value of the column. The value in this column should be interpreted as a string if it is enclosed in quotation marks. More digging found this: http://www.techrepublic.com/article/much-ado-about-field-properties/ Not sure if that will help or not. > > > > > > Have a good day, > > > > Patrick > > > > > > > -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc