<!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>&nbsp;</DIV>
<DIV><STRONG><EM><FONT size=2 face=Arial>&nbsp;&nbsp; Prelude Database.HDBC 
Database.HDBC.Sqlite3&gt; conn &lt;- connectSqlite3 </FONT><FONT size=2><FONT 
face=Arial><U>"c:\\users\\user\\test1.db"<BR></U>&nbsp;&nbsp; Prelude 
Database.HDBC Database.HDBC.Sqlite3&gt;</FONT></FONT></EM></STRONG></DIV>
<DIV><STRONG><EM><FONT size=2 face=Arial></FONT></EM></STRONG>&nbsp;</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>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>...this works:</FONT></DIV>
  <DIV><FONT size=2 face=Arial><STRONG><EM>&nbsp;&nbsp;&nbsp; Prelude 
  Database.HDBC Database.HDBC.Sqlite3&gt; conn &lt;- connectSqlite3 
  "c:/users/user/test1.db"<BR>&nbsp;&nbsp;&nbsp; Prelude Database.HDBC 
  Database.HDBC.Sqlite3&gt;</EM></STRONG></FONT></DIV>
  <DIV><STRONG><EM><FONT size=2 face=Arial></FONT></EM></STRONG>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>...so does this:</FONT></DIV>
  <DIV><FONT size=2 face=Arial><STRONG><EM>&nbsp;&nbsp;&nbsp; Prelude 
  Database.HDBC Database.HDBC.Sqlite3&gt; conn &lt;- connectSqlite3 
  "/users/user/test1.db"<BR>&nbsp; &nbsp; Prelude Database.HDBC 
  Database.HDBC.Sqlite3&gt;</EM></STRONG></FONT></DIV>
  <DIV><FONT size=2 face=Arial><STRONG><EM></EM></STRONG></FONT>&nbsp;</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>&nbsp;&nbsp; Prelude Database.HDBC 
  Database.HDBC.Sqlite3&gt; conn &lt;- connectSqlite3 
  "c:\users\user\test1.db"</EM></STRONG></FONT></DIV>
  <DIV><FONT size=2 face=Arial><STRONG><EM>&nbsp;&nbsp; 
  &lt;interactive&gt;:1:27:<BR>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; lexical error in 
  string/character literal at character 'u'</EM></STRONG></FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</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>&nbsp;&nbsp; ghci&gt; conn &lt;- 
    connectSqlite3 "/users/user/test1.db"</FONT></EM></STRONG></DIV>
    <DIV><STRONG><EM><FONT size=2 face=Arial></FONT></EM></STRONG>&nbsp;</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>&nbsp;</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>&nbsp;but can change it in 
      <EM>c:\users\user directory</EM>...</FONT></DIV>
      <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
      <DIV><FONT size=2><FONT face=Arial><STRONG><EM>&nbsp;&nbsp;&nbsp; ...&gt; 
      ren&nbsp; "c:\Program Files (x86)\Haskell 
      Platform\2010.2.0.0\winghci\test1.db" test2.db<BR>&nbsp;&nbsp;&nbsp; 
      Access is denied.</EM></STRONG></FONT></FONT></DIV>
      <DIV><STRONG><EM><FONT size=2 face=Arial></FONT></EM></STRONG>&nbsp;</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>&nbsp;</DIV>
      <DIV><FONT size=2 face=Arial>&nbsp;<STRONG><EM>&nbsp;&nbsp;&nbsp;...&gt; 
      type test1.db<BR>&nbsp;&nbsp;&nbsp; hello, 
      world!</EM></STRONG></FONT></DIV>
      <DIV><FONT size=2 face=Arial></FONT>&nbsp;</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>&nbsp;</DIV>
      <DIV><FONT size=2 face=Arial>Good day</FONT></DIV>
      <DIV>&nbsp;</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---&gt;[<EM>sqlite3.operational error unable to open database file 
        in windows vista</EM>]</FONT></DIV>
        <DIV><FONT size=2 face=Arial></FONT>&nbsp;</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>&nbsp;</DIV>
        <DIV><FONT size=2 face=Arial>*Sandbox&gt; dbh &lt;- 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>&nbsp;</DIV>
        <DIV><FONT size=2 face=Arial>*Sandbox&gt; dbh &lt;- 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>&nbsp;</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>&nbsp;</DIV>
        <DIV><FONT size=2 face=Arial>I can't invoke Sqlite3 from the command 
        line using---&gt; 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>&nbsp;</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>&nbsp;</DIV>
        <DIV><FONT size=2 face=Arial>Thank you</FONT></DIV>
        <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
        <DIV><FONT size=2 face=Arial></FONT>&nbsp;</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>