Hi,
The behavior you are seeing with the **CONNECT** statement is expected. According to the [Developing VQL Stored Procedures](https://community.denodo.com/docs/html/browse/8.0/en/vdp/developer/developing_extensions/developing_stored_procedures/developing_vql_stored_procedures) page of the developer guide, the **EXECUTE** keyword is meant for DDL statements only.
**CONNECT** is not typically considered a DDL (Data Definition Language) statement in the context of SQL databases. **CONNECT** is generally used to establish a connection to a database or another system, rather than to define, modify, or remove the structure of database objects.
In SQL, DDL statements are primarily concerned with schema definition and management, such as creating, altering, and dropping database objects like tables, views, indexes, etc. These operations involve changing the structure or schema of the database rather than establishing a connection.
However, in similar cases, the parser would return a ‘**Query Not Supported**’ error instead of the given success message. As a workaround to access data residing in other databases in Denodo, you can pass the database name in the FROM clause when executing the SELECT statement.
```
(vdb_name IN VARCHAR, prt OUT VARCHAR)
AS (
-- Variaveis de Input
vdb VARCHAR;
-- Variavel de Output
o_count INTEGER;
prt VARCHAR;
CURSOR c1 IS 'SELECT COUNT(*) FROM :vdb.i_apofrp_d_versao';
)
BEGIN
vdb := vdb_name;
OPEN C1 PARAMETERS (vdb) VALUES(vdb);
FETCH C1 INTO o_count;
CLOSE C1;
RETURN ROW (prt) VALUES (o_count);
END
```
If you need to use the **CONNECT DATABASE** command or would like an error message to be thrown, you can raise an enhancement support case for help from our support team.
Hope it helps!