I have created several types and functions in C language and implemented them into a database. I've created a new user and granted him all privileges on the database. I have then made an application in Java that connects to the database. But, I don't get the correct data from the database.
For an example, if I run this code in psql:
SELECT d AS result FROM test WHERE id=1
I will get this result:
((0 1 6 7 1 9),(1 3 3 23 32 10),(3 4 15 16 17 11),(10 20 5 5 3 6))
If i run the same query in Java, I get this result:
((0 0 0 0 0 0),(0 0 0 0 0 0),(0 0 0 0 0 0),(0 0 0 0 0 0))
For some other queries, which work perfectly fine in psql, I don't even get zeroes, but some strange negative and positive numbers.
Do you have any idea what's wrong and how to fix it?
I use this code:
String query = "SELECT d AS result FROM test WHERE id=" + dbid;
ResultSet rs = conn.ExecuteQuery(query);
String mpoint = rs.getString("result");
Is it maybe because I'm using "getString" for getting some user-implemented type? The result of the query is a C-language defined type... Or is it maybe about some permissions for types, functions...?
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
Sign up now.