Solved

Adding password to Pradox table by SQL

Posted on 1998-11-04
10
143 Views
Last Modified: 2010-04-06
I create a new TTable by SQL like:

SQL.Add ( 'CREATE TABLE "temp.db" (Field1 Char(10)');
now I want to add a password to this Paradox-Table in runtime.

To open it later, I use TSession.AddPassword, that's working just fine.
0
Comment
Question by:Oli2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 3
10 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1345581
Oli2, you don't create a new table by a query. A query just combines tables to a new 'fictive' one. But the query will not exist anymore if you close your program.
0
 
LVL 1

Author Comment

by:Oli2
ID: 1345582
Zif, thanks, but that doesn't help me at all.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1345583
Oli2,

sorry but I don't understand your q'n.

you want to give your query a password protection?

Zif.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Expert Comment

by:ZifNab
ID: 1345584
If you use a TDatabase and you start your query from there, then you can fill in the password and username into the params property or do it with code:

WITH db DO  BEGIN
  LoginPrompt := False;
  Params.Values['USER NAME'] := 'sa';
  Params.Values['PASSWORD'] := '<pwd>';
  Open;
END;

Regards, Zif.

Is this what you need?
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1345585
I understand Oli2's question, he wants to add passwords to protect his table(that's a special function on Paradox), and he wants to do this in programm.

But I think it's impossible, table/query/any dataaccess controls only provide data ACCESSING methods. Adding passwords is not, it can only be done in Database Desktop from Inprise.
0
 
LVL 1

Author Comment

by:Oli2
ID: 1345586
dwwang: you got my problem just exactly right !!
Here's what I think: If the Database Desktop from Inprise can do it, then there's got to be a way. ( isn't the Database Desktop from Inprise written in Delphi ? )
Oli2
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1345587
Yes, but it depends on the structure of Paradox table, which Inprise(Borland) has never published, and even changing from version to version. Public knowledge of Paradox structure are now limited to Version 4.

I even know a site tell people how to crack the password of a table, but not vice versa.

Good luck.
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 50 total points
ID: 1345588
Hi all,

 Why then don't you use the BDE directly? With dbiDoRestructure you can change tables.

I just searched a little bit on the subject and found out this :

look for these examples at :

Example 4: Add a master password to a Paradox table.
Example 5: Add an auxilary password to a Paradox table.
Example 6: Remove a master password from a Paradox table.
Example 7: Remove an auxilary password from a Paradox table.

http://www.inprise.com/devsupport/bde/bdeapiex/dbidorestructure.html

Regards, Zif.
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1345589
Well, that's why Zif is the NO.1 here.

Now I feel myself too lazy  :-(

Thank you for the information, Zif.

Regards,
Wang
0
 
LVL 1

Author Comment

by:Oli2
ID: 1345590
thanks, ZifNab, I found there what I was looking for. I knew I have to do it by calling DBI stuff, but didn't know exactly how. The idea to look for an answer at www.inprise.com didn't come to my mind. Guess that makes the 50 Pts. worth it.
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Connection between libmysql.dll and MySQL Versions 7 119
When I am typing into a TEdit last word repeats 7 161
LAN or WAN ? 11 106
Way to create an iPhone app for my customers 8 45
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question