🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.database.bdp
4 messages
4 total messages Started by Bill Walton Sun, 27 Aug 2006 11:28
DBWebDataSource events dont fire
#119
Author: Bill Walton
Date: Sun, 27 Aug 2006 11:28
37 lines
2488 bytes
Hi,

I have a problem thats been driving me nuts for months now. Basically I
can't get my Delphi 2006 .Net project to update my MSAccess database
when deployed on production web server.

It works fine on my development machine and any of my test servers. The
test servers are apparently configured the same as the production one.
Very simply, install Win2k3, service pack it, and set up IIS to point
to my web application and make sure that folder where the MSAccess
database lives has Read\Write permissions for the IIS user.
Unfortunatly, I do not have access to any of the configuration of the
main web server, so I can only go on what I am told by the people who
administer it.They have assured me it a standard installation Win2k3
and IIS.

When deployed to my production server the
DBWebDataSource.OnApplyChangesRequest event is not firing and this I
assume is why the updates are not working. I know this because I am
logging event calls to a text file on the server. When deployed on a
test server, the DBWebDataSource.OnApplyChangesRequest fires and the
code within it is of course the BDPDataAdapter.AutoUpdate call
necessary to update the DB. Other events of the DBWebDataSource do fire
(e.g. 'OnScroll' and 'OnAfterSetChanges').

I think its got to be something to do with the events of
DBWebDataSource as I can programatically update the database using say
BDPCommands and SQL which would seem to suggest its not permissions
problem. I have lots of pages I have written using the BDP Data
Controls that, so I dont really want to rewrite them.

Help ! I am really close to switching to the dark side and forgetting
about Delphi for web stuff !

Bill.

-- 
Re: DBWebDataSource events dont fire
#120
Author: Bob Swart
Date: Mon, 28 Aug 2006 20:27
36 lines
2548 bytes
Hi Bill,

> When deployed to my production server the
> DBWebDataSource.OnApplyChangesRequest event is not firing and this I
> assume is why the updates are not working. I know this because I am
> logging event calls to a text file on the server. 

And are you sure that your ASP.NET process has *permission* to write to 
that text file on the deployment server? I would use the Trace Log to be 
sure I can see what's going on (remember to enable trace in the web.config)

> test server, the DBWebDataSource.OnApplyChangesRequest fires and the
> code within it is of course the BDPDataAdapter.AutoUpdate call
> necessary to update the DB. Other events of the DBWebDataSource do fire
> (e.g. 'OnScroll' and 'OnAfterSetChanges').

You could try to enable SQL Tracing and then in the OnTrace event of the 
BdpConnection component write the tracing SQL command to the Trace Log.

> I think its got to be something to do with the events of
> DBWebDataSource as I can programatically update the database using say
> BDPCommands and SQL which would seem to suggest its not permissions
> problem. I have lots of pages I have written using the BDP Data
> Controls that, so I dont really want to rewrite them.

I'm sure it's something that can be found and fixed.

> Bill.

Groetjes,
           Bob Swart

-- 
Bob Swart Training & Consultancy (eBob42.com)  Forever Loyal to Delphi
Blog: http://www.drbob42.com/blog - RSS: http://drbob42.com/weblog.xml
New Delphi 2006 Courseware e-books at http://www.eBob42.com/courseware
Re: DBWebDataSource events dont fire
#121
Author: Bill Walton
Date: Tue, 29 Aug 2006 15:12
60 lines
3137 bytes
Hi Bob,

Thanks for the reply; things were getting desperate! I found out what
it was this morning, & purely by chance. While I was fiddling trying to
get the web page to work on the web server, an error cropped up stating
that I need to add 'EnableEventValidation' to my web page. I looked
this up and this apparently is a .Net 2 property. This explained to me
that the web server was running my app as .Net 2 and not as 1.1 as BDS
2006 intended nor as I had thought. So I got the web site changed to
run in .net 1.1.4322 and hey presto, all my updates started working
fine!

I was under the impression that .net 2 was backward compatible with
previous versions, but obviously I have stumbled accross a situation in
BDP\DbWeb controls where its not! I hope this post helps someone else
out...

The Delphi faith is coming back ! 
Bill.


Bob Swart wrote:

> Hi Bill,
> 
> > When deployed to my production server the
> > DBWebDataSource.OnApplyChangesRequest event is not firing and this I
> > assume is why the updates are not working. I know this because I am
> > logging event calls to a text file on the server. 
> 
> And are you sure that your ASP.NET process has permission to write to
> that text file on the deployment server? I would use the Trace Log to
> be sure I can see what's going on (remember to enable trace in the
> web.config)
> 
> > test server, the DBWebDataSource.OnApplyChangesRequest fires and the
> > code within it is of course the BDPDataAdapter.AutoUpdate call
> > necessary to update the DB. Other events of the DBWebDataSource do
> > fire (e.g. 'OnScroll' and 'OnAfterSetChanges').
> 
> You could try to enable SQL Tracing and then in the OnTrace event of
> the BdpConnection component write the tracing SQL command to the
> Trace Log.
> 
> > I think its got to be something to do with the events of
> > DBWebDataSource as I can programatically update the database using
> > say BDPCommands and SQL which would seem to suggest its not
> > permissions problem. I have lots of pages I have written using the
> > BDP Data Controls that, so I dont really want to rewrite them.
> 
> I'm sure it's something that can be found and fixed.
> 
> > Bill.
> 
> Groetjes,
>           Bob Swart



-- 
Re: DBWebDataSource events dont fire
#122
Author: Bob Swart
Date: Tue, 29 Aug 2006 19:36
24 lines
1799 bytes
Hi Bill,

> I was under the impression that .net 2 was backward compatible with
> previous versions, but obviously I have stumbled accross a situation in
> BDP\DbWeb controls where its not! I hope this post helps someone else
> out...

That's very good to know - I'll see if I can get to the bottom of that 
(a good test case for a future .NET 2 compatible version of Delphi as 
well)...

> The Delphi faith is coming back ! 

It's never been away ;-)

> Bill.

Groetjes,
           Bob Swart

-- 
Bob Swart Training & Consultancy (eBob42.com)  Forever Loyal to Delphi
Blog: http://www.drbob42.com/blog - RSS: http://drbob42.com/weblog.xml
New Delphi 2006 Courseware e-books at http://www.eBob42.com/courseware
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