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.

Has anyone tried saving data?

4 posts in DataWindow .NET Last posting was on 2004-12-10 19:07:05.0Z
FrankG Posted on 2004-12-10 16:38:55.0Z
Sender: 3181.41b9ca38.1804289383@sybase.com
From: FrankG
Newsgroups: sybase.public.datawindow.net
Subject: Has anyone tried saving data?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <41b9d118.324e.1681692777@sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 10 Dec 2004 08:38:48 -0800, 10.22.241.42
Lines: 20
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 10 Dec 2004 08:38:50 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 10 Dec 2004 08:38:55 -0800
X-Trace: forums-1-dub 1102696735 10.22.108.75 (10 Dec 2004 08:38:55 -0800)
X-Original-Trace: 10 Dec 2004 08:38:55 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:976
Article PK: 125402

I am attaching to the demo database. Have a retrieve button
that works.

WebDataWindowControl1.Connect();
WebDataWindowControl1.SetTransaction(transaction1);
WebDataWindowControl1.Retrieve();

My save button has the following code, but I always get an
error on the UpdateData call.
WebDataWindowControl1.UpdateData(true);
WebDataWindowControl1.Commit();

Always get an error
Invalid Operation: UpdateDataa because the DataStore has no
transaction

I slid the transaction1 object on the form, so it was
available and worked for the retrieve button.

I am Probably doing something stupid.


Ken Balakrishnan Posted on 2004-12-10 17:52:05.0Z
From: "Ken Balakrishnan" <kNOeSPAMn@cps92.com>
Newsgroups: sybase.public.datawindow.net
References: <41b9d118.324e.1681692777@sybase.com>
Subject: Re: Has anyone tried saving data?
Lines: 37
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 204.60.85.209
X-Original-NNTP-Posting-Host: 204.60.85.209
Message-ID: <41b9e245$1@forums-1-dub>
Date: 10 Dec 2004 09:52:05 -0800
X-Trace: forums-1-dub 1102701125 204.60.85.209 (10 Dec 2004 09:52:05 -0800)
X-Original-Trace: 10 Dec 2004 09:52:05 -0800, 204.60.85.209
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:979
Article PK: 125403

Is this your actual code? I don't understand why your retrieve button
works, or even why the app compiles -- the Connect() and Commit() methods
are only available on the transaction, not on the web dw control. It should
be:

transaction.Connect();
WebDataWindowControl1.SetTransaction(transaction1);
WebDataWindowControl1.Retrieve();

WebDataWindowControl1.UpdateData(true);
transaction.Commit();

Ken

<FrankG> wrote in message news:41b9d118.324e.1681692777@sybase.com...
> I am attaching to the demo database. Have a retrieve button
> that works.
>
> WebDataWindowControl1.Connect();
> WebDataWindowControl1.SetTransaction(transaction1);
> WebDataWindowControl1.Retrieve();
>
> My save button has the following code, but I always get an
> error on the UpdateData call.
> WebDataWindowControl1.UpdateData(true);
> WebDataWindowControl1.Commit();
>
> Always get an error
> Invalid Operation: UpdateDataa because the DataStore has no
> transaction
>
> I slid the transaction1 object on the form, so it was
> available and worked for the retrieve button.
>
> I am Probably doing something stupid.


FrankG Posted on 2004-12-10 18:38:16.0Z
Sender: 6657.41b9d9bd.1804289383@sybase.com
From: FrankG
Newsgroups: sybase.public.datawindow.net
Subject: Re: Has anyone tried saving data? Oops
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <41b9ed18.67ae.1681692777@sybase.com>
References: <41b9e245$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 10 Dec 2004 10:38:16 -0800
X-Trace: forums-1-dub 1102703896 10.22.241.41 (10 Dec 2004 10:38:16 -0800)
X-Original-Trace: 10 Dec 2004 10:38:16 -0800, 10.22.241.41
Lines: 45
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:980
Article PK: 125406

Typed it on another PC and made transcribing errors. You
are right, this would not work.

My code is exactly as you have written it. I used
transaction1 (the standard object dropped on the form) to
connect and commit.

> Is this your actual code? I don't understand why your
> retrieve button works, or even why the app compiles -- the
> Connect() and Commit() methods are only available on the
> transaction, not on the web dw control. It should be:
>
> transaction.Connect();
> WebDataWindowControl1.SetTransaction(transaction1);
> WebDataWindowControl1.Retrieve();
>
> WebDataWindowControl1.UpdateData(true);
> transaction.Commit();
>
> Ken
>
> <FrankG> wrote in message
> > news:41b9d118.324e.1681692777@sybase.com... I am
> > attaching to the demo database. Have a retrieve button
> that works. >
> > WebDataWindowControl1.Connect();
> > WebDataWindowControl1.SetTransaction(transaction1);
> > WebDataWindowControl1.Retrieve();
> >
> > My save button has the following code, but I always get
> > an error on the UpdateData call.
> > WebDataWindowControl1.UpdateData(true);
> > WebDataWindowControl1.Commit();
> >
> > Always get an error
> > Invalid Operation: UpdateDataa because the DataStore has
> > no transaction
> >
> > I slid the transaction1 object on the form, so it was
> > available and worked for the retrieve button.
> >
> > I am Probably doing something stupid.
>
>


Ken Balakrishnan Posted on 2004-12-10 19:07:05.0Z
From: "Ken Balakrishnan" <kNOeSPAMn@cps92.com>
Newsgroups: sybase.public.datawindow.net
References: <41b9e245$1@forums-1-dub> <41b9ed18.67ae.1681692777@sybase.com>
Subject: Re: Has anyone tried saving data? Oops
Lines: 35
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 204.60.85.209
X-Original-NNTP-Posting-Host: 204.60.85.209
Message-ID: <41b9f3d9$1@forums-1-dub>
Date: 10 Dec 2004 11:07:05 -0800
X-Trace: forums-1-dub 1102705625 204.60.85.209 (10 Dec 2004 11:07:05 -0800)
X-Original-Trace: 10 Dec 2004 11:07:05 -0800, 204.60.85.209
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:983
Article PK: 125409

Hopefully not *exactly* as I wrote it, since I forgot the "1" after
"transaction". :-)

Anyway, pretty much this same code worked fine for me -- I'm just starting
to play with it myself, though, so I don't know that I can help much. Did
you add any other code on the page? All I can think of is that you're doing
something to destroy the transaction before your Save button code gets
called.

<FrankG> wrote in message news:41b9ed18.67ae.1681692777@sybase.com...
> Typed it on another PC and made transcribing errors. You
> are right, this would not work.
>
> My code is exactly as you have written it. I used
> transaction1 (the standard object dropped on the form) to
> connect and commit.
>
>
> > Is this your actual code? I don't understand why your
> > retrieve button works, or even why the app compiles -- the
> > Connect() and Commit() methods are only available on the
> > transaction, not on the web dw control. It should be:
> >
> > transaction.Connect();
> > WebDataWindowControl1.SetTransaction(transaction1);
> > WebDataWindowControl1.Retrieve();
> >
> > WebDataWindowControl1.UpdateData(true);
> > transaction.Commit();
> >
> > Ken
> >