Re: Access-postgreSQL migration (extra invalid foreign key added)

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Reshat Sabiq" <sabiq(at)purdue(dot)edu>, <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Access-postgreSQL migration (extra invalid foreign key added)
Date: 2002-12-22 19:31:17
Message-ID: 03AF4E498C591348A42FC93DEA9661B88536@mail.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

> -----Original Message-----
> From: Reshat Sabiq [mailto:sabiq(at)purdue(dot)edu]
> Sent: 22 December 2002 14:00
> To: pgadmin-support(at)postgresql(dot)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?

It's certainly possible. The Migration Wizard is a bit hit 'n' miss to
be honest as I wrote it without ever migrating a database except for the
odd test using Northwind/Biblio.

Is it possible to get a schema only copy of your mdb file to look at
please?

> 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.

We do sort of assume there are no \n's or \r's in your object names...

Regards, Dave.

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Didier Moens 2002-12-22 21:48:03 pgAdminII 1.4.12 crash with PostgreSQL 7.3
Previous Message Dave Page 2002-12-22 19:25:04 Re: Can't connect on Windows