[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Display / Use Timestamp data type from Oracle into crystal report

Posted on 2004-09-22
8
Medium Priority
?
1,548 Views
Last Modified: 2012-08-13
Hi,
I am using crystal report 8.5 and my database is Oracle 8i.
I have a field of type "timestamp" in one of the table defined as "DATETIME,  TIMESTAMP(6),  2147483647"
When I try to include this in my report, although the field gets included, it gives me ODBC error generated by oracle of incompatible types followed by crystal report error saying error detected in dll. When i rightclick on the field it shows : Blob Field: "tablename.datetime" followed by other options.
Can anybody throw some light please?
Best Wishes,
Picaso
0
Comment
Question by:picasothakkar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 12127053
Is the name of the field DATETIME?

If so I suspect there is a problem with either Crystal or the ODBC driver or both because DATETIME is a datatype in Crystal and may also be one in the ODBC driver.

mlmcc
0
 
LVL 22

Expert Comment

by:Helena Marková
ID: 12130719
It would be better if you post here your table.
0
 

Author Comment

by:picasothakkar
ID: 12132643
Hi,
As per suggestion from mlmcc, i am in process to get the field name "DATETIME" changed to "LOGDATETIME". Here's the current schema that is giving problem:

[Row, Column, Type, Length]
1  UNIQUEID,  DECIMAL,  10,
2  REQUESTEDBY,  VARCHAR2,  25,
3  DATETIME,  TIMESTAMP(6),  2147483647,
4  RETURNCODE,  VARCHAR2,  50,
5  TRANTYPE,  VARCHAR2,  10,
6  GLOBALUSER,  VARCHAR2,  25,
7  OUTCOME,  VARCHAR2,  10,
8  ERRORMSG,  VARCHAR2,  300,

Thanks in advance,
Picaso
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:picasothakkar
ID: 12137114
I got the field name changed to LOGDATETIME but that still dosen't solve the problem. Any second thoughts?
0
 
LVL 22

Expert Comment

by:Helena Marková
ID: 12140219
In Oracle there cannot be a column of type TIMESTAMP - see this (the registration is free):
http://download-west.oracle.com/docs/cd/A87860_01/doc/appdev.817/a76939/adg04typ.htm#427628
So correct it to:
LOGDATETIME      DATE
0
 

Author Comment

by:picasothakkar
ID: 12143643
i don't know which version of oracle i am using but i do get a resultset when i execute the sql query (select to_char(logdatetime) from loginfo) gives results as:
[Row,  TO_CHAR(LOGDATETIME)]
1  20-SEP-04 06.24.54.000000 PM,
2  20-SEP-04 09.11.55.000000 PM,
3  20-SEP-04 05.13.13.000000 PM,
4  20-SEP-04 05.44.27.000000 PM,
5  20-SEP-04 10.47.53.000000 AM,
6  20-SEP-04 10.48.18.000000 AM,
7  20-SEP-04 10.48.31.000000 AM,
8  20-SEP-04 09.18.22.000000 AM,
9  20-SEP-04 10.08.13.000000 AM,
10  20-SEP-04 10.54.37.000000 AM,
11  20-SEP-04 10.56.19.000000 AM,
........................
Should i use date datatype? does it include time also?
0
 
LVL 22

Accepted Solution

by:
Helena Marková earned 200 total points
ID: 12157781
This result seems to be Oracle 9i or higher. What tool do you use for executing sql query ?

In the DATE datatype there is also time there. In Oracle it is about format mask:

SQL> select to_char(sysdate,'dd.mm.yyyy') from dual;

TO_CHAR(SYSDATE,'DD.MM.YYYY')
-----------------------------
27.09.2004

SQL> select to_char(sysdate,'dd.mm.yyyy hh24:mi:ss') from dual;

TO_CHAR(SYSDATE,'DD.MM.YYYYHH2
------------------------------
27.09.2004 07:26:43

0
 

Author Comment

by:picasothakkar
ID: 12185611
I converted the field to date and things work fine now. My oracle db is 8.0. Thanks henka
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question