Tuesday, December 28, 2010

Object IDs

There are times when we get into situtations with ID conflicts in these cases rather than changing the IDs directly in the SQL Dictionary we could use the helper methods in the ReleaseUpdateDB class:

changeFieldByAOTName
changeFieldByName
changeFieldId
changeNameByFieldId
changeTableByAOTName
changeTableByName
changeTableId


We get into ID conflicts when the layers are used as deployment vehicles. Lets take up a a few examples

Case 1

1. Error Message

TableName: EmplTable
Illegal data conversion from original field EMPLTABLE.CITACTUALTITLE to EMPLTABLE.SendMail: Unable to convert data types to anything but character field type (0 to 4). Synchronize database Cannot execute the required database operation. The SQL database has issued an error.

when the error message for table synchronize is displayed it has two parts from orginal details and to details. The from part displays the details existing in the SQLDictionary whereas the "to" part displays the current details as existing in the AOT.

Thus from the above message we can infer that currently there is a field named SendMail in the EmplTable in AOT and the same field id exists with a name CITActualTitle in the database and maybe the data types are also not compatible. So if we change the existing defination in the SQL Dictionary and move the field to a different id so that it does not clash with SendMail field we should be able to resolve the issue.

2. Care a job to renumber the field
ReleaseUpdateDB::changeFieldId(103, 30001, 30002, "EmplTable", "CITACTUALTITLE");


Case 2

1. Error Message
TableName:PYLEmplAccrualCarryFwd
Illegal data conversion from original field CITEMPLMEDICALCUREDATA.RESIDENCENO to PYLEMPLACCRUALCARRYFWD.accrualStartDate: Unable to convert data types to anything but character field type (0 to 3).
Illegal data conversion from original field CITEMPLMEDICALCUREDATA.CURETYPE to PYLEMPLACCRUALCARRYFWD.AccrualEndDate: Unable to convert data types to anything but character field type (0 to 3).
Illegal data conversion from original field CITEMPLMEDICALCUREDATA.ANNUALCURE to PYLEMPLACCRUALCARRYFWD.CarryFwdAccrualEndDate: Unable to convert data types to anything but character field type (0 to 3).
Illegal data conversion from original field CITEMPLMEDICALCUREDATA.TELNO to PYLEMPLACCRUALCARRYFWD.PostingDate: Unable to convert data types to anything but character field type (0 to 3).
Illegal data conversion from original field CITEMPLMEDICALCUREDATA.ADDRESS to PYLEMPLACCRUALCARRYFWD.ActualCalcDate: Unable to convert data types to anything but character field type (0 to 3).
Illegal data conversion from original field CITEMPLMEDICALCUREDATA.EMPLNAME to PYLEMPLACCRUALCARRYFWD.Completed: Unable to convert data types to anything but character field type (0 to 4).
Synchronize database Cannot execute the required database operation. The SQL database has issued an error.

This seems like a bigger issue however thatz not the case the hint in in the fist message if we notice we can see that in this message between the original and new part the table name is also changed. What this means is that the with the id of the current object PYLEMPLACCRUALCARRYFWD there is already a table existing in the database CITEMPLMEDICALCUREDATA now from this point onwards all the field ids in the table would also differ hence all the balance messages.

If we change the table id in the SQLDictionary for CITEMPLMEDICALCUREDATA then the new table PYLEMPLACCRUALCARRYFWD would be created fresh without any conflict with the fields

2. Renumber the table id
ReleaseUpdateDB::changeTableId( 30001, 30016, "CITEMPLMEDICALCUREDATA");

9 comments:

Anonymous said...

Hi,

Thanks for your post, but the job I'm running wuth the ReleaseUpdateDB::changeFieldId does not really change the field id number.

This is my code:

ReleaseUpdateDB::changeFieldId(40240, 40003, 90001, "ERPSLicenseTable", "ActivationCode");

Is there something else I should be doing for this job to run?

Unknown said...

My cousin recommended this blog and she was totally right keep up the fantastic work!











Data Conversion Company in Chennai

Anonymous said...

hello!,I like your writing very so much!
share we be in contact more about your post
on AOL? I require a specialist in this space to unravel my problem.
May be that is you! Taking a look ahead to see you.


Feel free to surf to my web page: How To Make More Money From Home

Anonymous said...

Howdy would you mind letting me know which hosting
company you're working with? I've loaded your blog in 3 different internet browsers and I must say this blog loads a lot faster then most.

Can you recommend a good internet hosting provider at a reasonable price?

Thanks a lot, I appreciate it!

my web-site :: binary options forex
my site > forex strategies

Anonymous said...

I'm not sure why but this web site is loading extremely slow for me. Is anyone else having this issue or is it a problem on my end? I'll check back later on and see if the
problem still exists.

Feel free to visit my webpage tamanho de penis

Anonymous said...

It's very effortless to find out any matter on net as compared to textbooks, as I found this paragraph at this site.

Look into my web blog; http://comoaumentarpeniano.com/

Anonymous said...

What's up everyone, it's my first visit at this website, and paragraph is actually fruitful in support of me,
keep up posting these articles.

My website :: penis grosso

Anonymous said...

Appreciation to my father who stated to me concerning this weblog, this weblog is genuinely awesome.


Here is my page :: http://comoaumentarpeniano.com/

Anonymous said...

Hurrah! At last I got a webpage from where I be capable of in
fact get valuable data regarding my study and knowledge.

Here is my homepage - agrandar pene