 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
ÈÇÈß Guest
|
Posted: Sun Oct 08, 2006 10:46 pm Post subject: Database Password Problem |
|
|
Hi
I create a *.db by Database desktop,
Its has two frields, First one name is Alpha as Alphabetic
Second one named Beta as Numberic
Then I make Aplha as Index (No primary , no Alias, no other things)
and so *.px is created by Database Desktop.
After all I put a password ("MyPass") and Exit.
In my BCB5 I want to create a new Project and Open the file
but when I want to give the password to Table I saw there is no way for me.
I have to say that I searche the Internet and I found the Function below and
some weird things I couldn't understand,
This is my first exproence of password protecting Database file, how can I
give the password to my file to avoid showing any password window, I want to
code it myself, I never saw a source of opening password protect file.
Please someone guide me, I'll write the rest of my software by doing this
sample later.
Thanks to all |
|
| Back to top |
|
 |
Antonio Felix Guest
|
Posted: Mon Oct 09, 2006 8:10 am Post subject: Re: Database Password Problem |
|
|
"ÈÇÈß" <babak_info (AT) Dont (DOT) spam> wrote:
| Quote: | Hi
I create a *.db by Database desktop,
Its has two frields, First one name is Alpha as Alphabetic
Second one named Beta as Numberic
Then I make Aplha as Index (No primary , no Alias, no other things)
and so *.px is created by Database Desktop.
After all I put a password ("MyPass") and Exit.
In my BCB5 I want to create a new Project and Open the file
but when I want to give the password to Table I saw there is no way for me.
|
Hi,
You need to use TSession->AddPassword(...)
void __fastcall AddPassword(const AnsiString Password);
Description
Call AddPassword to provide a password for a session prior to opening an encrypted Paradox table that requires a password. If an application opens a Paradox table that requires a password for access, the session does not have a password assigned to it, and the application does not provide its own OnPassword event handler, C++Builder displays a dialog box prompting the user for a valid password before allowing table access.
For example, to provide the String literal “secret” as a password for the session:
Session->AddPassword("secret");
Note: If an application defines its own OnPassword event handler, the handler should call this method to add passwords for the session. All passwords assigned by AddPassword should be deleted with RemoveAllPasswords or RemovePassword before an application closes.
See the Online Help for further reference
HTH
Antonio |
|
| Back to top |
|
 |
ÈÇÈß Guest
|
Posted: Tue Oct 10, 2006 2:30 am Post subject: Re: Database Password Problem |
|
|
I'm exteremely thankful, my vig problem is solved now  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|