-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mont Rothstein wrote: > In creating the test app I found the problem. I'm not sure if it is a > bug or not. > > I have been using GetInt64(). In Postgres this equates to a bigint, but > I defined my columns as integer. The reader fails on the conversion > from Int32 to Int64. I hadn't hit this before because Sqlite is very > permissive and dynamically adjusts the size of ints stored. > > Obviously Int32->Int64 is a non-lossy conversion so it could be done > automatically, but I don't know what is considered correct with respect > to ADO.NET <http://ADO.NET>. >
Npgsql doesn't do any automatic conversion. We did the same SqlClient for sql server do as specified in msdn docs. > I can't remember why I used GetInt64() instead of GetInt32(), so I have > to go back into my code to see if something necessitated that or not. > > If for some reason you would still like my test app let me know and I > will send it. > When you changed your getint method, did it work? If so, there is no need to send me the test app. If not, please, send me so I can give it a try. About your conversion, in this specific case, you just need to add an cast: (Int64) GetInt32() and it will work. I hope it helps. - -- Regards, Francisco Figueiredo Jr. Npgsql Lead Developer http://www.pgfoundry.org/projects/npgsql MonoBrasil Project Founder Member http://monobrasil.softwarelivre.org - ------------- "Science without religion is lame; religion without science is blind." ~ Albert Einstein -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iQEVAwUBQ3NMlv7iFmsNzeXfAQKJSAf+MVW7hWua7IzrbkEfZGnINizFrnsxi/2M tGFJl2CKSuuEV48RkTuSFcKqWC86Uv+RKKG6w4/NVsKrTSP0IUxKvT7yC0xpnYnG co6YhnVvDFvTRM5Osl0VJht6QfPKPdktShgpykrUN4fcYZJax7lNdAHmmz5tg9uU nZtKYnOuMGi7VfQd6pVtU4LYcQtJ3pQ957ruzG7cUa1ThB291G3EdBbOz5rFKCu2 HsOYkgEveNdnhi34wL6Riab+ZQJL8+aZRqQ17qzOS4gEE1XGw0zi235lQC8mcNVK 94xs0z8m5PfOBSso9Fa6gR7z5gPu3f22Ifl+5/JT86Ij2EMsqP/AAA== =84of -----END PGP SIGNATURE----- _______________________________________________________ Yahoo! Acesso Grátis: Internet rápida e grátis. Instale o discador agora! http://br.acesso.yahoo.com/ _______________________________________________ Npgsql-general mailing list Npgsql-general@gborg.postgresql.org http://gborg.postgresql.org/mailman/listinfo/npgsql-general