Ciao a tutti.
Sono nuovo ed assai inesperto: sto guardando ASP per la prima volta.
Devo spostare la cartella datasource dentro alla cartella mdb-database (Aruba).
Il mio manuale di GoLive 6.0 dice:
"Per spostare la cartella datasources... controllare include/utils.runtime6.asp nella funzione GetDataSourcePath()"
Per me è arabo! Non ho capito niente!
Chi mi da un aiutino?
Il file che suppongo di dover modificare fa così:
// UTILITY FUNCTIONS
//
// -----------------------------------------------------------------------------
// Return the path to the datasources folder. The only tricky part is finding
// the config folder, which we pluck out of the include path of the current file.
//
// If you'd like to place the datasources outside the config folder, you can
// change the body of this routine to return the path to the datasources. For
// instance:
// {
// return "C:\\dataSourcesFolder\\";
// }
function GetDataSourcePath()
{
var dataSourcesPath = "";
var url = String(Request.ServerVariables("URL"));
var keyword = "DatasourcePath" + url.substring(0, url.lastIndexOf("/"));
if (dataSourcesPath = Application(keyword)) {
return dataSourcesPath;
}
var fileSystem = new ActiveXObject("Scripting.FileSystemObject");
var pathTranslated = String(Request.ServerVariables("PATH_TRANSLATED")) ;
var currentFile = fileSystem.OpenTextFile(pathTranslated, 1); // forReading
var matchExpression = /\s*[<]!--\s*#INCLUDE\s+(FILE|VIRTUAL)="(.*)[\/]include[\/]utils\.runtime[0-9]+\.asp"\s*--[>]/;
while (!currentFile.AtEndOfStream) {
if (matchExpression.exec(currentFile.ReadLine())) {
break;
}
}
if (currentFile.AtEndOfStream) {
return "";
}
if (RegExp.$1 == "FILE") {
dataSourcesPath = Server.MapPath(".") + "/" + RegExp.$2;
} else {
dataSourcesPath = Server.MapPath(RegExp.$2);
}
dataSourcesPath += "/datasources/";
Application(keyword) = dataSourcesPath; // cache
return dataSourcesPath;
}
// -----------------------------------------------------------------------------
// Get the connection string for a datasource.
function GetConnectString(db)
{
var fileSystem = new ActiveXObject("Scripting.FileSystemObject");
var dataSourcesPath = GetDataSourcePath();
if (dataSourcesPath == "") {
return;
}
dataSourcesPath += db;
if (fileSystem.FileExists(dataSourcesPath + ".udl")) {
return "File Name=" + dataSourcesPath + ".udl";
} else if (fileSystem.FileExists(dataSourcesPath + ".dsn")) {
return "FILEDSN=" + dataSourcesPath + ".dsn";
} else if (fileSystem.FileExists(dataSourcesPath + ".mdb")) {
return "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + dataSourcesPath + ".mdb";
} else if (fileSystem.FileExists(dataSourcesPath + ".xdb")) {
return "DSN=" + fileSystem.GetBaseName(dataSourcesPath);
} else {
return "";
}
}
function ConnectString(db) { return GetConnectString(db); } // version 1.0 compatibility
function GetFormValue(name)
{
var r = null;
if ((r=Request(name)).Count > 0
|| (r=Request("~"+name)).Count > 0
|| (r=Request(name+".x")).Count > 0)
return unescape(r);
/* None of the above. */
return "_no_form_value";
}
/*
* Use internet-standard newlines to send/receive the contents of
* text files to/from GoLive.
*/
function canonicalizeCRLF(data) {
return String(data).replace(/\r\n?|\n/g, "\r\n");
}
/*
* Read FILENAME into an array of lines and return it.
* Try to conform to any/all of MacOS (\r) UNIX (\n)
* and Windows (\r\n) line-ending conventions.
* The returned lines do not have the line terminator appended;
* this seems to match the TextStream.ReadLine() method that
* this function replaces.
* NB there may be a 0-length last line, an implementation
* artifact of String.split().
*/
function GL_FileFromTextStream(ts) {
var content = ts.ReadAll();
return content.split(/\r\n?|\n/);
}
Grazie.

Rispondi quotando