Re: DFCONNID vs. table.INT
If your previous/original table int file were not using the connection ID terminology then Yes, you have to do it one by one.
Just remind that this has nothing to do with changing from MSSQL to DB2. But in fact changing from old fashion int modela to start using connection Ids
Re: DFCONNID vs. table.INT
HI Samuel
The previous one used DFCONNID, but each table has the previous name DB.
Edgar
Re: DFCONNID vs. table.INT
So, your original DFCONNID had the dbname on it.. and you changed the dbname, and created a new DF ConnectionID ?
Using ConnectionID this way defeats the purpose of having a connectionId. The main goal of creating connectionIDs is to make your INT files stable.
Create connectionID names that is not tied to version, dbnames, or dbms types.. make them generic as possible.
When you need to point the connectionId to a diff target database,, just change the connectionId attributes , but keep the name.
If you are in DF 19.0 , and started to use Managed Connections, you can even have multiple connectionIDs created using the same name,, each of them pointing to different databases.. but only one of them can be "ACTIVE" at a given time.. you select which one will be active.. and the managed connection class will pick the correct one.
REgards
Re: DFCONNID vs. table.INT
If you have to use a new name, couldn't you just do a global search & replace in the files?
ETA: Oops - should've been a rely to Edgar's post not yours Samuel!
Re: DFCONNID vs. table.INT
Re: DFCONNID vs. table.INT
Edgar,
And when we talk about managed connections there is no need to have a meaningful connection ID name anymore. Most people did this (need to do that) in the time the connection ID name was stored in the <driver>.int file. As an example I tend to always use ID1 as the connection ID in the dfconnid.ini file. The only case where it a meaningful name makes sense is when your application uses two or more different databases at the same time; the connection ID name then might make it easier to directly know the name of the database.
Compare this with the name of the workspace (.ws) file. Prior to DataFlex 11 this name needed to be unique (in the early days stored in the registry and later in a workspaces ini file) but since "modern" times the default is "just" config.ws. No need for <Company>.<Application>.ws or something like that.
Re: DFCONNID vs. table.INT
Hi Vincent, Sorry to jump in on this discussion, but I am struggling to see how I can use the new DF19 managed connections. I am using MSSQL.
I am using an application that accesses around 24 tables based in two databases in the same MSSQL instance (around 12 tables in each DB) - using windows login as security.
My two databases we shall call <Live> and <Study> and I wish to use servers called <Home> and <Work>
My Int Files currently have the line "eg"
SERVER_NAME <HOME>;Trusted_Connection=yes;DATABASE=Live for 12 tables or
SERVER_NAME <HOME>;Trusted_Connection=yes;DATABASE=Study for 12 tables
I wish to be able to easily switch from Servers <Home> and <work> without using a panel in the programme.
I imagine I could pass a parameter when loading the programme to act as the Location ID and I know how to do that and then use it as a global variable/property. However I can find no EXAMPLES of how to use this In my INT files.
If I make two records in the SQL connection Manager with the location ID of ID1 - one line for database <Live> and one for database <Study> what do I put into each INT file so that I can create the INT files off site and carry them to work as-is?
If you have an example for me somewhere it would be appreciated.
The old Grey Matter is getting slower at 75!
Kind Regards
David
Re: DFCONNID vs. table.INT
Hi David,
the same Connection ID can be defined more than once in the SQL Connection Manager.
You can switch in the Studio by making one active and the other not.
You can switch at runtime by using a DFCONN.INI file that has that single connection Id defined as needed in that location.
For example:
[Connection1]
Id=ID1
driver=MSSQLDRV
SERVER_NAME <HOME>;Trusted_Connection=yes;DATABASE=Live
trusted_connection=yes
disabled=yes
[Connection2]
Id=ID1
driver=MSSQLDRV
SERVER_NAME <HOME>;Trusted_Connection=yes;DATABASE=Home
trusted_connection=yes
disabled=no
1 Attachment(s)
Re: DFCONNID vs. table.INT
Thanks Dennis,
That was a help thank you. Also I have found the MSQL SQL Connect/Repair wizard which I had never seen before - maybe this is new in Df19.0. I think that I have the measure of it now.
However the programme cannot find the DFconnID.ini file. Presumably this path should have been added to the config file. I get the following error message for each table that I try to repair
[ATTACH=CONFIG]12971[/ATTACH]
I think that this is probably where it should be adding the path to my config file.
I am trying to work out what should be added to the config file in order to indicate the path to DFconnID.ini
Kind Regards and thanks for your help
David