Access-postgreSQL migration (extra invalid foreign key added) - Mailing list pgadmin-support

From Reshat Sabiq
Subject Access-postgreSQL migration (extra invalid foreign key added)
Date
Msg-id 000e01c2a9c2$64912aa0$7882d380@main
Whole thread Raw
In response to Can't connect on Windows  ("Reshat Sabiq" <sabiq@purdue.edu>)
Responses Re: Access-postgreSQL migration (extra invalid foreign key added)
schemas (public, custom...)
List 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.



pgadmin-support by date:

Previous
From: "Reshat Sabiq"
Date:
Subject: Re: Can't connect on Windows->half done
Next
From: "Reshat Sabiq"
Date:
Subject: Re: Access-postgreSQL migration (extra invalid foreign key added)