Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Sql > Problem inserti...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 3537 of 3799
Post > Topic >>

Problem inserting data

by vrobador@[EMAIL PROTECTED] (Tk421) Jun 20, 2008 at 02:20 PM

Hello everybody.

    I''ve just converted an access database to postgres. The conversion 
was ok, but when i'm trying to insert data on some tables with boolean 
types from a Visual Basic application i receive an error. A sample:

    table example, with firs field of integer, second of type text and 
third of type boolean

    the query: INSERT INTO EXAMPLE VALUES (1, 'text', 0)

    When i used access this worked fine, in boolean types 0 is false and 
1 is true, but in postgres (8.1 and 8.3 version) i receive the next error:

    column "premarco" is of type boolean but expression is of type integer

    My question is, can i force postgres to accept integer values as 
boolean without changin query to INSERT INTO EXAMPLE VALUES (1, 'text', 
0::boolean). This is a problem because if I have to do this i will have 
to test about one hundred queryes

    Thank you very much

-- 
Sent via pgsql-sql mailing list (pgsql-sql@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
 




 4 Posts in Topic:
Problem inserting data
vrobador@[EMAIL PROTECTED  2008-06-20 14:20:18 
Re: Problem inserting data
aklaver@[EMAIL PROTECTED]  2008-06-20 07:40:46 
Re: Problem inserting data
tgl@[EMAIL PROTECTED] (T  2008-06-20 10:57:26 
Re: Problem inserting data
vrobador@[EMAIL PROTECTED  2008-06-20 17:55:30 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 21:44:57 CST 2008.