Cannot write to table. URGENT HELP REQUIRED.

Joe Boyle atla38 at dsl.pipex.com
Sun Jul 10 06:27:31 CDT 2005


Speaking of holdlocks and SQLserver, in the past I found that the
transaction statement for most files needed to be modified as follows :
amend the 'Transaction' entry for the primary file to 'query for query'.
Needless to say this was required for concurrency screens only.

This solved a number of issues but having said that, I also recall that
Cognos were going to solve related issues by modifying both Axiant and PH on
NT so that amending the transaction statement in this way was no longer
necessary.

Regards, Joe.


-----Original Message-----
From: Joe Boyle [mailto:atla38 at dsl.pipex.com] 
Sent: 09 July 2005 16:54
To: 'Syed Shahul Hameed Mustaffa'
Cc: 'powerh-l at lists.sowder.com'
Subject: RE: Cannot write to table. URGENT HELP REQUIRED.

One other thought Syed, if you are going to use the SQL approach to update
rows which are displayed on screen after retrieval via file
statements/buffers, then you will probably need to add the 'autocommit'
option to the file statement; the reason being that sqlserver probably uses
a holdlock which in turn will probably block the attempt to update the row -
the autocommit option will release any such lock (but you must map the file
as a reference file for this to apply).

As for the earlier comment regarding care with 'conventional updates', this
is now redundant because they are not possible without unique indexes :)


Regards, Joe.


-----Original Message-----
From: powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com
[mailto:powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com] On Behalf Of
Syed Shahul Hameed Mustaffa
Sent: 09 July 2005 16:23
To: Joe Boyle
Cc: powerh-l at lists.sowder.com
Subject: Re: Cannot write to table. URGENT HELP REQUIRED.

Dear Joe,

You're correct. I couldn't update.
It says 'not all records are updated'.

I'll try to use the sql solution you've recommended.
I'll let you know the results.

Best Regards,
SYED

On 7/9/05, Joe Boyle <atla38 at dsl.pipex.com> wrote:
> Could it be that the screen which did not error was actually adding new
rows
> to the database rather than updating existing rows ?
> 
> Regards, Joe.
> 
> 
> -----Original Message-----
> From: powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com
> [mailto:powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com] On Behalf
Of
> Syed Shahul Hameed Mustaffa
> Sent: 09 July 2005 14:58
> To: Joe Boyle
> Cc: powerh-l at lists.sowder.com
> Subject: Re: Cannot write to table. URGENT HELP REQUIRED.
> 
> Dear Joe,
> 
> Thanks again and it is great to hear from you.
> 
> Are you sure about mandatory unique indexes?
> I'm asking this question just because I could update the table using a
> screen that I created with Axiant screen builder wizard.
> 
> According to your statement, the update should have failed. Am I correct?
> 
> In PH(MPEIX), the same code writes to a table even without unique index.
> 
> Regards,
> SYED.
> 
> On 7/9/05, Joe Boyle <atla38 at dsl.pipex.com> wrote:
> > Example of embedded Sql approach is below, where t_hm and t_order are
> > temporary items,
> >
> > let t_hm = truncate (concat_log ) + "add date"   &
> > + ' JOTIME ' + d_hm[1:8]
> >
> > sql  in mydb transaction update &
> > update concat_row                       &
> > set concat_log = : t_hm where order_no = :t_order
> >
> >
> > Regards, Joe.
> >
> >
> > -----Original Message-----
> > From: powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com
> > [mailto:powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com] On
Behalf
> Of
> > Joe Boyle
> > Sent: 09 July 2005 13:49
> > To: 'Syed Shahul Hameed Mustaffa'; powerh-l at lists.sowder.com
> > Subject: RE: Cannot write to table. URGENT HELP REQUIRED.
> >
> > You have to have a unique key/index for updates with each of RDBs
> sqlserver
> > sqlanywhere, and DB2. So either add an index or, use a SQL call with
> insert
> > or update.
> >
> > Regards, Joe.
> >
> >
> > -----Original Message-----
> > From: powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com
> > [mailto:powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com] On
Behalf
> Of
> > Syed Shahul Hameed Mustaffa
> > Sent: 09 July 2005 09:57
> > To: powerh-l at lists.sowder.com
> > Subject: Cannot write to table. URGENT HELP REQUIRED.
> >
> > Hello gurus,
> >
> > I am using AXIANT 4GL with SQL Server 2000 backend.
> > I am migrating the code from MPEIX to the above environment.
> >
> > In one screen, when I try to update, the update fails with no clear
> message.
> > It just says 'File cannot be updated' when it tries to write to a
> > table without an unique index.
> >
> > It is not issuing any sql statements to sql server (i watched from sql
> > profiler).
> >
> > What could be the possible reasons?
> >
> > Regards,
> > SYED
> >
> > --
> > = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> > Mailing list: powerh-l at lists.sowder.com
> > Subscribe: "subscribe" in message body to
> powerh-l-request at lists.sowder.com
> > Unsubscribe: "unsubscribe &lt;password&gt;" in message body to
> > powerh-l-request at lists.sowder.com
> > http://lists.sowder.com/mailman/listinfo/powerh-l
> > This list is closed, thus to post to the list you must be a subscriber.
> >
> > --
> > = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> > Mailing list: powerh-l at lists.sowder.com
> > Subscribe: "subscribe" in message body to
> powerh-l-request at lists.sowder.com
> > Unsubscribe: "unsubscribe &lt;password&gt;" in message body to
> > powerh-l-request at lists.sowder.com
> > http://lists.sowder.com/mailman/listinfo/powerh-l
> > This list is closed, thus to post to the list you must be a subscriber.
> >
> >
> 
> --
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l at lists.sowder.com
> Subscribe: "subscribe" in message body to
powerh-l-request at lists.sowder.com
> Unsubscribe: "unsubscribe &lt;password&gt;" in message body to
> powerh-l-request at lists.sowder.com
> http://lists.sowder.com/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you must be a subscriber.
> 
>

-- 
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l at lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request at lists.sowder.com
Unsubscribe: "unsubscribe &lt;password&gt;" in message body to
powerh-l-request at lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.



More information about the powerh-l mailing list