Print Thread
Migrating to Oracle 8.1.5 (8i)
#38 09/08/99 11:18 PM
Joined: Sep 1999
Posts: 14
Orem, Utah USA
C
CraigJ Offline OP
Member
OP Offline
Member
C
Joined: Sep 1999
Posts: 14
Orem, Utah USA
We are in the process of migrating our database to 8.1.5 from 7.3.4. We have a DOA app that has problems when run against our test 8.1.5 database. Some calculated columns suddenly have the wrong width and an exception occurs. The SQL is usually something like this:

SELECT *, 'ID:'| |To_Char(ID) Desc
from sometable

The calculated column DESC above might have a field width of 35 under 7.3.4 but under 8.1.5 it will be 30. So far we've only seen this on fields defined with the field editor. Dynamic fields don't have a problem.


------------------
Craig Jensen
PowerQuest Corporation


Craig Jensen
PowerQuest Corporation
Re: Migrating to Oracle 8.1.5 (8i)
#39 09/08/99 11:53 PM
Joined: Sep 1999
Posts: 6
C
Member
Offline
Member
C
Joined: Sep 1999
Posts: 6
Just curios why this is a problem?

Whay do you care the length returned? You could so a RTRIM or LTRIM to get rid of spaces...

Again I do not know what you are doing so thier may be a reason I do not know of this will not work.

------------------
Chris


Chris
Re: Migrating to Oracle 8.1.5 (8i)
#40 09/09/99 12:49 AM
Joined: Sep 1999
Posts: 14
Orem, Utah USA
C
CraigJ Offline OP
Member
OP Offline
Member
C
Joined: Sep 1999
Posts: 14
Orem, Utah USA
I don't realy care about the length returned but DOA does and throws an exception and the application won't run under 8.1.5. I'm wondering why the length is different between Oracle 7 and 8. I also want to know if there is an option in DOA that will let the app run under both Oracle 7 and 8. I can fix the problem for Oracle 8 but then the app will not run under Oracle 7.


------------------
Craig Jensen
PowerQuest Corporation


Craig Jensen
PowerQuest Corporation
Re: Migrating to Oracle 8.1.5 (8i)
#41 09/09/99 07:06 PM
Joined: Sep 1999
Posts: 1
Lisbon, Portugal
P
Member
Offline
Member
P
Joined: Sep 1999
Posts: 1
Lisbon, Portugal
Hello Chris,

There is no way (at least no way I know of) to create a TField in the Field Editor for the DataSet component without indicating its size, so in order to solve this you have two solutions possible (and I had this problem myself):

1. Do not create the fields at design-time (this is the obvious solution and the easy one and I have used it providing I didn't needed to indicate some properties for the fields at design time)

2. The previous solution failed if we had to create non-data fields (Calculated or Lookups fields) because the TOracleDataSet only creates the fields at runtime if there are none allready defined, so, in this case you have to do that creation yourself. In case you don't know how the FieldDefs property has allways (after you calls its update method) the list of all the fields returned by the query and it has a method witch creates the corresponding TField component (Ex: FieldDefs[2].CreateField)

Hope that helped...


Pedro viegas
Digitalis Inform
Re: Migrating to Oracle 8.1.5 (8i)
#42 09/10/99 11:22 AM
Joined: Sep 1999
Posts: 1
Russia
A
Member
Offline
Member
A
Joined: Sep 1999
Posts: 1
Russia
Your must use function SUBSTR :
TO_CHAR(CS_DATE, 'HH24:MI') Oracle7 - 35
TO_CHAR(CS_DATE, 'HH24:MI') Oracle8 - 5
SUBSTR(TO_CHAR(CS_DATE, 'HH24:MI'), 1, 5) -
always 5

Re: Migrating to Oracle 8.1.5 (8i)
#43 09/17/99 02:32 AM
Joined: Sep 1999
Posts: 14
Orem, Utah USA
C
CraigJ Offline OP
Member
OP Offline
Member
C
Joined: Sep 1999
Posts: 14
Orem, Utah USA
Thanks for all the replies. Alex had the best suggestion. Use a SUBSTR around the concatenated columns. I've tested this and it works great. One thing I did find out is that connecting to Oracle 8i DOA computes a much more realistic length for the column. Connecting to Oracle 7 DOA would compute a size much bigger than all the concatenated columns could ever be.


Craig Jensen
PowerQuest Corporation

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.027s Queries: 13 (0.006s) Memory: 2.5206 MB (Peak: 3.0424 MB) Data Comp: Off Server Time: 2024-05-10 19:08:54 UTC
Valid HTML 5 and Valid CSS