荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: Peter (小飞侠), 信区: Program
标  题: How to automate logon for Paradox tables
发信站: BBS 荔园晨风站 (Tue Jan 26 22:26:12 1999), 转信


     Product: Delphi
     Version: All
     Platform: Windows/Win32



Password automation

Q:  I have a paradox table that uses a password.  How do I make it so
that the form that uses the table comes up without prompting the user
for the password?

A:  The table component's ACTIVE property must be set to FALSE (If
it is active before you have added the pasword, you will be prompted).
Then, put this code in the handler for the form's OnCreate event:

  Session.AddPassword('My secret password');
  Table1.Active := True;

Once you close the table, you can remove the password with
RemovePassword('My secret password'), or you can remove all current
passwords with RemoveAllPasswords.  (Note: This is for Paradox tables
only.)

--
※ 来源:.BBS 荔园晨风站 bbs.szu.edu.cn.[FROM: 192.168.1.3]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店