Transactions, Commits and Rollbacks
Johnny Harris
johnny at southshore.com
Fri Oct 11 19:54:45 CDT 2013
Hi Joseph,
Just an example would be: If I had a database that had invoices in it and I
want to delete all the records from the database
for year 1980. The invoices are stored in one table and each line item on
the invoice is stored in another table. I need to be
sure that when an invoice is deleted the line items for that invoice are
also deleted. Of course the key for each invoice is stored as a field
in the invoice items table to perform the delete on.
This is easily done with transactions, but I'm kind of clueless right now of
the best way to achieve it with Valentina.
I wonder if a delete trigger might work reliably?
Any help or ideas you may have are much appreciated.
I don't usually need this type of query often, but when this type of task is
needed it is usually deleting many records.
Thanks,
Johnny Harris
-----Original Message-----
From: Joseph Morgan
Sent: Friday, October 11, 2013 6:27 PM
To: Valentina Developers
Subject: Re: Transactions, Commits and Rollbacks
Hi Johnny,
Can you provide an example of what functionality you are looking to achieve?
(As far as dealing with records in different table)
Joseph
> On Oct 11, 2013, at 5:42 PM, "Johnny Harris" <johnny at southshore.com>
> wrote:
>
> Thanks for the Info François. My main concern is how to deal with records
> in multiple tables.
>
> Maybe Ruslan will get time to suggest the best method available with
> Valentina in the
> absence of transactions.
>
> Best Regards,
> Johnny Harris
>
> -----Original Message----- From: François Van Lerberghe
> Sent: Friday, October 11, 2013 10:37 AM
> To: Valentina List
> Subject: Re: Transactions, Commits and Rollbacks
>
> Ruslan is certainly more competent than me to comment, but AFAIK,
> Valentina
> engine doesn't have this features. At least not completely.
>
> Basically, when I want to update a record,
> 1) I make a cursor (using the class way) in write or nolock mode
> myVCursor = Vdatabase.SqlSelect(mySqlClause...)
> 2) update the fields values needed
> myVCursor.Field(1).value = "someValue"
> 3) and end issuing an update command
> myVCursor.UpdateRecord
> This last command is similar to a "commit"
>
> But when you want update multiple records/tables, this is a problem (I
> think).
> On the other hand, Valentina server as a journaling feature that protect
> you
> against a failure during a complex update.
>
> I'm really waiting this feature (see one my previous post this week).
>
> François Van Lerberghe
> Rue Thier Monty, 15 A
> 4570 Marchin
> +32 (0)85 25 08 25
>
>
> le 11/10/13 14:28, Johnny Harris <johnny at southshore.com> a écrit :
>
>> I¹ve been reading the Valentina documentation and I¹ve not found any
>> information regarding transactions, commits or rollbacks.
>>
>> if these don¹t exist in Valentina, what in the best practice for ensuring
>> all
>> transactions finish successfully?
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina
More information about the Valentina
mailing list