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

From Reshat Sabiq
Subject Re: Access-postgreSQL migration (extra invalid foreign key added)
Date
Msg-id 000f01c2a9c9$7314d160$7882d380@main
Whole thread Raw
In response to Access-postgreSQL migration (extra invalid foreign key added)  ("Reshat Sabiq" <sabiq@purdue.edu>)
List pgadmin-support
Actually exactly 1 out of every 10 foreign keys couldn't be re-created.
So that means almost everything is automatic. And that is already good
enough for production. Nevertheless, I'd appreciate any feedback on the
problem below.

Thanks,
r.

-----Original Message-----
From: pgadmin-support-owner@postgresql.org
[mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Reshat Sabiq
Sent: Sunday, December 22, 2002 9:00 AM
To: pgadmin-support@postgresql.org
Subject: [pgadmin-support] Access-postgreSQL migration (extra invalid
foreign key added)

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.



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly



pgadmin-support by date:

Previous
From: "Reshat Sabiq"
Date:
Subject: Access-postgreSQL migration (extra invalid foreign key added)
Next
From: "Reshat Sabiq"
Date:
Subject: schemas (public, custom...)