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
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...
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
>
>
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...
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...
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]
VCI Springfield, MA
www.vcisolutions.com
Get the two new PB9 Books!
http://www.pb9books.com?source=newsgroups
"Glen Mora" <mora...@yahoo.com> wrote in message news:OVhIxqdLDHA.345@forums-1-dub...