PDA

View Full Version : Where to put Ck driver .int file now for both 32 and 64bit in workspace ?



Samuel Pizarro
15-Jun-2020, 09:26 PM
Hi

I normally have a custom "ck driver".int file copy inside each workspace. I don't like changing the default one that ships with DF. I got into issues in the past be uninstalling or reinstalling a client or even studio , and forgot to replace it.. (nightmare)


So , each new workspace I usually make a copy of the driver.int file and place it into data folder of the workspace and make the proper changes there.

Now, we have 2 files, one for each bit-size, but they share same name..

For now, I see no reason to have different settings depending on the bit-size , but who knows ?
If that is true... how to proceed in this case ?

By default 64bit complied exe lives in the same default dir together with the 32bit ones, but just uses a suffix to differentiate them.
How to make them pick-up the right driver.int file ?

Regards

raveens
15-Jun-2020, 11:33 PM
Hi Samuel,

We've moved away from using CK.int files, rather are using the cConnection event called "OnDriverRegistered" to set all the driver attributes within the application itself.

Example:



Procedure OnDriverRegistered String sDriver Integer iDriver Handle hoCLIHandler

Forward Send OnDriverRegistered sDriver iDriver hoCLIHandler

If (sDriver=DB2_DRV_ID) Begin
Set_Attribute DF_DRIVER_USE_CACHE of iDriver to True
Set_Attribute DF_DRIVER_IGNORE_UCASE_SUPPORT of iDriver to False
Set_Attribute DF_DRIVER_FIND_CACHE_TIMEOUT of iDriver to 1000 // 1 second
Set_Attribute DF_DRIVER_JIT_TRESHOLD of iDriver to 1 // 1 Mb (default=10)
End

End_Procedure

Samuel Pizarro
16-Jun-2020, 08:43 AM
Thanks for sharing the approach Raveen.