Lists: | pgsql-general |
---|
From: | "Johan van der Merwe" <johan(at)bnrel(dot)co(dot)za> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Relation "tablename" does not exist |
Date: | 2006-06-15 06:52:24 |
Message-ID: | 20060615065725.0B0DD84717B@mail.ballenrobb.co.za |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
I have posted this before without receiving replies
My code is as follows:
Public dbRemote As New Connection
Public rsData As New Recordset
dbRemote.Properties("Data Source").Value = "DSM"
dbRemote.Properties("Initial Catalog").Value = "BCM_DSM"
dbRemote.Properties("User ID").Value = "johan"
dbRemote.Properties("Password").Value = "johan"
dbRemote.Open
rsData.Open "tblSuburb", dbRemote, , , adCmdTable
I receive the error "Relation "tblSuburb" does not exist"
Cheers
Johan van der Merwe
Ballenden & Robb Consulting Engineers
Tel (043) 743 3809
Fax (043) 743 9321
Cell 082 5530445
"I Don't want to be a human being, I want to be a human doing"
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.8.4/363 - Release Date: 2006/06/13
From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Johan van der Merwe <johan(at)bnrel(dot)co(dot)za> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Relation "tablename" does not exist |
Date: | 2006-06-15 07:06:14 |
Message-ID: | 449106E6.3060505@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
Johan van der Merwe wrote:
> I have posted this before without receiving replies
Can't see it in the archives. Were you subscribed?
> My code is as follows:
>
> Public dbRemote As New Connection
> Public rsData As New Recordset
>
> dbRemote.Properties("Data Source").Value = "DSM"
> dbRemote.Properties("Initial Catalog").Value = "BCM_DSM"
> dbRemote.Properties("User ID").Value = "johan"
> dbRemote.Properties("Password").Value = "johan"
> dbRemote.Open
>
> rsData.Open "tblSuburb", dbRemote, , , adCmdTable
>
>
> I receive the error "Relation "tblSuburb" does not exist"
Either you created the table quoted (thus preserving its case) and you
are accessing it unquoted (so it's folded to lower-case) or the other
way around. It's how PostgreSQL provides case-insensitive table-names.
So:
CREATE "TaBlE1" ...
SELECT * FROM "TaBlE1" (works)
SELECT * FROM table1 (fails)
CREATE TaBlE2 ...
SELECT * FROM "TaBlE2" (works)
SELECT * FROM table2 (works)
SELECT * FROM TABLE2 (works)
HTH
--
Richard Huxton
Archonet Ltd
From: | Michael Glaesemann <grzm(at)seespotcode(dot)net> |
---|---|
To: | "Johan van der Merwe" <johan(at)bnrel(dot)co(dot)za> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Relation "tablename" does not exist |
Date: | 2006-06-15 07:14:57 |
Message-ID: | 3F0DE679-DBCD-4E05-B608-9AC86FCE9B73@seespotcode.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
On Jun 15, 2006, at 15:52 , Johan van der Merwe wrote:
> My code is as follows:
Could you explain a bit more what this code is? Is it Java? Python?
What does it do? I know it's not SQL, and I'm guessing it's some kind
of ORM, but without more information I really don't know how to help
(and perhaps others are having the same trouble).
> I receive the error "Relation "tblSuburb" does not exist"
What is the name of the table in the database itself? Can you provide
an example of SQL that *does* do what you want? Or perhaps some psql
output showing the table definition for "tblSuburb"? There's a chance
that it's a quoting problem: your code is calling "tablSuburb" (with
double-quotes, which tells the server to look for a case-sensitive
match) and your table is actually named "tblsuburb". PostgreSQL
downcases all unquoted identifiers.
Hope this helps a bit.
Michael Glaesemann
grzm seespotcode net