🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.aspdotnet.components.using
Article #152

Re: DBImage

#152
From: Peter Matulich
Date: Tue, 27 Dec 2005 21:56
66 lines
3347 bytes
I learned how to change Records reading a post by Nick Hodges.
I need to add the following next button on click event.
var
psm:IDBPostStateManager;
begin
  BdpDataAdapter1.Active := True;
 //global var
   if myrec  = (Dataset11.Photos.Rows.Count-1) then
   begin
     Label1.text := 'No More Images' ;
     btnNext.enabled := False;
   end else
   begin
     inc(myrec);
     psm := dbWebDataSource1 as IDBPostStateManager;
     psm.SetCurrentRow(self,'Images',myrec );
   end;
end;

I try not to use data aware controls as often as possible. How can I load 
the image from an SQL Blob field to an Image Component on the WebControls 
Palette?

I also have not been able to track down a CurrentRow but I guess it would 
make sense that I would have to manage the current row myself, as I have 
needed to do this in a similar project using javascript.

Is there a way to keep the Adapter Active? for an entire session?

Can you or anyone recommend a good book for ASP.NET related to Delphi?


"Peter Matulich" <peterm@accumedic.com> wrote in message 
news:43b1a25d$1@newsgroups.borland.com...
>I have a SQL table with Images  and Captions and I want to put together 
>sort of a slide show.
>
> I am using BdpConnection,BdpDataAdapter ,a generated typed Dataset and 
> DBWebDataSource.
> I have a DBWebLabel as well as Label off the WebControls.
> The DbImage is linked to the Table called Images, Column called image and 
> the DbDatasource is set to DBWebDataSource1
>
> The OnClick event for Connect is
>  BdpConnection1.Open;
>  BdpDataAdapter1.Active := True;
>  DBWebImage1.DataBind;
>
> The OnClick even for the next button fires
> BdpDataAdapter1.Active := True;
> Label1.Text :=   Dataset1.Images.Item[2].caption;
>
> Here are my questions, bare with me if they are fairly obvious.
> 1) When the Connect Button is fired and the Page is loaded does the 
> BdpDataAdapter1 get deactivated?
> 2) The 'connected' webpage is rendered the databound controls fill with 
> the first rows data. How can I get to the next record, as you know 
> TDataset allowed for First,Next, Prior, Last. etc.  I can get my the next 
> record's caption in the Label1.Text using Dataset1.Images.Item[2].caption, 
> but how would I load the DBWebImage?
>
> Peter
>
>
>
> 
Technical Details
Message-ID: <43b1b824$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!feed2.newsreader.com!newsreader.com!nx01.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43b1a25d$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 21665a,faa9dd313cd5317e
X-Google-Attributes: gid21665a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Peter Matulich" <peterm@accumedic.com>
Newsgroups: borland.public.delphi.aspdotnet.components.using
References: <43b1a25d$1@newsgroups.borland.com>
Subject: Re: DBImage
Date: Tue, 27 Dec 2005 16:56:24 -0500
Lines: 68
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 69.18.162.233
Message-ID: <43b1b824$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1135720484 69.18.162.233 (27 Dec 2005 13:54:44 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!feed2.newsreader.com!newsreader.com!nx01.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail