<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18999">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>...just to put the 'finishing touch' on this --
Daniel Fischer pointed out how to use the Windows back slash for this command
[he pointed it out that GHCI consider the backspace to be an escape character] -
note the use of the double back slashes:</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><STRONG><EM><FONT size=2 face=Arial> Prelude Database.HDBC
Database.HDBC.Sqlite3> conn <- connectSqlite3 </FONT><FONT size=2><FONT
face=Arial><U>"c:\\users\\user\\test1.db"<BR></U> Prelude
Database.HDBC Database.HDBC.Sqlite3></FONT></FONT></EM></STRONG></DIV>
<DIV><STRONG><EM><FONT size=2 face=Arial></FONT></EM></STRONG> </DIV>
<DIV><FONT size=2 face=Arial>Thanks Daniel...</FONT></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=kmandpjlynch@verizon.net
href="mailto:kmandpjlynch@verizon.net">Patrick Lynch</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=kmandpjlynch@verizon.net
href="mailto:kmandpjlynch@verizon.net">Patrick Lynch</A> ; <A
title=beginners@haskell.org
href="mailto:beginners@haskell.org">beginners@haskell.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, February 03, 2011 1:01
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Haskell-beginners] Can't
find or open a Sqlite3 database inWindows Vista</DIV>
<DIV><BR></DIV>
<DIV><FONT size=2 face=Arial>...oh dear, guess what -- I told you a lie...ghci
does except either c:/users/user/test1.db or /users/user/test1.db but not the
Windows folder separator of backslash '\'...please see following:</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>...this works:</FONT></DIV>
<DIV><FONT size=2 face=Arial><STRONG><EM> Prelude
Database.HDBC Database.HDBC.Sqlite3> conn <- connectSqlite3
"c:/users/user/test1.db"<BR> Prelude Database.HDBC
Database.HDBC.Sqlite3></EM></STRONG></FONT></DIV>
<DIV><STRONG><EM><FONT size=2 face=Arial></FONT></EM></STRONG> </DIV>
<DIV><FONT size=2 face=Arial>...so does this:</FONT></DIV>
<DIV><FONT size=2 face=Arial><STRONG><EM> Prelude
Database.HDBC Database.HDBC.Sqlite3> conn <- connectSqlite3
"/users/user/test1.db"<BR> Prelude Database.HDBC
Database.HDBC.Sqlite3></EM></STRONG></FONT></DIV>
<DIV><FONT size=2 face=Arial><STRONG><EM></EM></STRONG></FONT> </DIV>
<DIV>
<DIV><FONT size=2 face=Arial>...this doesn't work, note the back slash...also,
this will only work, that is to create the database automatically and then
subsquently create a table, if you user the 'users' folder...if you use
'program files, etal' you will not be able to create the
database...bummer:</FONT></DIV>
<DIV><FONT size=2 face=Arial><STRONG><EM> Prelude Database.HDBC
Database.HDBC.Sqlite3> conn <- connectSqlite3
"c:\users\user\test1.db"</EM></STRONG></FONT></DIV>
<DIV><FONT size=2 face=Arial><STRONG><EM>
<interactive>:1:27:<BR> lexical error in
string/character literal at character 'u'</EM></STRONG></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV>---- Original Message ----- </DIV></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=kmandpjlynch@verizon.net
href="mailto:kmandpjlynch@verizon.net">Patrick Lynch</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=kmandpjlynch@verizon.net
href="mailto:kmandpjlynch@verizon.net">Patrick Lynch</A> ; <A
title=beginners@haskell.org
href="mailto:beginners@haskell.org">beginners@haskell.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, February 03, 2011 11:24
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Haskell-beginners] Can't
find or open a Sqlite3 database inWindows Vista</DIV>
<DIV><BR></DIV>
<DIV><FONT size=2 face=Arial>...this seems to work: </FONT></DIV>
<DIV><STRONG><EM><FONT size=2 face=Arial> ghci> conn <-
connectSqlite3 "/users/user/test1.db"</FONT></EM></STRONG></DIV>
<DIV><STRONG><EM><FONT size=2 face=Arial></FONT></EM></STRONG> </DIV>
<DIV><FONT size=2 face=Arial>...this allows me to create a database in this
directory, named test1.db, and then I can create a table in this
database...</FONT></DIV>
<DIV><FONT size=2 face=Arial>...I'm now working on writing some
queries...</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>...wish me luck</FONT></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=kmandpjlynch@verizon.net
href="mailto:kmandpjlynch@verizon.net">Patrick Lynch</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=kmandpjlynch@verizon.net
href="mailto:kmandpjlynch@verizon.net">Kathleen Lynch</A> ; <A
title=beginners@haskell.org
href="mailto:beginners@haskell.org">beginners@haskell.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, February 03, 2011
10:08 AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Haskell-beginners]
Can't find or open a Sqlite3 database inWindows Vista</DIV>
<DIV><BR></DIV>
<DIV><FONT size=2 face=Arial>...could this be the problem...in Windows
Vista I cannot change the file name in the directory <EM>c:\Program Files
(x86)\Haskell Platform\2010.2.0.0\winghci</EM> but can change it in
<EM>c:\users\user directory</EM>...</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2><FONT face=Arial><STRONG><EM> ...>
ren "c:\Program Files (x86)\Haskell
Platform\2010.2.0.0\winghci\test1.db" test2.db<BR>
Access is denied.</EM></STRONG></FONT></FONT></DIV>
<DIV><STRONG><EM><FONT size=2 face=Arial></FONT></EM></STRONG> </DIV>
<DIV><FONT size=2 face=Arial>...but I can see the contents of this
file:</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial> <STRONG><EM> ...>
type test1.db<BR> hello,
world!</EM></STRONG></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>...is it possible to specify the directory
c:\users\user in ghci so that Sqlite3 will look there to open the database
and then to create a table in it?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Good day</FONT></DIV>
<DIV> </DIV>
<DIV>----- Original Message ----- </DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=kmandpjlynch@verizon.net
href="mailto:kmandpjlynch@verizon.net">Kathleen Lynch</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=beginners@haskell.org
href="mailto:beginners@haskell.org">beginners@haskell.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, February 02, 2011
5:28 PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Haskell-beginners] Can't
find or open a Sqlite3 database in Windows Vista</DIV>
<DIV><BR></DIV>
<DIV><FONT size=2 face=Arial>...seems like I 'kicked over another bee
hive'...plenty of messages in regard to this when you do google
search--->[<EM>sqlite3.operational error unable to open database file
in windows vista</EM>]</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>...i'm getting the following error messages
when I try to create a database in Sqlite3:</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>*Sandbox> dbh <- connect
"poddbtest.db"<BR>*** Exception: SqlError {seState = "", seNativeError =
21, seErrorMsg = "prepare 6: BEGIN: unable to open database
file"}</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>*Sandbox> dbh <- connect
"test1.db"<BR>*** Exception: SqlError {seState = "", seNativeError = 1,
seErrorMsg = "step: SQL logic error or missing database"}</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Both come from Chapters 21 and 22 in "Real
World Haskell"</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>I can't invoke Sqlite3 from the command
line using---> Sqlite3 myDatabase.db...</FONT></DIV>
<DIV><FONT size=2 face=Arial>I created blank files in folder C:\Program
Files (x86)\Haskell Platform\2010.2.0.0\winghci -- seemed to get me a
bit further along...at least I was able to connect...</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Is it possible to specify the folder that
the database should be created in?</FONT></DIV>
<DIV><FONT size=2 face=Arial>Is it possible to run Sqlite3 from the
command line - when it has been installed using the Haskell
wiki?</FONT></DIV>
<DIV><FONT size=2 face=Arial>Has anyone had better success with MySql -
I've used it in the past and it was very reliable?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Thank you</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>Beginners
mailing
list<BR>Beginners@haskell.org<BR>http://www.haskell.org/mailman/listinfo/beginners<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>