gpt4 book ai didi

oracle - 如何以编程方式从 oracle 表单连接到数据库

转载 作者:行者123 更新时间:2023-12-02 09:01:09 26 4
gpt4 key购买 nike

我正在使用 Oracle Forms 6i,我想使用 pl/sql 代码以编程方式连接到数据库

当表单像下图一样运行时,我不希望最终用户插入用户名和密码以及数据库名称:

I don't want final user to face this dialog

我使用了这样的预制触发器:

begin
execute 'connect to hr/hr@yemensoft';
end;

但返回时出现错误;

error 103 at line2, column 10 encountered the symbol "connect to hr/hr@yemensoft" when expecting one of the following: :=.(@%;

最佳答案

您必须使用LOGON内置过程:

LOGON('hr', 'hr@yemensoft');

LOGON Built-in

Description: Performs the default Oracle Forms logon processing with an indicated username and password. Call this procedure from an On-Logon trigger when you want to augment default logon processing. Syntax

PROCEDURE LOGON(username VARCHAR2, password VARCHAR2); 
PROCEDURE LOGON(username VARCHAR2, password VARCHAR2, logon_screen_on_error BOOLEAN);

关于oracle - 如何以编程方式从 oracle 表单连接到数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47223621/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com