=?UTF-8?B?UmXCoA==?=: O$816, Bind Vars Question

Denis Woodbury denis at woodmic.net
Tue Nov 27 21:02:28 EST 2018


Hi Doug,

It's not an MSSQL issue, as mentioned in my first email, if I do:
update actor set birthdate = '1701-11-26' where actor_id = '2923'

The record is updated correctly, the problem is when using a bind variable.

The same SET birthdate=@[irwrow.birthdate] that does not update correctly using MSSQL via ODBC works fine using Postgres, the main difference here is the DAM, Studio has a DAM specifically for Postgres.

denis woodbury 

Le 18-11-27 15:46, « omnisdev-en au nom de Doug Easterbrook » <omnisdev-en-bounces at lists.omnis-dev.com au nom de doug at artsman.com> a écrit :

    if in doubt…  google the docs.
    
     https://docs.microsoft.com/en-us/sql/t-sql/data-types/datetime-transact-sql?view=sql-server-2017
    
    I suspect it is not so much an omnis issue than an MS SQL column definition problem.
    
    
    
    Doug Easterbrook
    Arts Management Systems Ltd.
    mailto:doug at artsman.com
    http://www.artsman.com
    Phone (403) 650-1978
    
    > On Nov 27, 2018, at 8:34 AM, David Barnett <david at fairlibertyscall.com> wrote:
    > 
    > The 1900-1999 range indicates the default century for a date entered with a 2-digit year. The actual column should be able to hold earlier dates if you use a 4 digit year.
    > 
    > David
    > 
    > David Barnett                 David at FairLibertysCall.com
    > C: 516-398-8668               www.FairLibertysCall.com
    > 
    >> On Nov 27, 2018, at 11:20 AM, Philip Tulett <philip.tulett at pdq-networks.com> wrote:
    >> 
    >> Hi Denis,
    >> 
    >> Surely " The birthdate column in the Studio Schema is Date Time, Short Date
    >> 1900..1999 " is never going to work correctly with a date in the 1700's.
    >> 
    >> Kind regards
    >> Philip
    >> 
    >> -----Original Message-----
    >> From: omnisdev-en [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf
    >> Of Denis Woodbury via omnisdev-en
    >> Sent: 27 November 2018 16:05
    >> To: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com>
    >> Cc: Denis Woodbury <denis at woodmic.net>
    >> Subject: O$816, Bind Vars Question
    >> 
    >> Hi,
    >> 
    >> Using ODBC with SQL Server
    >> 
    >> Trying to update a date column (birthdate) to '1701-11-26' using a bind
    >> variable will result in 1969-12-31
    >> 
    >> The birthdate column in the Studio Schema is Date Time, Short Date
    >> 1900..1999 Any date inferior to 1901-12-31 using a bind variable like this:
    >> SET birthdate=@[irwrow.birthdate] will result in storing 1969-12-31
    >> 
    >> The irwrow is set inside the table class so it is in scope, dates greater or
    >> equal to 1901-12-31 work fine.
    >> 
    >> This works in interacive SQL
    >> update actor set birthdate = '1701-11-26' where actor_id = '2923' 
    >> 
    >> Any Idea??
    >> 
    >> 
    >> Thanks
    >> 
    >> denis woodbury
    >> 
    >> 
    >> _____________________________________________________________
    >> Manage your list subscriptions at http://lists.omnis-dev.com Start a new
    >> message -> mailto:omnisdev-en at lists.omnis-dev.com 
    >> 
    >> _____________________________________________________________
    >> Manage your list subscriptions at http://lists.omnis-dev.com
    >> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
    > 
    > _____________________________________________________________
    > Manage your list subscriptions at http://lists.omnis-dev.com
    > Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
    
    _____________________________________________________________
    Manage your list subscriptions at http://lists.omnis-dev.com
    Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
    
    





More information about the omnisdev-en mailing list