|
Home > Archive > BizTalk Server General > June 2004 > Avoid Hard Coding Connection String in Functoid
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Avoid Hard Coding Connection String in Functoid
|
|
| Scott White 2004-06-11, 5:43 pm |
| Presently I have all of these mapping documents that include my conenction string as a parameter into the Looup Functoid. Is there a way I can use a System.Config file, or softcode a way of assigning the connection string to the lookup functoid?
Thanks,
Scott
| |
| Yves Peneveyre 2004-06-20, 11:07 pm |
| Hello Scott,
There are mainly two ways for storing connection string (or other
parameters...).
The first one is to store your connection string in the BTS config file :
BTSNTSvc.exe.config.
I think it is the preffered manner to do this as I can read in this
newsgroup.
The second way is to use a udl file and providing the path and file name to
the lookup functoid.
For example, in your lookup functoid, you will set the second parameter to :
File Name=C:\Path\To\Your\File.udl;
And in your .udl file :
[oledb]
; Everything after this line is an OLE DB initstring
Provider=SQLOLEDB.1;Password=password;Persist Security Info=True;User
ID=userid;Initial Catalog=TheDB;Data Source=MachineName;Extended
Properties="PWD=pwd"
The major drawback with this last solution is that your udl file must be in
the same place in both development and deployement environment.
Hope it helps
Best Regards
Yves Peneveyre
"Scott White" <ScottWhite@discussions.microsoft.com> wrote in message
news:42832A05-BA7A-440B-B581-1DED321A2C89@microsoft.com...
> Presently I have all of these mapping documents that include my conenction
string as a parameter into the Looup Functoid. Is there a way I can use a
System.Config file, or softcode a way of assigning the connection string to
the lookup functoid?
>
> Thanks,
> Scott
|
|
|
|
|