Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Database Painter not Rollingback

0 views
Skip to first unread message

Glen Mora

unread,
Jun 7, 2003, 2:50:31 AM6/7/03
to
When issuing the following from the database painter;

create table tmp (x char(1));
insert into tmp values('x');
rollback ;
select * from tmp ;

I should not see 'x' in the result set.

This has really stomped me. I tried all the settings on the ODBC, PB
connection profiles. I also tried 3 installations of PB, I tried 3 different
databases, including the sample database - I give up!

Also, I even tried this in PB 9 same result!!!

Now, I don't know if this was always the case and I just never noticed. I
know for sure it used to work with Oracle 7.3.4 (which I currently don't
have to test).

Thanks in advance.

Environment: PB 6.5.1,
SqlAnywhere 6.0.1.1314 on windows XP, WIN 2000


Alex Osin

unread,
Jun 7, 2003, 7:37:10 AM6/7/03
to
Glen,

You have 'x' in the result set because it's column name, not value.
if you try this
---------------------------------------
create table tmp (col_1 char(1));


insert into tmp values('x');
rollback ;
select * from tmp ;

--------------------------------------
you will see 'col_1' in the result set.

HTH
Alex Osin


"Glen Mora" <mora...@yahoo.com> wrote in message
news:%23RZk6FMLDHA.345@forums-1-dub...

Alex Osin

unread,
Jun 7, 2003, 9:44:57 AM6/7/03
to
Paul,

my point is:
if you are using 'x' as column name and 'x' as value
you will see :
x
x
without rollback
or;
x
with rollback
in the results tab.

Alex Osin

"Paul Horan[TeamSybase]" <paulhATvcisolutionsDOTcom> wrote in message
news:OvWqslPLDHA.315@forums-1-dub...
> "Alex Osin" <alex...@hotmail.com> wrote in message
news:e8sGomOLDHA.315@forums-1-dub...


> > Glen,
> >
> > You have 'x' in the result set because it's column name, not value.
> > if you try this
> > ---------------------------------------
> > create table tmp (col_1 char(1));
> > insert into tmp values('x');
> > rollback ;
> > select * from tmp ;
> > --------------------------------------
> > you will see 'col_1' in the result set.
> >
> > HTH
> > Alex Osin
> >
>
>

> I don't think so.. Have you tried that SQL? You'd see 'col_1' as the
header of the first column, but there would be no
> result set at all...
>
> Glen, make sure you don't have the Autocommit setting turned ON in the
connection profile properties.
>
> --
> Paul Horan[TeamSybase]
> VCI Springfield, MA
> www.vcisolutions.com
>
> Get the two new PB9 Books!
> http://www.pb9books.com?source=newsgroups
>
>


Paul Horan[TeamSybase]

unread,
Jun 7, 2003, 9:29:56 AM6/7/03
to
"Alex Osin" <alex...@hotmail.com> wrote in message news:e8sGomOLDHA.315@forums-1-dub...
> Glen,
>
> You have 'x' in the result set because it's column name, not value.
> if you try this
> ---------------------------------------
> create table tmp (col_1 char(1));
> insert into tmp values('x');
> rollback ;
> select * from tmp ;
> --------------------------------------
> you will see 'col_1' in the result set.
>
> HTH
> Alex Osin
>

Alex Osin

unread,
Jun 7, 2003, 10:09:19 AM6/7/03
to
Sorry,

my fault:
I was using ORACLE DB for testing => no problems.

For ASA 7 rollback doesn't work ( autocommit ON and OFF)

Alex Osin


"Paul Horan[TeamSybase]" <paulhATvcisolutionsDOTcom> wrote in message
news:OvWqslPLDHA.315@forums-1-dub...

Chris Keating

unread,
Jun 8, 2003, 11:52:03 AM6/8/03
to
The semicolon ends the current transaction (equivalent to a commit). Always
terminate your logical group of statements with a semicolon. A database
trace should verify this.

So,

insert into tmp values('x')

-- transaction pending. INSERT is *not* commited
rollback
-- INSERT has been rolledback
select * from tmp;
-- no row in the table

is not equivalent to

insert into tmp values('x');

-- the insert is commited
rollback;
-- nothing to rollback
select * from tmp;
-- shows the commited INSERT

/ck


"Glen Mora" <mora...@yahoo.com> wrote in message

news:#RZk6FMLDHA.345@forums-1-dub...

Glen Mora

unread,
Jun 8, 2003, 12:23:15 PM6/8/03
to
Chris,

Thanks to you all, I thought I was loosing my marbles - I am not loosing
them - I've already lost them!

Apparently, the semicolon is commiting the changes. Of course the only
problem now is without the semicolon PB does not seem to see the next Select
statment.

So,

1 delete from tmp
2 select x 'x' from tmp ;
3 insert into tmp values('3')
4 select x col0 from tmp
5 rollback ;
6 select x col1 from tmp ;

Line 1 is deleting
Line 2 does commit the Delete but gives no result set - BUT no errors
either.
Line 6 is giving me back "3" as the result set . It seems that the Select on
line 4 is commiting the value- weird.

Regarding Alex Osin's statement

"For ASA 7 rollback doesn't work ( autocommit ON and OFF)" should me modifed
to say in PB database painter. b/c I know it works is PB Script and the ASA
utilities - regardless thanks for all responses.

btw, I do have autocommit off (not checked)

Thanks,

/gmk

P.S. It was dumb of me to put as an example the column name as x and the
value also 'x' sorry about that.


"Chris Keating" <Spam_Fre...@iAnywhere.com> wrote in message
news:udcR0ZdLDHA.220@forums-1-dub...

Paul Horan[TeamSybase]

unread,
Jun 8, 2003, 7:27:30 PM6/8/03
to
Chris is confusing the PB database painter with ASA's ISQL utility. In PB, you must have a semicolon after each
discrete statement. There's a property of the connection (RMB - properties in the Database Profiles dialog) where you
specify whether AUTOCOMMIT is "on" or "off". If you have it ON, it will commit each statement individually. So, turn
it off...

--
Paul Horan[TeamSybase]
VCI Springfield, MA
www.vcisolutions.com

"Glen Mora" <mora...@yahoo.com> wrote in message news:OVhIxqdLDHA.345@forums-1-dub...

0 new messages