Thread: win98 odbc problem?

win98 odbc problem?

From
JT Kirkpatrick
Date:
I have two databases, oidetail and dispnotes:
Create table oidetail (
    Autoinv int4 not null,
    Partnum char(6) not null check (partnum<>' '),
    Ounitprc float4 default 0,
    Ounitcost float4 default 0,
    Ordqty int2 default 1,
    Taxrate float4 default 0,
    Vnum int4,
    Reqdt date,
    Orddt date,
    Oqnum varchar(20),
    Shipdt date,
    About varchar(30),
    Potcorechg int2,
    Oldrtrn bool default 1,
    Oldrtrndt date
    Constraint ssmsoidetail foreign key (autoinv) references ssms);
6,561,792 bytes and 75,362 rows.

Create table dispnotes (
    Autoinv int4 not null,
    Dispnote varchar(255),
    Dttm datetime not null default text 'now',
    Noteby char(8) not null default 'current_user'
    Constraint dispnotespk primary key (autoinv, dttm),
    Constraint ssmsdispnotes foreign key (autoinv) references ssms);
23,347,200 bytes and 96,601 rows => A MUCH LARGER TABLE!!!

I have connected each table via a form to a main form in access97 using the
postgres odbc driver.  You access the sub-forms using buttons on the main
one, linking by autoinv.  In each sub-form I need to add records, using the
same autoinv.  Taking the larger table through its form, it works great, no
problems.  Just opening the form not only shows me all records but also
gives me a blank record at the end to type into.  But I am having problems
with the smaller table!  I have re-created its form by MAKING A COPY OF THE
LARGER ONE THAT WORKS, and then changing its record source and fields -
leaving all the form properties the exact same.  This form for the smaller
table will not let me add records!  It presents existing records just fine,
but it doesn't present me with a blank row like the other form.  Because I
have made a copy of the working form, and left its settings the same, I am
assuming it is not an access97 problem, but maybe an odbc or postgres
issue.  Another point, in the form for the smaller table, it won't let me
edit records either, no matter that I have set the "allow edits" property
to yes.  It returns a message (not an error message from postgres, but a
"ding" with a message in the status bar) saying that this recordset is not
editable.

Have any thoughts??

Thanks.  JT



Re: [INTERFACES] win98 odbc problem?

From
Denis Sbragion
Date:
Hello,

At 15.37 23/04/99 -0400, you wrote:
>I have two databases, oidetail and dispnotes:
>Create table oidetail (
>    Autoinv int4 not null,
>    Partnum char(6) not null check (partnum<>' '),
...
>    Oldrtrn bool default 1,
>    Oldrtrndt date
>    Constraint ssmsoidetail foreign key (autoinv) references ssms);

it looks like this table doesn't have a primary key. Access, and VB and any
other Microsoft program that uses the MS Jet DB Engine, doesn't let you add
records on a table that doesn't have at least one unique index on it.

Bye!
--Sbragion DenisInfoTecnaTel, Fax: +39 039 2324054URL: http://infotecna.home.dhs.org