Solved

Adding password to Pradox table by SQL

Posted on 1998-11-04
10
141 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

776 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