Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Timestamp out by 13 mins

8 posts in General Discussion Last posting was on 2009-10-23 18:12:07.0Z
gchq Posted on 2009-10-22 23:42:24.0Z
Sender: 5300.4ae0ec11.846930886@sybase.com
From: gchq
Newsgroups: ianywhere.public.general
Subject: Timestamp out by 13 mins
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4ae0ede0.5342.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 22 Oct 2009 16:42:24 -0700
X-Trace: forums-1-dub 1256254944 10.22.241.41 (22 Oct 2009 16:42:24 -0700)
X-Original-Trace: 22 Oct 2009 16:42:24 -0700, 10.22.241.41
Lines: 13
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7776
Article PK: 6814

Hi there

iAnywhere 11x - I have a timestamp column defaulted to
current timestamp. For some reason this seems to be 13 mins
faster than the server time reported by asp.Net using the
Now function!

Sybase - 12:33:44
.Net - 12:20:35

Any idea why this might be happening?

Thanks


Breck Carter [TeamSybase] Posted on 2009-10-23 11:40:28.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__breck.carter@gmail.com>
Newsgroups: ianywhere.public.general
Subject: Re: Timestamp out by 13 mins
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__breck.carter@gmail.com
Message-ID: <gf53e5tsm6kmpidn73s1t7864ksskhjpb0@4ax.com>
References: <4ae0ede0.5342.1681692777@sybase.com>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 23 Oct 2009 04:40:28 -0700
X-Trace: forums-1-dub 1256298028 10.22.241.152 (23 Oct 2009 04:40:28 -0700)
X-Original-Trace: 23 Oct 2009 04:40:28 -0700, vip152.sybase.com
Lines: 30
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7777
Article PK: 6812

Is the SQL Anywhere server running on one machine, and asp.Net on
another machine?

What does the following query say, in dbisql?

SELECT CURRENT TIMESTAMP;

Breck

On 22 Oct 2009 16:42:24 -0700, gchq wrote:

>Hi there
>
>iAnywhere 11x - I have a timestamp column defaulted to
>current timestamp. For some reason this seems to be 13 mins
>faster than the server time reported by asp.Net using the
>Now function!
>
>Sybase - 12:33:44
>.Net - 12:20:35
>
>Any idea why this might be happening?
>
>Thanks

--
Breck Carter http://sqlanywhere.blogspot.com/

RisingRoad SQL Anywhere and MobiLink Professional Services
breck.carter@risingroad.com


gchq Posted on 2009-10-23 15:09:27.0Z
Sender: 5300.4ae0ec11.846930886@sybase.com
From: gchq
Newsgroups: ianywhere.public.general
Subject: Re: Timestamp out by 13 mins
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4ae1c727.6f48.1681692777@sybase.com>
References: <gf53e5tsm6kmpidn73s1t7864ksskhjpb0@4ax.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 23 Oct 2009 08:09:27 -0700
X-Trace: forums-1-dub 1256310567 10.22.241.41 (23 Oct 2009 08:09:27 -0700)
X-Original-Trace: 23 Oct 2009 08:09:27 -0700, 10.22.241.41
Lines: 83
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7778
Article PK: 6813


> Is the SQL Anywhere server running on one machine, and
> asp.Net on another machine?

They are both on the same machine...
>
> What does the following query say, in dbisql?


Here are the test queries

Dim vLoginID As Integer = 0
strSQL = "SELECT MAX(Login_ID) FROM
Login_Failed_Log"
Try
vLoginID = vHAS.ExecuteScalar(CommandType.Text,
strSQL)
Catch ex As Exception
Label1.Text = ex.Message
vHAS = Nothing
Exit Sub
End Try
Dim vLastTime As DateTime = Nothing
strSQL = "SELECT Login_Timestamp FROM
Login_Failed_Log WHERE Login_ID = " & vLoginID
Try
vLastTime = vHAS.ExecuteScalar(CommandType.Text,
strSQL)
Catch ex As Exception
Label1.Text = ex.Message
vHAS = Nothing
Exit Sub
End Try
vHAS = Nothing
Dim vTimeout As DateTime =
DateAdd(DateInterval.Minute, 20, Now)
Dim vTimeoutString As String = Format(vTimeout,
"yyyy-MM-dd hh:mm:ss")

