PDA

View Full Version : Connection IDs



MrHalland
11-Apr-2017, 07:17 AM
Hi!

I have created a couple of connection IDs.

Is there a tool for setting all the existing .INT files to use the connection id instead of the existing connection string, or should i simply use a text editor with search and replace?

Nils G. Svedmyr
11-Apr-2017, 07:39 AM
Yes there is. You got it already in the beta version of the Database Update Framework. See last tab-page of the DbUpdateFrameworkTests.src

Hope this helps.

Dennis Piccioni
11-Apr-2017, 11:18 AM
Hi Martin,

if you are using DataFlex 19.0, you can use the SQL Connect/Repair wizard from the Database menu and choose the Repair option. This will 'repair' any INT files to use the Connection ID you have defined. You can run this repeatedly with as many Connection Ids and table combinations as you wish.

phvwijk
11-Apr-2017, 01:30 PM
Dennis,

does not do the Alias files.

Peter

phvwijk
12-Apr-2017, 08:43 AM
Dennis,

Found out today that many of my fd definitions have been changed. Where I had the DateTime defined as being a Date in DF it was changed to DateTime

#REPLACE Ded_Hist.Date |FM1004,16

which was at first.

#REPLACE Ded_Hist.Date |FD1004,16


Not sure if it was the repair wizard. Maybe will test it again later today.


Peter

phvwijk
12-Apr-2017, 07:20 PM
Hi,

If you run the repair wizard the following happens:

It changes all DateTime fields which were defined as a dataflex Type "Date" field and have an index defined on the field to a DateTime field. This happens in the Int file and the newly created fd file.

Int Before


FIELD_NUMBER 1
FIELD_INDEX 1
FIELD_RELATED_FILE 501
FIELD_RELATED_FIELD 1

FIELD_NUMBER 3
FIELD_INDEX 1

FIELD_NUMBER 5
FIELD_INDEX 2


Fd Before


#REPLACE Emp_Hifi.Date_Of_Hire |FM738,3
#REPLACE Emp_Hifi.Date_Of_Prob |FD738,4
#REPLACE Emp_Hifi.Date_Of_Exit |FM738,5
#REPLACE Emp_Hifi.Starting_Wage |FN738,6



After


FIELD_NUMBER 1
FIELD_INDEX 1
FIELD_RELATED_FILE 501
FIELD_RELATED_FIELD 1

FIELD_NUMBER 3
FIELD_TYPE DATETIME
FIELD_INDEX 1

FIELD_NUMBER 5
FIELD_TYPE DATETIME
FIELD_INDEX 2


Fd After


#REPLACE Emp_Hifi.Date_Of_Hire |FD738,3
#REPLACE Emp_Hifi.Date_Of_Prob |FD738,4
#REPLACE Emp_Hifi.Date_Of_Exit |FD738,5
#REPLACE Emp_Hifi.Starting_Wage |FN738,6



So why is this happening, I think it should not. And secondly why, as far as I checked, only the datetime fields which are indexed

Peter

Martin Moleman
13-Apr-2017, 02:31 AM
I see it too. Looks like a bug to me. We will check it out.

Clive Richmond
13-Apr-2017, 03:00 AM
Hi Peter,


It changes all DateTime fields which were defined as a dataflex Type "Date" field and have an index defined on the field to a DateTime field. This happens in the Int file and the newly created fd file.


Just a thought. But is it possible the driver's int file being found is defaulting the mappings to an older schema mapping type?

Up until DataFlex 19.0 this would have been:


; DEFAULT_MAP_DF_TO_SQL_TYPE_SCHEMA MAP_DF_TO_SQL_TYPE_SQL2000

; MAP_DFDATE_TO_SQLTYPE datetime

(mssqldrv.int - I am assuming you are using MS-SQL.)

phvwijk
13-Apr-2017, 12:56 PM
Hi Clive



Just a thought. But is it possible the driver's int file being found is defaulting the mappings to an older schema mapping type?


If that would be the case I would expect it work the same for all DateTime fields. But it is not the case. It looks like only indexed field are mapped again. Repair is repair not change something. But repair is maybe doubtful what it should do. Reset to defaults? Leave what is done. Only correct what is wrong but what is wrong.

Possible one will and up with more settings what gets done in the repair or not.

Peter