使用Interbase的API本是我的Delphi代碼將用戶添加到Interbase的安全數據庫在Delphi
uses
IBHeader,IBExternals
var
Form7: TForm7;
userData: TUserSecData;
userDataPtr: PUserSecData;
status: array[0..19] of ISC_STATUS;
isc_status: PISC_STATUS;
procedure TForm7.Create_UserClick(Sender: TObject);
begin
{ setup isc_status pointer }
isc_status :[email protected];
{ setup user data pointer to point to user data structure }
userDataPtr :[email protected];
{ setup user data structure }
userData.user_name :='aseem';
userData.password :='xxxxxxx';
userData.protocol :=sec_protocol_local;
userData.dba_user_name :='SYSDBA';
userData.dba_password :='xxxxxxx'; { Don_t hardcode this }
userData.first_name :='asa';
userData.last_name :='sad';
userData.sec_flags :=sec_password_spec or sec_dba_user_name_spec or
sec_dba_password_spec or sec_first_name_spec or sec_last_name_spec;
{ add user to security database }
isc_add_user(isc_status,userDataPtr);
end;
但有像
isc_add_user(isc_status,userDataPtr)一個錯誤;
功能不IBheader.pas發現,IBExternals
能否請你告訴我什麼是這個代碼的問題?
我使用的是Delphi 2007專業版,我使用CodeGear內源文件夾中的IBheader.pas,IBExternals.pas文件。
謝謝jachguate先生這正與功能gds.LoadIBLibrary; –
@Aseem你好。現在考慮我在代碼中修正了一個錯誤(我沒有在它應該傳遞的地方傳遞一個向量)。 – jachguate