Label1.Text = "Login_ID = " & vLoginID & " DB
Recorded TimeStamp = " & vLastTime
Label2.Text = "Relogin time will be " &
vTimeoutString
Label3.Text = "Current server time is " & Now



and here is the output

Login_ID = 45 DB Recorded TimeStamp = 10/23/2009 12:33:44

Relogin time will be 2009-10-23 12:40:35

Current server time is 10/23/2009 12:20:35




>
> SELECT CURRENT TIMESTAMP;
>
> Breck
>
> On 22 Oct 2009 16:42:24 -0700, gchq wrote:
>
> >Hi there
> >
> >iAnywhere 11x - I have a timestamp column defaulted to
> >current timestamp. For some reason this seems to be 13
> mins >faster than the server time reported by asp.Net
> using the >Now function!
> >
> >Sybase - 12:33:44
> >.Net - 12:20:35
> >
> >Any idea why this might be happening?
> >
> >Thanks
>
> --
> Breck Carter http://sqlanywhere.blogspot.com/
>
> RisingRoad SQL Anywhere and MobiLink Professional Services
> breck.carter@risingroad.com


Volker Barth <No_VBarth Posted on 2009-10-23 15:52:10.0Z
From: Volker Barth <No_VBarth@Spam_GLOBAL-FINANZ.de>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: Timestamp out by 13 mins
References: <gf53e5tsm6kmpidn73s1t7864ksskhjpb0@4ax.com> <4ae1c727.6f48.1681692777@sybase.com>
In-Reply-To: <4ae1c727.6f48.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4ae1d12a$1@forums-1-dub>
Date: 23 Oct 2009 08:52:10 -0700
X-Trace: forums-1-dub 1256313130 10.22.241.152 (23 Oct 2009 08:52:10 -0700)
X-Original-Trace: 23 Oct 2009 08:52:10 -0700, vip152.sybase.com
Lines: 93
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7779
Article PK: 6815

Can you show how the Login_Timestamp field is filled?
A far as I can see, this field is merely selected in your code so there
is no clue as how it has been filled.

