Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

dbSet.deleteRow() vs. dbSet.removeRow()

3 posts in General Discussion Last posting was on 2004-07-08 22:32:00.0Z
Michael Johnson Posted on 2004-07-08 22:14:50.0Z
Sender: 64a0.40edc295.1804289383@sybase.com
From: Michael Johnson
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: dbSet.deleteRow() vs. dbSet.removeRow()
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <40edc81b.64cc.1681692777@sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 8 Jul 2004 15:18:03 -0700, 10.22.241.42
Lines: 35
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 8 Jul 2004 15:09:25 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 8 Jul 2004 15:14:50 -0700
X-Trace: forums-1-dub 1089324890 10.22.108.75 (8 Jul 2004 15:14:50 -0700)
X-Original-Trace: 8 Jul 2004 15:14:50 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:98
Article PK: 8716

Hi Guys,

I have code that populates an empty database from a conduit
on the device. I want to offer an interface to remove
reccords if they have been entered erroniously. I have
tried using both the deleteRow and removeRow calls. Neither
seem to be effective either with or without filtering the
removed rows.

According to the docs, deleteRow just flags it for deletion,
and removeRow actually removes it. I would like to do the
seccond, but could live with the first if the filtering
worked.

Here is one example of what I've tried:
...
dbSet.moveFirst();
searchStr = dbSet.createSearch("EKG_id = " +
EKG_id);

while( dbSet.find( searchStr))
{ dbSet.removeRow();
alert("Did the Delete!");
break;
}
dbSet.commit();
dbSet.close();
alert("Delete Done");
...

When I run this, I see both alerts, but the row is still in
the databsae. Am I missing something, or is the code not
working as advertised?

Mike.


Michael Johnson Posted on 2004-07-08 22:24:54.0Z
Sender: 64dc.40edc9dd.1804289383@sybase.com
From: Michael Johnson
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Re: dbSet.deleteRow() vs. dbSet.removeRow()
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <40edca77.64e0.1681692777@sybase.com>
References: <40edc81b.64cc.1681692777@sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 8 Jul 2004 15:28:07 -0700, 10.22.241.42
Lines: 43
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 8 Jul 2004 15:19:28 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 8 Jul 2004 15:24:54 -0700
X-Trace: forums-1-dub 1089325494 10.22.108.75 (8 Jul 2004 15:24:54 -0700)
X-Original-Trace: 8 Jul 2004 15:24:54 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:99
Article PK: 8715

I just realized that the docs refference both
filterDeleteRecords
filterDeletedRecords

Is it supposed to be filterDeletedRecords?

Mike.

> Hi Guys,
>
> I have code that populates an empty database from a
> conduit on the device. I want to offer an interface to
> remove reccords if they have been entered erroniously. I
> have tried using both the deleteRow and removeRow calls.
> Neither seem to be effective either with or without
> filtering the removed rows.
>
> According to the docs, deleteRow just flags it for
> deletion, and removeRow actually removes it. I would like
> to do the seccond, but could live with the first if the
> filtering worked.
>
> Here is one example of what I've tried:
> ...
> dbSet.moveFirst();
> searchStr = dbSet.createSearch("EKG_id = " +
> EKG_id);
>
> while( dbSet.find( searchStr))
> { dbSet.removeRow();
> alert("Did the Delete!");
> break;
> }
> dbSet.commit();
> dbSet.close();
> alert("Delete Done");
> ...
>
> When I run this, I see both alerts, but the row is still
> in the databsae. Am I missing something, or is the code
> not working as advertised?
>
> Mike.


Michael Johnson Posted on 2004-07-08 22:32:00.0Z
Sender: 64ec.40edcbe0.1804289383@sybase.com
From: Michael Johnson
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Re: dbSet.deleteRow() vs. dbSet.removeRow()
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <40edcc21.64f3.1681692777@sybase.com>
References: <40edca77.64e0.1681692777@sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 8 Jul 2004 15:35:13 -0700, 10.22.241.42
Lines: 48
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 8 Jul 2004 15:26:35 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 8 Jul 2004 15:32:00 -0700
X-Trace: forums-1-dub 1089325920 10.22.108.75 (8 Jul 2004 15:32:00 -0700)
X-Original-Trace: 8 Jul 2004 15:32:00 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:100
Article PK: 17577

Sorry guys blame it on the stupid programer. I had opened
the dbSet in read only mode.

Mike.

> I just realized that the docs refference both
> filterDeleteRecords
> filterDeletedRecords
>
> Is it supposed to be filterDeletedRecords?
>
> Mike.
>
> > Hi Guys,
> >
> > I have code that populates an empty database from a
> > conduit on the device. I want to offer an interface to
> > remove reccords if they have been entered erroniously.
> > I have tried using both the deleteRow and removeRow
> > calls. Neither seem to be effective either with or
> > without filtering the removed rows.
> >
> > According to the docs, deleteRow just flags it for
> > deletion, and removeRow actually removes it. I would
> > like to do the seccond, but could live with the first if
> > the filtering worked.
> >
> > Here is one example of what I've tried:
> > ...
> > dbSet.moveFirst();
> > searchStr = dbSet.createSearch("EKG_id = " +
> > EKG_id);
> >
> > while( dbSet.find( searchStr))
> > { dbSet.removeRow();
> > alert("Did the Delete!");
> > break;
> > }
> > dbSet.commit();
> > dbSet.close();
> > alert("Delete Done");
> > ...
> >
> > When I run this, I see both alerts, but the row is still
> > in the databsae. Am I missing something, or is the code
> > not working as advertised?
> >
> > Mike.