Veritabanı CD de olacak -CD den kopyalamayı engelleme (yeni)
Forum kuralları
Forum kurallarını okuyup, uyunuz!
Forum kurallarını okuyup, uyunuz!
Veritabanı CD de olacak -CD den kopyalamayı engelleme (yeni)
Arkadaşlar fihrist gibi bi program var. Bu programın veritabanını CD den okumasını istiyorum. Kullanıcı hiç bir ayar yapmadan direkt takacak CD yi ve programı çalıştıracak.
Kolay gelsin...
Kolay gelsin...
En son sako tarafından 27 May 2004 11:16 tarihinde düzenlendi, toplamda 1 kere düzenlendi.
DOĞUNUN SINIR TAŞI ERZURUM'UN DADAŞ'I
EFE'Sİ VAR İZMİR'İN EĞİLMEZ TÜRK' ÜN BAŞI
EFE'Sİ VAR İZMİR'İN EĞİLMEZ TÜRK' ÜN BAŞI
autorun.inf diye text bir dosya oluşturup, örneğin içine
şeklinde yaz ve cd ye senin programlarınla birlikte kaydet. Bilgisayarda Autorun özelliği açıksa cd yi takınca direkt programim.exe adlı program çalışacaktır.
Kod: Tümünü seç
[AutoRun]
open=programim.exe
icon=programim.exe,0
Bilgiyi paylaşarak artıralım! Hayatı kolaylaştıralım!!
Hocam cevap burda, kusura bakma ingilizce. Belki biliyorsun hemen kullanırsın diye gönderiyorum. Bir çeviren olmazsa bir ara bakarım çevirisine :
bdn.borland.com
Article #16333: Accessing Paradox Tables on CD or Read-Only Drive
Technical Information Database
TI1333D.txt Accessing Paradox Tables on CD or Read-Only Drive
Category
atabase Programming
Platform :All
Product
elphi All
Description:
This Technical Information document will step through the concepts
regarding accessing Paradox tables which are located on a CD-ROM or
any read-only device.
The Paradox locking scheme requires the existence of a PDOXUSRS.LCK
file to handle its locking logic. This file is generally created at
run-time and resides in the directory which also contains the tables.
However, with a CD-ROM there is not a way to create this file at
run-time on the CD-ROM. The solution is simple, we create this file
and put it on the CD-ROM when the CD is pressed. The following steps
will give you a very simple utility program for creating the
PDOXUSRS.LCK file which you will then copy to the CD-ROM image.
1. Starting with a blank project add the following components: TEdit,
TButton and TDatabase.
2. In the OnClick event for the button use the following code:
procedure TForm1.Button1Click(Sender: TObject);
begin
if ChkPath then
Check(DbiAcqPersistTableLock(Database1.Handle,
'PARADOX.DRO','PARADOX'));
end;
3. The ChkPath function is a user defined method of the form. It will
simply check the path entered in the Edit box and make sure it exists.
Here is the function:
function TForm1.ChkPath : Boolean;
var
s : array[0..100] of char;
begin
If DirectoryExists(Edit1.Text) then begin
DataBase1.DatabaseName:= 'TempDB';
DataBase1.DriverName:= 'Standard';
DataBase1.LoginPrompt:= false;
DataBase1.Connected := False;
DataBase1.Params.Add('Path=' + Edit1.Text);
DataBase1.Connected := TRUE;
Result := TRUE;
end
else begin
StrPCopy(s,'Directory : ' + Edit1.text + ' Does Not Exist');
Application.MessageBox(s, 'Error!', MB_ICONSTOP);
Result := FALSE;
end;
end;
{ Note: Don't forget to put the function header in the public section
of the form.}
4. There is one more thing you need to add before compiling, in the
Uses statement at the top of the unit add the following units:
Delphi 1.0: FileCtrl, DbiProcs, DbiTypes, DbiErrs.
Delphi 2.0: FileCtrl , BDE
When you have compiled and executed the utility program, it will
create two files in the directory you specified. The two files created
are: PDOXUSRS.LCK and PARADOX.LCK.
Note: The PARADOX.LCK file is only necessary when accessing Paradox for
DOS tables so you can delete it.
5. The only thing left for you to do is copy the remaining file
(PDOXUSRS.LCK) to the CD-ROM image. Of course your tables will be
Read-Only.
Note: If you want to clean up this utility for future use, you can
change the text property of the Edit box to be some default directory
and change the Caption property of the Button to be something more
meaningful.
Here is the final version of the code:
bdn.borland.com
Article #16333: Accessing Paradox Tables on CD or Read-Only Drive
Technical Information Database
TI1333D.txt Accessing Paradox Tables on CD or Read-Only Drive
Category