Note that even a column with DEFAULT CURRENT TIMESTAMP can be filled
with a non-default value by supplying a real value, say like
INSERT Login_Failed_Log (Login_ID, Login_Timestamp)
VALUES (1, 2009-10-24')

HTH
Volker

> gchq wrote:
>> Is the SQL Anywhere server running on one machine, and
>> asp.Net on another machine?
>
> They are both on the same machine...
>> What does the following query say, in dbisql?
>
>
> Here are the test queries
>
> Dim vLoginID As Integer = 0
> strSQL = "SELECT MAX(Login_ID) FROM
> Login_Failed_Log"
> Try
> vLoginID = vHAS.ExecuteScalar(CommandType.Text,
> strSQL)
> Catch ex As Exception
> Label1.Text = ex.Message
> vHAS = Nothing
> Exit Sub
> End Try
> Dim vLastTime As DateTime = Nothing
> strSQL = "SELECT Login_Timestamp FROM
> Login_Failed_Log WHERE Login_ID = " & vLoginID
> Try
> vLastTime = vHAS.ExecuteScalar(CommandType.Text,
> strSQL)
> Catch ex As Exception
> Label1.Text = ex.Message
> vHAS = Nothing
> Exit Sub
> End Try
> vHAS = Nothing
> Dim vTimeout As DateTime =
> DateAdd(DateInterval.Minute, 20, Now)
> Dim vTimeoutString As String = Format(vTimeout,
> "yyyy-MM-dd hh:mm:ss")
>
> Label1.Text = "Login_ID = " & vLoginID & " DB
> Recorded TimeStamp = " & vLastTime
> Label2.Text = "Relogin time will be " &
> vTimeoutString
> Label3.Text = "Current server time is " & Now
>
>
>
> and here is the output
>
> Login_ID = 45 DB Recorded TimeStamp = 10/23/2009 12:33:44
>
> Relogin time will be 2009-10-23 12:40:35
>
> Current server time is 10/23/2009 12:20:35
>
>
>
>
>> SELECT CURRENT TIMESTAMP;
>>
>> Breck
>>
>> On 22 Oct 2009 16:42:24 -0700, gchq wrote:
>>
>>> Hi there
>>>
>>> iAnywhere 11x - I have a timestamp column defaulted to
>>> current timestamp. For some reason this seems to be 13
>> mins >faster than the server time reported by asp.Net
>> using the >Now function!
>>> Sybase - 12:33:44
>>> .Net - 12:20:35
>>>
>>> Any idea why this might be happening?
>>>
>>> Thanks
>> --
>> Breck Carter http://sqlanywhere.blogspot.com/
>>
>> RisingRoad SQL Anywhere and MobiLink Professional Services
>> breck.carter@risingroad.com


Breck Carter [TeamSybase] Posted on 2009-10-23 15:56:08.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__breck.carter@gmail.com>
Newsgroups: ianywhere.public.general
Subject: Re: Timestamp out by 13 mins
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__breck.carter@gmail.com
Message-ID: <udk3e5trmda05iosgfoaq40om3q3cc996g@4ax.com>
References: <gf53e5tsm6kmpidn73s1t7864ksskhjpb0@4ax.com> <4ae1c727.6f48.1681692777@sybase.com>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 23 Oct 2009 08:56:08 -0700
X-Trace: forums-1-dub 1256313368 10.22.241.152 (23 Oct 2009 08:56:08 -0700)
X-Original-Trace: 23 Oct 2009 08:56:08 -0700, vip152.sybase.com
Lines: 100
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7780
Article PK: 6818

I don't see any INSERT... it seems to be a SELECT that is returning an
old value that is displayed as Recorded TimeStamp = 10/23/2009
12:33:44

The SELECT only retrieves what is stored, it does not recalculat
anything.

Breck

On 23 Oct 2009 08:09:27 -0700, gchq wrote:

>> Is the SQL Anywhere server running on one machine, and
>> asp.Net on another machine?
>
>They are both on the same machine...
>>
>> What does the following query say, in dbisql?
>
>
>Here are the test queries
>
>Dim vLoginID As Integer = 0
> strSQL = "SELECT MAX(Login_ID) FROM
>Login_Failed_Log"
> Try
> vLoginID = vHAS.ExecuteScalar(CommandType.Text,
>strSQL)
> Catch ex As Exception
> Label1.Text = ex.Message
> vHAS = Nothing
> Exit Sub
> End Try
> Dim vLastTime As DateTime = Nothing
> strSQL = "SELECT Login_Timestamp FROM
>Login_Failed_Log WHERE Login_ID = " & vLoginID
> Try
> vLastTime = vHAS.ExecuteScalar(CommandType.Text,
>strSQL)
> Catch ex As Exception
> Label1.Text = ex.Message
> vHAS = Nothing
> Exit Sub
> End Try
> vHAS = Nothing
> Dim vTimeout As DateTime =
>DateAdd(DateInterval.Minute, 20, Now)
> Dim vTimeoutString As String = Format(vTimeout,
>"yyyy-MM-dd hh:mm:ss")
>
> Label1.Text = "Login_ID = " & vLoginID & " DB
>Recorded TimeStamp = " & vLastTime
> Label2.Text = "Relogin time will be " &
>vTimeoutString
> Label3.Text = "Current server time is " & Now
>
>
>
>and here is the output
>
>Login_ID = 45 DB Recorded TimeStamp = 10/23/2009 12:33:44
>
>Relogin time will be 2009-10-23 12:40:35
>
>Current server time is 10/23/2009 12:20:35
>
>
>
>
>>
>> SELECT CURRENT TIMESTAMP;
>>
>> Breck
>>
>> On 22 Oct 2009 16:42:24 -0700, gchq wrote:
>>
>> >Hi there
>> >
>> >iAnywhere 11x - I have a timestamp column defaulted to
>> >current timestamp. For some reason this seems to be 13
>> mins >faster than the server time reported by asp.Net
>> using the >Now function!
>> >
>> >Sybase - 12:33:44
>> >.Net - 12:20:35
>> >
>> >Any idea why this might be happening?
>> >
>> >Thanks
>>
>> --
>> Breck Carter http://sqlanywhere.blogspot.com/
>>
>> RisingRoad SQL Anywhere and MobiLink Professional Services
>> breck.carter@risingroad.com

--
Breck Carter http://sqlanywhere.blogspot.com/

RisingRoad SQL Anywhere and MobiLink Professional Services
breck.carter@risingroad.com