interbase中的三个API函数的用法---高分重赏(100分)

  • 主题发起人 主题发起人 bigbug
  • 开始时间 开始时间
B

bigbug

Unregistered / Unconfirmed
GUEST, unregistred user!
那位高手知道ISC_ADD_USER ISC_DELETE_USER ISC_MODIFY_USER的用法,最好带个例子
 
ISC_STATUS status[20];
USER_SEC_DATA sec;
sec.server = "kennel";
sec.dba_user_name = "sysdba";
sec.dba_password = "masterkey";
sec.protocol = sec_protocol_tcpip;
sec.first_name = "Socks";
sec.last_name = "Clinton";
sec.user_name = "socks";
sec.password = "2meow!"; /* Note: do not hardcode passwords
*/
sec.sec_flags = sec_server_spec
| sec_password_spec
| sec_dba_user_name_spec
| sec_dba_password_spec
| sec_first_name_spec
| sec_last_name_spec;
isc_add_user(status, &sec);

/* check status for errors */

if (status[0] == 1 && status[1])
{
switch (status[1]) {
case isc_usrname_too_long:
printf("Security database cannot accept long user names/n");
break;
...
}
}
}
 
ISC_STATUS status[20];
USER_SEC_DATA sec;
sec.server = "kennel";
sec.dba_user_name = "sysdba";
sec.dba_password = "masterkey";
sec.protocol = sec_protocol_tcpip;
sec.user_name = "socks";
sec.sec_flags = sec_server_spec
| sec_dba_user_name_spec
| sec_dba_password_name_spec;

isc_delete_user(status, &sec);

/* check status for errors */
if (status[0] == 1 && status[1])
{
switch (status[1]) {
case isc_usrname_too_long:
printf("Security database cannot accept long user names/n");
break;
...
}
 
modify user 和 add user 差不多,只是把add换为modify
 
你的例子好面熟,是从IB_UTIL.H中拷贝的吧,我要的是DELPHI中的用法
尤其是isc_delete_user(status, &sec);这一句
 
问题已经解决了,结束问题
 
后退
顶部