Bombi

No Rank
Points: 0
Hi Markus,
The complaint is about the paths which are aborted with Code 2.
Translated: [Exec Error] The PATH ... -instruction terminated with code 2.
You could check your system path if it is too long. AFAIR it should not exceed 2048 characters.
Though I had a look at the given path and could not make out what it was made up from.
At first everything looks as expected in a path but the & sign and the following structure are following a different format.
[Warning: Spoiler!]
Maybe someone else has a better understanding. I will have a look at a later time if I can find some more information.
Read More...
If you are using Firemonkey then your mentioned functionality should be dead easy to implement. Stick things on a TLayout and play about with the Scale.
As for a back/forward function you could list all relevant files in a TStringlist and load easily into a TImage or use some of the existing components.
Quite interesting can be to play about with a TPaintbox. You would find masses of examples in the internet. And once you have employed the TPaintbox for your needs you can easily manipulate the picture to your likes and abilities.
Read More...
I would try following, but I do only guess here:
function checkAudioAvailable: boolean;
var
wic : WAVEINCAPS; // structure to be filled with audio device info
i: integer;
begin
i := waveInGetDevCaps(WAVE_MAPPER, @wic, sizeof(WAVEINCAPS));
result := i = 0;
end;
If I understood this right a missing device should return MMSYSERR_NODRIVER
Read More...
@Remy
Not so important, I was just asking as Tobias seems to use Delphi 7 and I struggled to find out what is working there and what not..
Read More...
@Remy and sorry for hijacking the thread,
I am sometimes struggling as well with Delphi to find out exactly which version supports what class/method etc.
Any hints?
Read More...
For example something along the line of:
unit setup;
interface
uses ADODB;
var
DBconnection: TADOConnection;
DBProvider: string;
DBDirectory: string;
implementation
var
Names: TStringList;
function connect: booelan;
var constr, a, b: string;
begin
DBConnection := TADOConnection.Create;
a := 'Provider=' + DBProvider + ';Password="";User ID=Admin;Data Source=';
b := ';Mode=Share Deny None;Extended Properties="";J' +
'et OLEDB:System database="";Jet OLEDB:Registry Path="";Jet OLEDB' +
':Database Password="";Jet OLEDB:Engine Type=4;Jet OLEDB:Database' +
' Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Gl' +
'obal Bulk Transactions=1;Jet OLEDB:New Database Password="";Jet ' +
'OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=Fa' +
'lse;Jet OLEDB:Don'#39't Copy Locale on Compact=False;Jet OLEDB:Compa' +
'ct Without Replica Repair=False;Jet OLEDB:SFP=False';
constr := a + DBDirectory + 'Papinho.mdb' + b;
if not DBConnection.Connected then
begin
DBConnection.ConnectionString := constr;
DBConnection.ConnectOptions := coConnectUnspecified;
DBConnection.LoginPrompt := False;
DBConnection.Open;
end;
result := DBConnection.Connected;
end;
initialization
DBProvider := 'Missing';
DBDirectory := ''; //ExtractFilePath(ParamStr(0)); //add SysUtils to uses
Names := TStringlist.Create;
Names.Sorted := true;
Names.CaseSensitive := false;
GetProviderNames(Names);
Names.Sort;
for s in Names do
if (pos('Microsoft.Jet.OLEDB.4.0', s)) <> 0 then
DBProvider := s;
if DBProvider = 'Missing' then
for s in Names do
if (pos('Microsoft.Jet.OLEDB', s)) <> 0 then
DBProvider := s;
Names.Free;
if not Connect then raise Exception.Create('Connection to DataBase failed.');
finalization
DBConnection.Close;
end.
Warning, this is not tested and knitted with the hot needle.
This way you can handle your provider and change the path of your database if needed.
I am not sure if that would work like that in Delphi 7 but it gives you at least a direction.
Read More...
Oh dear, now I know why I did not find dependencies on a quick glance.
You do use two concurrent connections to the same DB, that can be done but you would need some unearthly long waiting times to make sure that the DB provider has synchronized everything.
You should create a small unit where you keep your connection public for all forms.
You can just dynamically create your connection in there, for example by creating a class or sticking it into an initialization section.
Read More...
I have not looked to deep into the code but as a quick try you could use a temporary query instead, though I had not found any uses on other design time components. As I do not have Delphi 7 I cannot test.
procedure TTFormPrincipal.FormCreate(Sender: TObject);
var
tempCor: String;
Q: TADOQuery;
begin
//Define o servidor para conexão
unitDadosAplicacao.ServidorConexao := 'www.papinho.com';
unitDadosAplicacao.CodigoVersao := 2;
//Limpa a tabela de arquivos recebidos
{TADOConnection.Close;
TADOConnection.Mode := cmShareExclusive;
sleep(200);
TADOConnection.Open('', '');}
Q := TADOQuery.Create;
Q.Connection := TADOConnection;
Q.SQL.Clear;
Q.SQL.Add('DElETE * FROM arquivos');
Q.ExecSQL;
Q.Free;
{TADOConnection.Close;
TADOConnection.Mode := cmUnknown;
sleep(200);
TADOConnection.Open('', '');}
...
Remove the braces to try if opening the DB exclusive for the deletion makes any difference.
Read More...
If I am not entirely mistaken, you are clearing the table at the startup?
What if you do not assign the datasource at design time but after clearing the table?
Read More...
On a first glance I can see nothing unexpected in your connection string but you could try to change the locking mode from page (0) to record (1).
Have you tried to close and open the connection (and table and datasource) straight after deleting the contents of your table?
You could open the DB exclusive like:
Connection.Close;
Connection.Mode := cmShareExclusive;
sleep(200);
Connection.Open('', '');
// insert code to clear your table here
Connection.Close;
Connection.Mode := cmUnknown;
sleep(200);
Connection.Open('', '');
Read More...
Hi Ray,
I have read about this problem in this forum already but can tell you that it had worked for me alright.
Though due to other problems I had to completely reinstall all my Delphi installations just days prior to the release of the Community Edition, which was a pain. But the switch over from Starter to Community went as smooth as possible.
Read More...
Hi Tobias,
Do you have your DB open in Access at that time?
Can you show us the connection string you are using?
Is it possible that you have a lock on the database?
Or more likely as you just deleted content, your Index could be undefined.
Try something along the line of DBGrid.DataSource.DataSet.First; .
Regards,
Bombinho
Read More...
Hi Richard,
I use the TADOConnection etc. from Data.Win.ADODB and find it pretty self explanatory.
Though as far as I am aware it is not part of all Delphi installations.
Yet, a quick look into my Community Edition made me a happy bunny, it is there.
Regards,
Bombinho
Read More...
I would look into the visual components, especially the component that does the frequent repaint.
Maybe an event has been used that gets triggered by the policy updates?
Read More...
@igy
you just gave me hope. But unfortunately without keeping the installations on separate drives or VMs, I still have not found any way to use a FR4 EM installation from an older Delphi in parallel to the FR5 EM from the Community Edition.
Meanwhile I had to knit a quick and dirty library for myself that provides me with some basic functionality of Fast Report on Fire Monkey.
I think, if I get bored i will have a look soon if I can rebuild this for VCL as well.
Read More...
I started toying around with the Android compiler of the Community Edition.
So far so interesting, but I do not get any app running on Bluestacks 3N.
The Firemonkey logo pops up and after that the app closes down.
There is no problem running other APKs on it, with very few exceptions.
Any hints?
Yes, I know and I do use a phone for debugging but I would prefer if I can run the basic testing on Bluestacks too.
Read More...
Hi Debbie,
I am assuming, you mean this:
stackoverflow.com/questions/5904353/how-...lor-of-my-ttabsheets
Read More...