|
From: Mark W. <mwa...@bi...> - 2005-11-01 10:13:09
|
Hi,
I am using HSQL 1.6 with ODBC to a MySQL database on Windows XP. When I =
do a query only every other row is being returned (ie only half of the =
rows).=20
Does anyone have any idea what might be going on? I don't have a problem =
using Ruby.
The code is based on the example code:
retrieveRecords :: Connection -> IO [[String]]
retrieveRecords c =3D do
query c "select * from treenode " >>=3D collectRows getRow
where
getRow :: Statement -> IO [String]
getRow stmt =3D do
f1 <- (getFieldValue stmt "id")
return [show (f1::Int)]
main =3D handleSql print $ do
bracket (connect datasource user_id password) disconnect $ \c ->
inTransaction c $ \c -> do
rs <- retrieveRecords c
mapM print rs
putStrLn ""
Cheers
Mark |