Re: [Haskell-cafe] haskelldb + sqlite problem.

"Magicloud" == Magicloud Magiclouds
writes: Magicloud> Hi, I am using haskelldb and Magicloud> haskelldb-hdbc-sqlite3. Well, I finally got the source Magicloud> compiled and ran, I got this error: App: user error Magicloud> (SQL error: SqlError {seState = "", seNativeError = 21, Magicloud> seErrorMsg = "prepare 74: SELECT subject,\n Magicloud> timestamp\nFROM notes as T1\nORDER BY timestamp DESC: Magicloud> library routine called out of sequence"}) Any clue what Magicloud> I should check?
Did you get this working? If so, what was the problem and how did you go about resolving it. I have the identical problem. I had the database code working fine, but then I added a state monad into the monad stack for the program, and now I get this problem. I see that John Goerzen suggested it might be a result of reading the data lazily. So I tried changing my import statements from import Control.Monad.State to import Control.Monad.State.Strict in case the StateT was indirectly causing the problem, but that doesn't make any difference. -- Colin Adams Preston Lancashire

"Colin" == Colin Paul Adams
writes:
"Magicloud" == Magicloud Magiclouds
writes: Magicloud> Hi, I am using haskelldb and Magicloud> haskelldb-hdbc-sqlite3. Well, I finally got the source Magicloud> compiled and ran, I got this error: App: user error Magicloud> (SQL error: SqlError {seState = "", seNativeError = 21, Magicloud> seErrorMsg = "prepare 74: SELECT subject,\n Magicloud> timestamp\nFROM notes as T1\nORDER BY timestamp DESC: Magicloud> library routine called out of sequence"}) Any clue what Magicloud> I should check?
Colin> Did you get this working? If so, what was the problem and Colin> how did you go about resolving it. Colin> I have the identical problem. I had the database code Colin> working fine, but then I added a state monad into the monad Colin> stack for the program, and now I get this problem. I see Colin> that John Goerzen suggested it might be a result of reading Colin> the data lazily. So I tried changing my import statements Colin> from import Control.Monad.State to import Colin> Control.Monad.State.Strict Colin> in case the StateT was indirectly causing the problem, but Colin> that doesn't make any difference. As I suspected, the problem is something to do with my putting the Database.HaskellDB.Database.Database into the state monad, and getting it from there, rather than passing it around explicitly. So I guess I have too much laziness in: ApplicationState db _ <- lift get How do I force db in this situation? -- Colin Adams Preston Lancashire
participants (1)
-
Colin Paul Adams