Given a server and filename or server and replica ID, indicates if the specified database is backed by DB2® or not.
@IsDB2(server : file)
@IsDB2(server ; replicaID)
server
Text. The name of the server. Use an empty string ("") to indicate the local computer.
file
Text. The path and file name of the database. Specify the database path and file name using the appropriate format for the operating system.
replicaID
Text. The replica ID of the database.
flag
Boolean
This function will return an error via @Error if:
@IsDB2("":"names.nsf")
@IsDB2(@DbName)
@IsDB2("":"")
@IsDB2( "Belgium" : "mail\\frites.nsf" )
@IsDB2("Cheshire";"852556DO:00576146")
result1 := @IsDB2("":dbname);
result2 := @DB2Schema("":dbname)
@If(@IsError(result1);"Unable to find database or lost server connection";
result1;@If(@IsError(result2);
"Unable to find database or lost server connection";result2);
"Not a DB2 database");
This function works in all contexts where @function use is supported, including view selection formulas, column formulas, and from the Web.
If the database has been replicated to a local replica, and an empty string is specified for the server parameter, @IsDB2 will produce an error on the replica. For this reason, it is extremely important to use @Error processing with @IsDB2 when using relative paths.