v7.6 Server-side include file possible?
Is it possible to have a server side include file? Don't want to embed connection string to external table. If so, what does the syntax look like?
Regards,
Steven
Comments
-
I am not sure what you mean by 'include file'. I am familiar with the term in coding (eg C/C++), but not in this context.
You can have a server side script in v7 (not in version 9, except in v7 evaluation scripts). Is that what you are after?
0 -
You can add dlls to the dotnetbin in the designer and engine (restart the engine after) and then you could use the dll within your serverside jscript.net code using the import keyword (which works just like your c++ include would).
That way your connection information would not be exposed to the application, but a better method would be to just create a configuration table and maintenance form in metastorm and then retrieve that string information from the table within your scripts (most of my clients prefer this method). This allows you to easily port code across environments and give you a single repository for connection strings that will work for all your v7.6 procedures.
0 -
Jerome, I was thinking of using of something like similar to what I do in asp classic to include other scripts in server-side jscript or vbscript. I see another post recommending a table to hold external db connection strings. Maybe that's a better approach? Thanks, Steve
0 -
We always use a separate table for parameters for processes (or the system) that may be changed. This is all set up for use without any code or SQL in our standard Library (available from the link below).
I do not think the 'include' approach will work, because you are not dealing with Script, but C# code, and it is compiled, not interpreted. The best way is to have a separate function in a separate Library, and call it from any solution referencing this library. That is what our own Best Practice dictates.
0 -
I often used either the table approach for configuration in the Metastorm database like Jerome mentioned, or storing that information in the Registry. Either way I typically created a small wrapper method in my server side code to do the work of getting the configuration value from the appropriate source, incorporating error checking. Probably no reason this couldn't open a file on your server machine to get the connection strings, but that will likely be more work than the configuration table or registry approach.
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 155 General Questions
- 149 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 33 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories