From: Bill Tillick on
I have tried everything I can think of to append a new record to a
bBrowser attached to an SQLServer. The bBrowser is a control on a
window that has other controls on it.
I have tried bBrowser;Append() whose Help entry says it appends an
empty record to the server, I have tried using self:server:append()
directly on the server and also self:oDCbBrowse:server:append().
But run time always crashes on the append() with "BOUND ERROR,
Subsystem: BASE, Function: ARRAYGET, Argument: 6" as reported in
a previous post.

Today I have been trying various options for assigning the server to
the owner window and the bBrowser. With the old VO DataBrowser,
everything worked OK by assigning the server to the owner window then
selecting <Use Owner's> for the browser. This doesn't work here
because the compiler doesn't do a substitution for <Use Owner's> and
therefore the compiler reports an error when compiling obBrowse;Use
<Use Owner's> )!

So, in my PostInit for the window I have coded
self:oDCbBrowse:Use(self:server) thereby attaching the same server to
the bBrowse as to the owner window. Still no success.

Help, please, what am I missing or doing wrong???
Regards,
Bill
P.S. The essence of my NewRecord code is:

METHOD NewProduct2PB( ) CLASS Product2List // Product2List is the
DW containing the bBrowse

self:oDCbBrowse:append() // always FAILS at this point!!
......

From: Bill Tillick on
Further....
I have created a skeleton SDI application, with a DW containing just a
bBrowser control and a pushbutton whose attached method just has
self:bBrowser:append() - and I get the same crash on the append() !!!!

Bill
From: Stephen Quinn on
Bill

I'm not an SQL person but what type of field is the 6th column (Error
ARRAYGET arg 6 ) of your browser
- is it an autoinc field in the SQL database??
- is it a read only field/column??
- is it a calculated column??

CYA
Steve


From: Kevin on
Bill,

What type of server is it you using, e.g. an ADOServer using VO2ADO?
What version of bBrowser?

If I remember correctly there was a known issue appending to an SQL
server using the bBrowser version 2 I think.

What you could possibly try is suspending notification of the server
before the Append and then Reset it.

Hope this helps.

Kevin


"Bill Tillick" <wtillick(a)gmail.com> wrote in message
news:1757079b-e782-4d41-a4b2-a9f39ea67c9e(a)n37g2000prc.googlegroups.com:

> I have tried everything I can think of to append a new record to a
> bBrowser attached to an SQLServer. The bBrowser is a control on a
> window that has other controls on it.
> I have tried bBrowser;Append() whose Help entry says it appends an
> empty record to the server, I have tried using self:server:append()
> directly on the server and also self:oDCbBrowse:server:append().
> But run time always crashes on the append() with "BOUND ERROR,
> Subsystem: BASE, Function: ARRAYGET, Argument: 6" as reported in
> a previous post.
>
> Today I have been trying various options for assigning the server to
> the owner window and the bBrowser. With the old VO DataBrowser,
> everything worked OK by assigning the server to the owner window then
> selecting <Use Owner's> for the browser. This doesn't work here
> because the compiler doesn't do a substitution for <Use Owner's> and
> therefore the compiler reports an error when compiling obBrowse;Use
> <Use Owner's> )!
>
> So, in my PostInit for the window I have coded
> self:oDCbBrowse:Use(self:server) thereby attaching the same server to
> the bBrowse as to the owner window. Still no success.
>
> Help, please, what am I missing or doing wrong???
> Regards,
> Bill
> P.S. The essence of my NewRecord code is:
>
> METHOD NewProduct2PB( ) CLASS Product2List // Product2List is the
> DW containing the bBrowse
>
> self:oDCbBrowse:append() // always FAILS at this point!!
> .....

From: Johan Nel on
Hi Bill,

If I remember correctly this is an MS-Access database?

Something I have found with Access was that bBrowser does not like
Numbers that are defined as Single in the database, change those to
Double and all works fine. It has something to do with the way the
SQL classes return the Number of decimals and Length of the data
column.

Also wrap the Append() between a SuspendNotification() and
ResetNotification() block.

SuspendNotification()
Append()
// Do your fieldputs here
ResetNotification()

HTH,

Johan Nel
Pretoria, South Africa.

On Jun 10, 6:02 am, Bill Tillick <wtill...(a)gmail.com> wrote:
> I have tried everything I can think of to append a new record to a
> bBrowser attached to an SQLServer. The bBrowser is a control on a
> window that has other controls on it.
> I have tried bBrowser;Append() whose Help entry says it appends an
> empty record to the server, I have tried using  self:server:append()
> directly on the server and also self:oDCbBrowse:server:append().
> But run time always crashes on the append() with "BOUND ERROR,
> Subsystem: BASE, Function: ARRAYGET, Argument:     6"  as reported in
> a previous post.
>
> Today I have been trying various options for assigning the server to
> the owner window and the bBrowser. With the old VO DataBrowser,
> everything worked OK by assigning the server to the owner window then
> selecting <Use Owner's> for the browser.  This doesn't work here
> because the compiler doesn't do a substitution for <Use Owner's> and
> therefore the compiler reports an error when compiling obBrowse;Use
> <Use Owner's> )!
>
> So, in my PostInit for the window I have coded
> self:oDCbBrowse:Use(self:server) thereby attaching the same server to
> the bBrowse as to the owner window. Still no success.
>
> Help, please, what am I missing or doing wrong???
> Regards,
> Bill
> P.S. The essence of my NewRecord code is:
>
> METHOD NewProduct2PB( ) CLASS Product2List    // Product2List is the
> DW containing the bBrowse
>
> self:oDCbBrowse:append()       // always FAILS at this point!!
> .....

 |  Next  |  Last
Pages: 1 2 3 4 5 6
Prev: CellDoubleClick()
Next: app crashes...