🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.database.bdp
3 messages
3 total messages Started by Bill Walton Thu, 08 Feb 2007 08:57
How to load\save blobs with DBWeb
#40
Author: Bill Walton
Date: Thu, 08 Feb 2007 08:57
49 lines
2671 bytes
Hi

I have project where I have a BDPConnection, BDPDataAdapter, DataSet,
DBWebDataSource, DBWebNavigator and DBWebGrid all connected together to
display\edit a table from an database. This all works fine.

However, one of the columns I also want to edit must be editied using a
3rd party control (fckEditor for html editing) on the form. Its a BLOB
field as well.


What is the correct\best way of synchronising my fckEditor's value with
those of the DBWebDataSource so as when I finally ApplyUpdates, my
DataSet has the correct values for each row ready to be posted ? At the
moment I have got the DBWebDataSource's OnScroll event to be :


procedure TWebForm2.wdsMain_OnScroll(sender: System.Object; e:
Borland.Data.Web.OnScrollEventArgs);
var
  LRowDropped: boolean;
  LType: System.Type;
begin
  wdsMain.SetColumnValue(tblDisplay_List, e.PriorRow, colDescription,
FCKeditor1.Value, LRowDropped);
  if e.CurrentRow<tblDisplay_List.Rows.Count then 
    FCKeditor1.Value:=wdsMain.GetColumnValue(tblDisplay_List,
e.CurrentRow, 'DESCRIPTION', LType).ToString
  else
    FCKeditor1.Value:=cNewPageText;
end;

The idea being that when ever I scoll through the dataset, any changes
made in the fckEditor are sent back to the dataset for the 'PriorRow'
and then the next value is loaded into the fckEditor for the
'CurrentRow'. This so that when I do apply updates, the data is in the
dataset. Unfortunatly, when I insert a row, the dataset doesnt seem to
have the new row in it, so the above code falls over the on the first
line saying 'Row XYZ doesnt exist'. In other words e.PriorRow is out of
bounds.

Am I going about this completly wrong ? There must be a set way of
reading\writing to controls other than DBWeb based controls so as your
dataset\DBWebDataSource stays in sync ready for you to ApplyUpdates..

Any help, much appreciated!
Cheers
Bill.
-- 
Re: How to load\save blobs with DBWeb
#42
Author: Bill Walton
Date: Sat, 10 Feb 2007 10:58
12 lines
883 bytes
Hi everyone,

Not any replies yet :-(

Does anyone know a better place to post this question ?

Thanks
Bill.



-- 
Re: How to load\save blobs with DBWeb
#43
Author: Robin
Date: Tue, 13 Feb 2007 22:24
15 lines
1281 bytes
Bill Walton wrote:
> Does anyone know a better place to post this question ?

Hi Bill,

You could try:

borland.public.delphi.database.dotnet


-- 
Robin.

Australian Bridal Accessories := http://www.bridalbuzz.com.au
Turbo for Noobs (a work in progress) := http://turbofornoobs.blogspot.com/
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads