Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

From my code I know, that a date is spelled yyyy-mm-dd inside an insert statement but in the output of request level logging the statement is logged with the date in the form yyyy/mm/dd.

Have I mismatched any option?

Version is

asked 05 Nov '10, 07:53

Martin's gravatar image

accept rate: 14%

What API are you using? I ran some tests (using dbisqlc) and I am not seeing the behaviour that you are seeing.

Here is one test that I tried:

  • start the engine (on windows) using:

    start dbeng11 -z -zo rll.txt -zr all -o console.txt db11.db

  • start dbisqlc and issue these statements:

    create table foo( i int default autoincrement, t timestamp ); insert into foo( t ) values( '2010-1-10 10:30' ); insert into foo( t ) values( '2010/2/20 10:30pm' ); commit select * from foo; drop table foo;

  • exit from dbisqlc and shutdown the engine

Here is the output from the select statement:

i   t
1   2010-01-10 10:30
2   2010-02-20 22:30

What I see in the request level log (rll.txt) is:

1105 193436.968,<,1,CONNECT
=,<,1,EXEC_IMM,create table foo ( i int default autoincrement, t timestamp )
1105 193512.684,<,1,EXEC_IMM,insert into foo( t ) values( '2010-1-10 10:30' )
+10600,<,1,EXEC_IMM,insert into foo( t ) values( '2010/2/20 10:30pm' )

For completeness, here is what I see in the console log (console.txt):

I. 11/05 19:34:31. 1: -z
I. 11/05 19:34:31. 2: -zo
I. 11/05 19:34:31. 3: c:\rll.txt
I. 11/05 19:34:31. 4: -zr
I. 11/05 19:34:31. 5: all
I. 11/05 19:34:31. 6: -o
I. 11/05 19:34:31. 7: c:\console.txt
I. 11/05 19:34:31. 8: db11.db
I. 11/05 19:34:34. Now accepting requests
I. 11/05 19:34:37. Connection ID 1: Internal app 'dbisqlc'
I. 11/05 19:34:37. Connection ID 1: "DBA" connected to database "db11" from SQL Anywhere 11.0.1 (2410) client over SharedMemory

Note that the RLL shows that the timestamp strings are passed to the engine as they were entered and the result (from the select) is what is expected - the '2010/2/20' was displayed as '2010-02-20'.

Note also that the timestamp at the beginning of the RLL is fixed to be in 'mmdd hhnnss.sss' format and the timestamp in the console log is fixed to be 'mm/dd hh:nn:ss' format.

So I suspect that the front-end API that you are using (I'm guessing .net or jdbc perhaps?) is changing the timestamp format before sending it to the database server.

FWIW: I am using a debug build but I do not believe that the build number should matter in this case since I do not know of any changes that have been made that would affect the RLL formatting.

permanent link

answered 05 Nov '10, 23:56

Mark%20Culp's gravatar image

Mark Culp
accept rate: 41%

I used dbserv11 -z and -o and enabled request level logging by setting the option during runtime. I was using odbc driver.

(06 Nov '10, 11:40) Martin
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 05 Nov '10, 07:53

question was seen: 2,173 times

last updated: 05 Nov '10, 23:56