-
Transactions
Hi Everyone,
I have a code that is wrapped in a transaction
..
Begin Trans
select mytable (remote view accessing SQL)
=tableupdate()
end trans
but when i try to debug my code and turned off my pc before issuing end trans,
it still updated mytable which should not be the case. Any help would be
appreciated.. Thanks in advance
Peter
-
Re: Transactions
On 16 Apr 2000 23:27:31 -0700, "peter" <minatay@hotmail.com> wrote:
>
>Hi Everyone,
>
>I have a code that is wrapped in a transaction
>.
>Begin Trans
> select mytable (remote view accessing SQL)
> =tableupdate()
>end trans
>
>but when i try to debug my code and turned off my pc before issuing end trans,
>it still updated mytable which should not be the case. Any help would be
>appreciated.. Thanks in advance
>
Transactions involving a backend should be done either by an SP or
SPT; SPT at a minimum does not respect the VFP Transaction, but
provides a separate mechansim for controlling SPT transactions manual;
it requires that you use SQLSETPROP() to set the Transactions property
of the connection, and the use of SQLCOMMIT()/SQLROLLBACK() to
terminate the transaction.
-
Re: Transactions
Peter,
Help BEGIN TRANSACTION say "Begins a transaction. Transactions are supported
only for tables in a database. ". That's a VFP database. Thus not free
tables, and not for tables that arereferenced in a remote view. Remote
tables accessed by way of ODBC or OLE-DB are handled by their own built-in
transaction features. VFP SQLPassThrough and VFP remote views give you a
direct means of affecting their transaction behavior by setting the
Transaction property og the Connection object with
DBSETPROP(cConnectionname, 'CONNECTION','Transactions', value) or with
SQLSETPROP(nConnectionhandle,'Transactions', value)
Here's the Help text.
Transactions N Contains a numeric value that determines how the
connection manages transactions on the remote table. Transactions may assume
the following values:
1 or DB_TRANSAUTO (from Foxpro.h).
1 is the default. Transaction processing for the remote table is
handled automatically.
2 or DB_TRANSMANUAL (from Foxpro.h).
Transaction processing is handled manually through SQLCOMMIT( ) and
SQLROLLBACK( ).
Read-Write.
>>
-Anders
"peter" <minatay@hotmail.com> wrote in message
news:38faaed3$1@news.devx.com...
>
> Hi Everyone,
>
> I have a code that is wrapped in a transaction
> .
> Begin Trans
> select mytable (remote view accessing SQL)
> =tableupdate()
> end trans
>
> but when i try to debug my code and turned off my pc before issuing end
trans,
> it still updated mytable which should not be the case. Any help would be
> appreciated.. Thanks in advance
>
> Peter
-
Re: Transactions
Anders,
How can you know the connection name of a remote view?
I have tried also sqlsetprop() with my SPT code but still it updated even
if it did not reach the sqlcommit() command.
Thanks.
Peter
"Anders Altberg" <anders.altberg@swipnet.se> wrote:
>Peter,
>Help BEGIN TRANSACTION say "Begins a transaction. Transactions are supported
>only for tables in a database. ". That's a VFP database. Thus not free
>tables, and not for tables that arereferenced in a remote view. Remote
>tables accessed by way of ODBC or OLE-DB are handled by their own built-in
>transaction features. VFP SQLPassThrough and VFP remote views give you a
>direct means of affecting their transaction behavior by setting the
>Transaction property og the Connection object with
>DBSETPROP(cConnectionname, 'CONNECTION','Transactions', value) or with
>SQLSETPROP(nConnectionhandle,'Transactions', value)
>Here's the Help text.
> Transactions N Contains a numeric value that determines how the
>connection manages transactions on the remote table. Transactions may assume
>the following values:
> 1 or DB_TRANSAUTO (from Foxpro.h).
> 1 is the default. Transaction processing for the remote table is
>handled automatically.
>
> 2 or DB_TRANSMANUAL (from Foxpro.h).
> Transaction processing is handled manually through SQLCOMMIT( ) and
>SQLROLLBACK( ).
>
> Read-Write.
>
>>>
>
>-Anders
>
>"peter" <minatay@hotmail.com> wrote in message
>news:38faaed3$1@news.devx.com...
>>
>> Hi Everyone,
>>
>> I have a code that is wrapped in a transaction
>> .
>> Begin Trans
>> select mytable (remote view accessing SQL)
>> =tableupdate()
>> end trans
>>
>> but when i try to debug my code and turned off my pc before issuing end
>trans,
>> it still updated mytable which should not be the case. Any help would
be
>> appreciated.. Thanks in advance
>>
>> Peter
>
>
-
Re: Transactions
The connectionname is stored in you DBC, database container, when you save
the result of a Create Connection dialog. It points to an ODBC DSN. You can
create an array of connectionnamnes with
OPEN DATABASE x
ADBOBJECTS(arrayname, "CONNECTION")
You get a the name of remote view's connection with
DBGETPROP(cViewname, 'VIEW', 'ConnectName' )
If you've opened a remote view you can get the connectionhandle that was
created with
CURSORGETPROP('connecthandle', viewname)
-Anders
"Peter" <minatay@hotmail.com> wrote in message
news:38fbbff0$1@news.devx.com...
>
> Anders,
>
> How can you know the connection name of a remote view?
> I have tried also sqlsetprop() with my SPT code but still it updated even
> if it did not reach the sqlcommit() command.
>
> Thanks.
>
>
> Peter
>
> "Anders Altberg" <anders.altberg@swipnet.se> wrote:
> >Peter,
> >Help BEGIN TRANSACTION say "Begins a transaction. Transactions are
supported
> >only for tables in a database. ". That's a VFP database. Thus not free
> >tables, and not for tables that arereferenced in a remote view. Remote
> >tables accessed by way of ODBC or OLE-DB are handled by their own
built-in
> >transaction features. VFP SQLPassThrough and VFP remote views give you a
> >direct means of affecting their transaction behavior by setting the
> >Transaction property og the Connection object with
> >DBSETPROP(cConnectionname, 'CONNECTION','Transactions', value) or with
> >SQLSETPROP(nConnectionhandle,'Transactions', value)
> >Here's the Help text.
> > Transactions N Contains a numeric value that determines how the
> >connection manages transactions on the remote table. Transactions may
assume
> >the following values:
> > 1 or DB_TRANSAUTO (from Foxpro.h).
> > 1 is the default. Transaction processing for the remote table is
> >handled automatically.
> >
> > 2 or DB_TRANSMANUAL (from Foxpro.h).
> > Transaction processing is handled manually through SQLCOMMIT( ) and
> >SQLROLLBACK( ).
> >
> > Read-Write.
> >
> >>>
> >
> >-Anders
> >
> >"peter" <minatay@hotmail.com> wrote in message
> >news:38faaed3$1@news.devx.com...
> >>
> >> Hi Everyone,
> >>
> >> I have a code that is wrapped in a transaction
> >> .
> >> Begin Trans
> >> select mytable (remote view accessing SQL)
> >> =tableupdate()
> >> end trans
> >>
> >> but when i try to debug my code and turned off my pc before issuing end
> >trans,
> >> it still updated mytable which should not be the case. Any help would
> be
> >> appreciated.. Thanks in advance
> >>
> >> Peter
> >
> >
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks