Requirements:
2 FB6 databases with character set ISO8859_1. Lets call them "caller" and "target".
- In one of them (caller), create this SP:
create or alter procedure check_external (
un varchar(100),
pw varchar(100),
dbc varchar(100) )
returns (
cdate varchar(100) )
as
declare sql varchar(1000);
begin
-- get creation date of external db
sql = 'select mon$creation_date from mon$database';
execute statement :sql as user :un password :pw on external :dbc into :cdate;
suspend;
end;
- Make sure the other database (target) is not connected.
- Fill in placeholders to access target and query its creation date by running this from caller:
select * from check_external('<username>', '<password>', '<host/port:alias>');
result:
335544325 : bad parameters on attach or create database
335544509 : CHARACTER SET "SYSTEM"."ISO88591" is not defined
Data source : Firebird::<host/port:alias>;
At procedure "PUBLIC"."CHECK_EXTERNAL" line: 15, col: 3
[SQLState:42000, ISC error code:335544921]
Notice character set "ISO88591" in the error msg, it should be "ISO8859_1" of course.
BUT: If target is already connected from somewhere else, the statement runs fine.
Requirements:
2 FB6 databases with character set ISO8859_1. Lets call them "caller" and "target".
result:
Notice character set "ISO88591" in the error msg, it should be "ISO8859_1" of course.
BUT: If target is already connected from somewhere else, the statement runs fine.