Thread: Wrong SQLSTATE returned?
Hi, I'm using ADO to connect to my PostgreSQL instance. When I use a SELECT statement that references a non-existent column in an existing table I get a SQLSTATE error S1000 code with native error code 7. I should note that the error description that ADO returns is "column 'mycolymn' does not exist" with a generic ADO unknown error code. Am I not supposed to get a SQLSTATE code of: 42703 UNDEFINED COLUMN? Thanks, Babak
Babak Asadi <basadi@gmail.com> writes: > I'm using ADO to connect to my PostgreSQL instance. When I use a > SELECT statement that references a non-existent column in an existing > table I get a SQLSTATE error S1000 code with native error code 7. > Am I not supposed to get a SQLSTATE code of: 42703 UNDEFINED COLUMN? Well, there is certainly no part of the Postgres code that will return 'S1000', so I have to suppose that ADO is inserting that SQLSTATE value. You'd probably best ask about this on an ADO list ... regards, tom lane
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > I'm using ADO to connect to my PostgreSQL instance. When I use a > SELECT statement that references a non-existent column in an existing > table I get a SQLSTATE error S1000 code with native error code 7. > ... > Am I not supposed to get a SQLSTATE code of: 42703 UNDEFINED COLUMN? S1000 is a "generic error" that is returned when a driver (in Perl DBI land anyway) does not implement SQLSTATE. That could certainly be the case here. You could test to see if it ever returns anything except S1000: if so, it's probably a bug in the driver. If not, someone may need to write in full SQLSTATE support. - -- Greg Sabino Mullane greg@turnstep.com PGP Key: 0x14964AC8 200506121500 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -----BEGIN PGP SIGNATURE----- iD8DBQFCrIgzvJuQZxSWSsgRAq7gAJ9P7W+RLp/JtdoO//s+egTtrN/DFQCg25Eb NrR9EWd9t/kFJZC+9ObMzwY= =KOv9 -----END PGP SIGNATURE-----