Access-postgreSQL migration (extra invalid foreign key added)

From: "Reshat Sabiq" <sabiq(at)purdue(dot)edu>
To: <pgadmin-support(at)postgresql(dot)org>
Subject: Access-postgreSQL migration (extra invalid foreign key added)
Date: 2002-12-22 13:59:43
Message-ID: 000e01c2a9c2$64912aa0$7882d380@main
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi,

I have an Access DB, that's been running OK in Access, and as part of a
web app based on JDBC. When I convert it to postreSQL, all table
creation, data insertion, and primary key creation statements complete
just fine.
However, the first foreign key attempt fails:

Creating Foreign Key: CompanyContactInfo
SQL (DBName): ALTER TABLE "ContactInfo" ADD CONSTRAINT
"CompanyContactInfo_fk" FOREIGN KEY(id) REFERENCES "Company" (id) ON
DELETE CASCADE ON UPDATE CASCADE
SQL (DBName): ALTER TABLE "ContactInfo" ADD CONSTRAINT
"CompanyContactInfo_fk" FOREIGN KEY(id) REFERENCES () ON DELETE NO
ACTION ON UPDATE NO ACTION
SQL (DBName): ROLLBACK

I'm pretty sure that Access doesn't have a foreign key to null table and
null column and would appreciate any suggestions as to why this 2nd
statement might be coming up. Might there be a bug either somewhere?

P.S. I ran this with 3 different modes, including FULL DEBUG. The
statements above are the most descriptive (Errors and SQL Queries).

P.P.S. This is run on XP Pro, and from MS site I'm seeing that MSAD 2.7
for XP, which I have, already has the Jet Engine for ODBC. I could
install their service pack for that, but it appears to be unnecessary
(and possibly undesirable).

P.P.P.S. There is a couple of dozens of foreign keys, and using the logs
I could just add the relevant statements and make the migration
half-manual. Needless to say, it would be a lot better if that wasn't
necessary.

P.P.P.P.S. I once looked up SQL statements corresponding to tables or
queries in an older version of Access, but I can't find a way to do the
same in the current one (not for table definitions anyway). That might
be of a little help. Although the best I can think if is that \r\n is
processed incorrectly by ODBC bridge or pgAdmin, and that results in
null table with null column.

Thanks in advance,
r.

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Reshat Sabiq 2002-12-22 14:50:19 Re: Access-postgreSQL migration (extra invalid foreign key added)
Previous Message Reshat Sabiq 2002-12-22 06:50:18 Re: Can't connect on Windows->half done