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.

Intraweb

3 posts in Delphi Last posting was on 2012-09-03 15:57:22.0Z
John Posted on 2012-09-01 20:35:04.0Z
From: "John" <jremailbox@comcast.net>
Newsgroups: Advantage.Delphi
Subject: Intraweb
Date: Sat, 1 Sep 2012 16:35:04 -0400
Lines: 1
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 15.4.3555.308
X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3555.308
NNTP-Posting-Host: 67.174.129.1
Message-ID: <50427148$1@solutions.advantagedatabase.com>
X-Trace: 1 Sep 2012 13:34:16 -0700, 67.174.129.1
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Delphi:25943
Article PK: 1103514

Hello

Delphi XE2, Intraweb XII and Advantage 10.10.0.0.28

a) When creating an Intraweb application it is my understanding that an
adsConnection, adsTable and DataSource component placed on the DataModule
should be able to be shared across the session by any IWwebForm created by
the session. I can create this setup and at design time, place a IWGrid
component on a IWwebForm and actually link the DataSource property of the
IWGrid to the IWUserSession.adsTableUsers. Unfortunately, when the web page
is displayed at run time an Atozed error error is displayed.

b) However, if I place an adsTable and linked datamodule component on a
IWwebForm and link the adsTable to an adsConnection unit located either on
the the same IWwebForm unit or the ServerControllerUnit, the the data is
displayed in a IWGrid as expected.

Question 1:
Why does a) above result in an error.

Question 2:
In b) above, which is the preferred placement of the adsConnection
component, on the ServerControllerUnit or the IWwebForm containing the
adsTables?

TIA

John


R. Hoek (ComponentAgro) Posted on 2012-09-03 08:30:16.0Z
From: "R. Hoek \(ComponentAgro\)" <none>
Newsgroups: Advantage.Delphi
References: <50427148$1@solutions.advantagedatabase.com>
Subject: Re: Intraweb
Date: Mon, 3 Sep 2012 10:30:16 +0200
Lines: 81
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 87.195.176.144
Message-ID: <50446a5d@solutions.advantagedatabase.com>
X-Trace: 3 Sep 2012 01:29:17 -0700, 87.195.176.144
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Delphi:25944
Article PK: 1103527

Hello John,

I'm an Intraweb user, but do not the de Advantage components this way you
discribe.

> Question 1:
> Why does a) above result in an error.

Are you accessing the DataSet (off the DataSource property off the Grid)
before it is connected (before loaded is called)?
Maybe the usersession datamodule is not created at the time the form is
created /accessed.


> Question 2:
> In b) above, which is the preferred placement of the adsConnection
> component, on the ServerControllerUnit or the IWwebForm containing the
> adsTables?

The servercontrol is a shared datamodule, which is created as soon as the
application is started.
This is done before a session is created.

Note: this is shared data for all sessions, so this would not be an
appropriate module the place these session specific data access components.

I can think of one more thing:
Since the server module is create when the application is starting, the
Windows account with which this part of the code is 'run' might be different
as to the Windows account with which the usersession code is executed.
With different accounts, come different right - so there might be a problem
in that direction...

Good luck!

--
Regards,

Ronald Hoek

Application Developer
ComponentAgro B.V.
Oud-Beijerland - The Netherlands

http://www.componentagro.nl

KvK: H24264020


"John" <jremailbox@comcast.net> schreef in bericht
news:50427148$1@solutions.advantagedatabase.com...
> Hello
>
> Delphi XE2, Intraweb XII and Advantage 10.10.0.0.28
>
> a) When creating an Intraweb application it is my understanding that an
> adsConnection, adsTable and DataSource component placed on the DataModule
> should be able to be shared across the session by any IWwebForm created by
> the session. I can create this setup and at design time, place a IWGrid
> component on a IWwebForm and actually link the DataSource property of the
> IWGrid to the IWUserSession.adsTableUsers. Unfortunately, when the web
> page is displayed at run time an Atozed error error is displayed.
>
> b) However, if I place an adsTable and linked datamodule component on a
> IWwebForm and link the adsTable to an adsConnection unit located either on
> the the same IWwebForm unit or the ServerControllerUnit, the the data is
> displayed in a IWGrid as expected.
>
> Question 1:
> Why does a) above result in an error.
>
> Question 2:
> In b) above, which is the preferred placement of the adsConnection
> component, on the ServerControllerUnit or the IWwebForm containing the
> adsTables?
>
> TIA
>
> John


