Poslao: 09 Feb 2006 17:18
|
offline
- Pridružio: 18 Apr 2003
- Poruke: 1819
- Gde živiš: Beograd
|
Pomozite please...evo ceo dan se mucim, i vise nemam ni ideja.
Treba da promenim password na access-u, iz delphi-ja naravno.
Znaci, na bazu je stavljen pass, i to je poznato. E sad, novim kacenjem na bazu, treba taj pass promeniti...Koristim Jet 4.0
Kako??
Sve ideje su dobro dosle...ja sam svoje istrosila...
|
|
|
Registruj se da bi učestvovao u diskusiji. Registrovanim korisnicima se NE prikazuju reklame unutar poruka.
|
|
Poslao: 09 Feb 2006 19:08
|
offline
- Srki_82
- Moderator foruma
- Srđan Tot
- Am I evil? I am man, yes I am.
- Pridružio: 12 Jul 2005
- Poruke: 2483
- Gde živiš: Ljubljana
|
Probaj ovako... kada se postavi connection string on izgleda otprilike ovako:
Provider=Microsoft.Jet.OLEDB.4.0;
User ID=Admin;
Password=Password;
Data Source=D:\Path\dbname.mdb;
Mode=ReadWrite;
Extended Properties="";
Persist Security Info=False;
Jet OLEDB:System database="";
Jet OLEDB:Registry Path="";
Jet OLEDB:Database Password="";
Jet OLEDB:Engine Type=5;
Jet OLEDB:Database Locking Mode=1;
Jet OLEDB:Global Partial Bulk Ops=2;
Jet OLEDB:Global Bulk Transactions=1;
Jet OLEDB:New Database Password="";
Jet OLEDB:Create System Database=False;
Jet OLEDB:Encrypt Database=False;
Jet OLEDB:Don't Copy Locale on Compact=False;
Jet OLEDB:Compact Without Replica Repair=True;
Jet OLEDB:SFP=False
Probaj da postavis parametar Jet OLEDB:New Database Password na vrednost koju bi zelela. Kad budes otvorila bazu trebalo bi da se promeni sifra. Nemam Access drajvere pa ne mogu da probam i kazem da li to sigurno radi.
Pogledaj i na google sta ima za "Delphi Access password"
|
|
|
|
Poslao: 10 Feb 2006 09:35
|
offline
- Pridružio: 18 Apr 2003
- Poruke: 1819
- Gde živiš: Beograd
|
Ajde evo sad cu da probam, ali veruj mi sve sto sam mogla da nadjem na google sam probala, i ovo pitanje ovde je bila krajnja mera...
|
|
|
|
Poslao: 10 Feb 2006 12:13
|
offline
- NuLLCoDe
- Legendarni građanin
- Đuro Glumac
- dipl. ing. informatike
- Pridružio: 08 Feb 2004
- Poruke: 3640
- Gde živiš: ApAtIn
|
Ne znam da li si videla ovo:
Use TAdoCommand Control to use that, and it should open the database as exclusive mode,
Here's the sample
procedure TForm1.Button1Click(Sender: TObject);
begin
ADOCommand1.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\db.mdb;'
+ 'Mode=Share Deny Read|Share Deny Write;Jet OLEDB:Database Password=aaa';
AdoCommand1.CommandText := 'alter database password mmm aaa';
AdoCommand1.Execute;
end;
ili ovo...
var
db1, db2, fp1, fp2 : string;
begin
db1:='c:\test\test.mdb'; // original flename
db2:='c:\test\new.mdb'; // new filename
fp1:='password'; //original file password
fp2:='password'; //new file password
try
StatusBar.SimpleText:='Loading driver...';
v := CreateOLEObject('JRO.JetEngine');
try
v.CompactDatabase('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + db1 +
';Persist Security Info=False' + fp1,
'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + db2 +
'x; Jet OLEDB:Engine type=5'+ fp2);
except
on E:Exception do
ShowMessage(E.Message);
end;
finally
v := Unassigned;
StatusBar.SimpleText:='Done.';
end;
end;
|
|
|
|
Poslao: 10 Feb 2006 14:24
|
offline
- Pridružio: 18 Apr 2003
- Poruke: 1819
- Gde živiš: Beograd
|
Hvala svima!!
USPELA SAM!!
Nullcode, ovo tvoje nije bas radilo, ali sam nasla nesto slicno...
evo, pa mozda nekome i zatreba...bas sam se propisno namucila...
// Procedure: ChangeDatabasePassword
// Arguments: AFileName,AOldPassWord,ANewPassWord:string
// Result : boolean
//=============================================================================
function ChangeDatabasePassword(AFileName,AOldPassWord,ANewPassWord:string):boolean;
var
STempFileName:string;
vJE:OleVariant;
begin
STempFileName:=GetTempPathFileName;
try
vJE:=CreateOleObject('JRO.JetEngine');
vJE.CompactDatabase(format(SConnectionString,[AFileName,AOldPassWord]),
format(SConnectionString,[STempFileName,ANewPassWord]));
result:=CopyFile(PChar(STempFileName),PChar(AFileName),false);
DeleteFile(STempFileName);
except
result:=false;
end;
end;
|
|
|
|