Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 12 total
Thread DBISAM INIFile simulator
Thu, Jan 5 2006 1:20 PMPermanent Link

"Ralf Mimoun"
Hi,

here is my IniFile simulator class. Not pretty, but it works. It uses GUIDs
as ID fields, but of course you can change it. Beside
Read/WriteInteger/Boll/String etc, it contains methods to store and read
DevExpress EQGrid settings, know default values and user values. Means: you
can store application wide settings and user settings in one table.

The fields:

- ID, GUID, every table should have one

- BenutzerID (UserID), GUID

- Section, VARCHAR(250)

- Ident, VARCHAR(250)

- Value, Memo - you never know...

Comments are in German, so have fun translating Smile

Ralf





Attachments: rmDBISAMINITable.zip
Thu, Jan 5 2006 3:38 PMPermanent Link

Joze
Ralf  wrote:
>here is my IniFile simulator class. Not pretty, but it works.

Hi Ralf,

I am new to Dbisam and I like to study others code to learn something new.

I see in your code you have code:

     INITable.Database.StartTransaction(TransactionTableList);
     ...  
     try
       INITable.Edit;
       INITable.FieldByName(FValueFieldName).AsString := Value;
       INITable.Post;
       if InTransaction = False then begin         <== ????
         INITable.Database.Commit(False);
       end;
     except
       if InTransaction = False then begin         <== ????
         INITable.Database.Rollback;
       end;
     end;

Why do you call Commit or Rollback if InTransaction = False?

I would expect code like

INITable.Database.StartTransaction(TransactionTableList);
try
 ... edit
 ... post
 Commit
except
 if InTransaction then
    Rollback
end

or I don't understand Dbisam manuals correct

TIA for your answer

Regards,

Joze
Thu, Jan 5 2006 4:00 PMPermanent Link

Joze
Ralf,

forget my question. I was to quick with my question. I see your logic.

My first impression was wrong because you have local variable InTransaction
and I mixed it with Database. InTransaction.

Best regards,

Joze
Thu, Jan 5 2006 5:02 PMPermanent Link

Steve Forbes

Team Elevate Team Elevate

Hi Ralf,

Thanks for sharing! Very nice little unit.

> Comments are in German, so have fun translating Smile

Won't have much trouble there, .. you are a man of very few words when it
comes to commenting <bg>

Best regards

Steve

"Ralf Mimoun" <nospam@rad-on.de> wrote in message
news:3A07087A-80D2-4DD9-9821-CE1E2859C664@news.elevatesoft.com...
> Hi,
>
> here is my IniFile simulator class. Not pretty, but it works. It uses
> GUIDs as ID fields, but of course you can change it. Beside
> Read/WriteInteger/Boll/String etc, it contains methods to store and read
> DevExpress EQGrid settings, know default values and user values. Means:
> you can store application wide settings and user settings in one table.
>
> The fields:
>
> - ID, GUID, every table should have one
>
> - BenutzerID (UserID), GUID
>
> - Section, VARCHAR(250)
>
> - Ident, VARCHAR(250)
>
> - Value, Memo - you never know...
>
> Comments are in German, so have fun translating Smile
>
> Ralf
>
>

Fri, Jan 6 2006 7:07 AMPermanent Link

"Ralf Mimoun"
Joze wrote:
> Ralf,
>
> forget my question. I was to quick with my question. I see your logic.
>
> My first impression was wrong because you have local variable
> InTransaction and I mixed it with Database. InTransaction.

Ok, the variable name is not optimal SmileBut because you can't start a
transaction while another is going on, this is the only way I see.

Ralf

Fri, Jan 6 2006 8:34 AMPermanent Link

"Ralf Mimoun"
Steve Forbes wrote:
> Hi Ralf,
>
> Thanks for sharing! Very nice little unit.
>
>> Comments are in German, so have fun translating Smile
>
> Won't have much trouble there, .. you are a man of very few words
> when it comes to commenting <bg>

I wrote it only for inhouse usage, and you must admit that its very straight
forward SmileI know developers commention TrmDBISAMIniTable.WriteInteger with
//Writes an Integer to the INI table surrogate. Come on Smile

Ralf

Fri, Jan 6 2006 8:36 AMPermanent Link

Steve Forbes

Team Elevate Team Elevate

Hi Ralf,

> //Writes an Integer to the INI table surrogate. Come on Smile

Aaahhh! So that's what WriteInteger does <vbg>

--
Best regards

Steve

"Ralf Mimoun" <nospam@rad-on.de> wrote in message
news:87C73EB7-D781-4002-8F72-2F1D75B9AF4F@news.elevatesoft.com...
> Steve Forbes wrote:
>> Hi Ralf,
>>
>> Thanks for sharing! Very nice little unit.
>>
>>> Comments are in German, so have fun translating Smile
>>
>> Won't have much trouble there, .. you are a man of very few words
>> when it comes to commenting <bg>
>
> I wrote it only for inhouse usage, and you must admit that its very
> straight forward SmileI know developers commention
> TrmDBISAMIniTable.WriteInteger with //Writes an Integer to the INI table
> surrogate. Come on Smile
>
> Ralf
>

Mon, Jan 9 2006 3:25 PMPermanent Link

Many thanks for that.

/Matthew Jones/
Mon, Jan 9 2006 5:00 PMPermanent Link

"Ralf Mimoun"
Matthew Jones wrote:
> Many thanks for that.

Hey, you owe me a beer! Where in UK are you?

Ralf

Tue, Jan 10 2006 9:57 AMPermanent Link

Oh, I can't tell you that since the Lake District is far too popular.

Oh, darn! 8-)

As for the beer, I've not even had a chance to look at the code yet. 8-)
Perhaps an e-beer will have to do for now?

/Matthew Jones/
Page 1 of 2Next Page »
Jump to Page:  1 2
Image