Platform :All
Product

Description:
This Technical Information document will step through the concepts
regarding accessing Paradox tables which are located on a CD-ROM or
any read-only device.
The Paradox locking scheme requires the existence of a PDOXUSRS.LCK
file to handle its locking logic. This file is generally created at
run-time and resides in the directory which also contains the tables.
However, with a CD-ROM there is not a way to create this file at
run-time on the CD-ROM. The solution is simple, we create this file
and put it on the CD-ROM when the CD is pressed. The following steps
will give you a very simple utility program for creating the
PDOXUSRS.LCK file which you will then copy to the CD-ROM image.
1. Starting with a blank project add the following components: TEdit,
TButton and TDatabase.
2. In the OnClick event for the button use the following code:
procedure TForm1.Button1Click(Sender: TObject);
begin
if ChkPath then
Check(DbiAcqPersistTableLock(Database1.Handle,
'PARADOX.DRO','PARADOX'));
end;
3. The ChkPath function is a user defined method of the form. It will
simply check the path entered in the Edit box and make sure it exists.
Here is the function:
function TForm1.ChkPath : Boolean;
var
s : array[0..100] of char;
begin
If DirectoryExists(Edit1.Text) then begin
DataBase1.DatabaseName:= 'TempDB';
DataBase1.DriverName:= 'Standard';
DataBase1.LoginPrompt:= false;
DataBase1.Connected := False;
DataBase1.Params.Add('Path=' + Edit1.Text);
DataBase1.Connected := TRUE;
Result := TRUE;
end
else begin
StrPCopy(s,'Directory : ' + Edit1.text + ' Does Not Exist');
Application.MessageBox(s, 'Error!', MB_ICONSTOP);
Result := FALSE;
end;
end;
{ Note: Don't forget to put the function header in the public section
of the form.}
4. There is one more thing you need to add before compiling, in the
Uses statement at the top of the unit add the following units:
Delphi 1.0: FileCtrl, DbiProcs, DbiTypes, DbiErrs.
Delphi 2.0: FileCtrl , BDE
When you have compiled and executed the utility program, it will
create two files in the directory you specified. The two files created
are: PDOXUSRS.LCK and PARADOX.LCK.
Note: The PARADOX.LCK file is only necessary when accessing Paradox for
DOS tables so you can delete it.
5. The only thing left for you to do is copy the remaining file
(PDOXUSRS.LCK) to the CD-ROM image. Of course your tables will be
Read-Only.
Note: If you want to clean up this utility for future use, you can
change the text property of the Edit box to be some default directory
and change the Caption property of the Button to be something more
meaningful.
Here is the final version of the code:
Kod: Tümünü seç
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls,
Forms, Dialogs, DB, StdCtrls, FileCtrl,
{$IFDEF WIN32}
BDE;
{$ELSE}
DbiProcs, DbiTypes, DbiErrs;
{$ENDIF }
type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
Database1: TDatabase;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
function ChkPath : Boolean;
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
function TForm1.ChkPath : Boolean;
var
s : array[0..100] of char;
begin
If DirectoryExists(Edit1.Text) then begin
DataBase1.DatabaseName:= 'TempDB';
DataBase1.DriverName:= 'Standard';
DataBase1.LoginPrompt:= false;
DataBase1.Connected := False;
DataBase1.Params.Add('Path=' + Edit1.Text);
DataBase1.Connected := TRUE;
Result := TRUE;
end
else begin
StrPCopy(s,'Directory : ' + Edit1.text + ' Does Not Exist');
Application.MessageBox(s, 'Error!', MB_ICONSTOP);
Result := FALSE;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if ChkPath then
Check(DbiAcqPersistTableLock(Database1.Handle,
'PARADOX.DRO','PARADOX'));
end;
end.
daha öncede yazmıştım paradox veritabanı kullanacaksanız bazı dosyaların exe ile aynı dizinde bulunması yeterli hiç bir kuruluma ayara gerek yok.
BANTAM.DLL
BLW32.DLL
CEEUROPE.BTL
CHARSET.CVB
EUROPE.BTL
IDAPI32.DLL
IDASCI32.DLL
IDBAT32.DLL
IDDR32.DLL
IDPDX32.DLL
IDR20009.DLL
IDSQL32.DLL
OTHER.BTL
USA.BTL
BANTAM.DLL
BLW32.DLL
CEEUROPE.BTL
CHARSET.CVB
EUROPE.BTL
IDAPI32.DLL
IDASCI32.DLL
IDBAT32.DLL
IDDR32.DLL
IDPDX32.DLL
IDR20009.DLL
IDSQL32.DLL
OTHER.BTL
USA.BTL
Bilgi paylaşıldıkça güzeldir.
CD de olan bu programın CD den kopyalanmasını engelleyebileceğim bir yöntem varmı acaba. Benim düşüncem eğer CD lerin kendilerine ait bir seri nulmarası varsa programdan bunu okutup çalışmasını sağlamak gibi bişey. Acaba bu mümkünmü. Yoksa bunu yapabilen programlar varmı arkadaşlar
Kolay gelsin......
Kolay gelsin......
DOĞUNUN SINIR TAŞI ERZURUM'UN DADAŞ'I
EFE'Sİ VAR İZMİR'İN EĞİLMEZ TÜRK' ÜN BAŞI
EFE'Sİ VAR İZMİR'İN EĞİLMEZ TÜRK' ÜN BAŞI
clientdataset
aynı uygulamanın benzerini bende yaptım..
client dataset kullanın gerisi gelir..
zaten bilgileri table nesnesinden alabiliyor..
ayrıca basit fonksiyonları da kullanabilirsiniz...
(bazı sql)....
sadece artan sayılarda biraz uğraşmanız gerekebnilir..
delphi nini yeni sürüümünde bu olabilir benim kullandığım delphi6 da yoktu...
client dataset kullanın gerisi gelir..
zaten bilgileri table nesnesinden alabiliyor..
ayrıca basit fonksiyonları da kullanabilirsiniz...
(bazı sql)....
sadece artan sayılarda biraz uğraşmanız gerekebnilir..
delphi nini yeni sürüümünde bu olabilir benim kullandığım delphi6 da yoktu...
...ROKA...
Re: clientdataset
Örnek bi kod varmı bu konuda acaba. CD den kopyalamayı engelleyebilecek.kadioglu yazdı:aynı uygulamanın benzerini bende yaptım..
client dataset kullanın gerisi gelir..
zaten bilgileri table nesnesinden alabiliyor..
ayrıca basit fonksiyonları da kullanabilirsiniz...
(bazı sql)....
sadece artan sayılarda biraz uğraşmanız gerekebnilir..
delphi nini yeni sürüümünde bu olabilir benim kullandığım delphi6 da yoktu...
DOĞUNUN SINIR TAŞI ERZURUM'UN DADAŞ'I
EFE'Sİ VAR İZMİR'İN EĞİLMEZ TÜRK' ÜN BAŞI
EFE'Sİ VAR İZMİR'İN EĞİLMEZ TÜRK' ÜN BAŞI
mepc yazdı:daha öncede yazmıştım paradox veritabanı kullanacaksanız bazı dosyaların exe ile aynı dizinde bulunması yeterli hiç bir kuruluma ayara gerek yok.
BANTAM.DLL
BLW32.DLL
CEEUROPE.BTL
CHARSET.CVB
EUROPE.BTL
IDAPI32.DLL
IDASCI32.DLL
IDBAT32.DLL
IDDR32.DLL
IDPDX32.DLL
IDR20009.DLL
IDSQL32.DLL
OTHER.BTL
USA.BTL
bu sistem eğer makinada BDE yüklü ise $210c htasını veriyorum .. yani zaten yüklü diyor .. bunu nasıl çözeriz ?