John Posted on 2012-09-03 15:57:22.0Z
From: "John" <jremailbox@comcast.net>
Newsgroups: Advantage.Delphi
References: <50427148$1@solutions.advantagedatabase.com> <50446a5d@solutions.advantagedatabase.com>
In-Reply-To: <50446a5d@solutions.advantagedatabase.com>
Subject: Re: Intraweb
Date: Mon, 3 Sep 2012 11:57:22 -0400
Lines: 8
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 15.4.3555.308
X-Mimeole: Produced By Microsoft MimeOLE V15.4.3555.308
NNTP-Posting-Host: 67.174.129.1
Message-ID: <5044d365@solutions.advantagedatabase.com>
X-Trace: 3 Sep 2012 08:57:25 -0700, 67.174.129.1
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Delphi:25947
Article PK: 1103525

Ron

I resolved the problem as follows:

a) created a pooled data IW project (but currently Pooled.Active := False)
b) placed the adsConnection component on the DataModuleUnit with IsConnected
:= False;
c) placed all adsQuery and DataSource components on the UserSessionUnit with
Active := False
d) in the OnCreate event of a each IWwebForm I activate the adsQuery
components relevant to the specific IWwebForm

The above allows me to populate an IW grid for example. This appears to
work irrespective of whether Pooled := False or True, though obviously with
Pooled := True there would be locking issues to address.

Is this similar to your configurations?

TIA

John


"R. Hoek (ComponentAgro)" wrote in message
news:50446a5d@solutions.advantagedatabase.com...

Hello John,

I'm an Intraweb user, but do not the de Advantage components this way you
discribe.

> Question 1:
> Why does a) above result in an error.

Are you accessing the DataSet (off the DataSource property off the Grid)
before it is connected (before loaded is called)?
Maybe the usersession datamodule is not created at the time the form is
created /accessed.


> Question 2:
> In b) above, which is the preferred placement of the adsConnection
> component, on the ServerControllerUnit or the IWwebForm containing the
> adsTables?

The servercontrol is a shared datamodule, which is created as soon as the
application is started.
This is done before a session is created.

Note: this is shared data for all sessions, so this would not be an
appropriate module the place these session specific data access components.

I can think of one more thing:
Since the server module is create when the application is starting, the
Windows account with which this part of the code is 'run' might be different
as to the Windows account with which the usersession code is executed.
With different accounts, come different right - so there might be a problem
in that direction...

Good luck!

--
Regards,

Ronald Hoek

Application Developer
ComponentAgro B.V.
Oud-Beijerland - The Netherlands

http://www.componentagro.nl

KvK: H24264020


"John" <jremailbox@comcast.net> schreef in bericht
news:50427148$1@solutions.advantagedatabase.com...
> Hello
>
> Delphi XE2, Intraweb XII and Advantage 10.10.0.0.28
>
> a) When creating an Intraweb application it is my understanding that an
> adsConnection, adsTable and DataSource component placed on the DataModule
> should be able to be shared across the session by any IWwebForm created by
> the session. I can create this setup and at design time, place a IWGrid
> component on a IWwebForm and actually link the DataSource property of the
> IWGrid to the IWUserSession.adsTableUsers. Unfortunately, when the web
> page is displayed at run time an Atozed error error is displayed.
>
> b) However, if I place an adsTable and linked datamodule component on a
> IWwebForm and link the adsTable to an adsConnection unit located either on
> the the same IWwebForm unit or the ServerControllerUnit, the the data is
> displayed in a IWGrid as expected.
>
> Question 1:
> Why does a) above result in an error.
>
> Question 2:
> In b) above, which is the preferred placement of the adsConnection
> component, on the ServerControllerUnit or the IWwebForm containing the
> adsTables?
>
> TIA
>
> John