From: Geoff Schaller on
Bill,

I think Johan is on the money. Whenever you ask SQL questions like this
we all need to know a little more about the connection type, classes
used and DBS involved. The way I do it is that things like fieldput and
append do nothing until the commit because if foreign keys are involved,
you cannot just add an empty row - that is often a violation in itself.

Access has its own vagaries and issues but there are many rules to
follow here than DBF.

Geoff



"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: Bill Tillick on
Steve,
The field is defined in the fieldspec as 19 numeric with 4 dec pls,
and holds a price amount.
So, 'no' to each of your questions. Thanks,
Bill

On Jun 10, 6:18 pm, "Stephen Quinn" <stevej...(a)bigpondSPAM.net.au>
wrote:
> 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: Bill Tillick on
Hi Kevin,

I am using standard VO SQL server, linked to an .mdb database through
an ODBC for Access databases. This works fine using VO Browser.
My bBrowser is version 3, purchased about 2 weeks ago. VO2.8

Have tried suspend/reset without success.

Thanks,
Bill

On Jun 10, 8:06 pm, "Kevin" <kdmur...(a)eircom.net> wrote:
> 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

From: Bill Tillick on
Hi Johan,
Yes, it is an Access database.

I will have to do some research to figure out how to change the field
from Single to Double; Access is not something I am particularly
familiar with - just working with it for a friend. But your suggestion
sounds promising.

As you will see from my reply to Kevin, suspend/reset had no effect.

Thanks,
Bill


On Jun 10, 8:23 pm, Johan Nel <johan....(a)xsinet.co.za> wrote:
> 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.

From: Geoff Schaller on
Bill.

You realise that a 19 digit wide numeric is impossible because it holds
a value too large for a computer to read. Clipper made it possible but
it is an impossible number. You will get into double float issues.

Change this back to something reasonable. Maybe N 14 4 max or something.
Remember the absolutely largest number you can have is +/- 2GB. I would
also caution you over the number of decimal places

Geoff



"Bill Tillick" <wtillick(a)gmail.com> wrote in message
news:997de48a-0582-4cee-98d6-f31c9a058ae9(a)11g2000prv.googlegroups.com:

> Steve,
> The field is defined in the fieldspec as 19 numeric with 4 dec pls,
> and holds a price amount.
> So, 'no' to each of your questions. Thanks,
> Bill
>
> On Jun 10, 6:18 pm, "Stephen Quinn" <stevej...(a)bigpondSPAM.net.au>
> wrote:
>
> > 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

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