Solved

Adding password to Pradox table by SQL

Posted on 1998-11-04
10
142 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
  • 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

856 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