<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno ven 24 apr 2020 alle ore 18:47 T Lee Davidson <<a href="mailto:t.lee.davidson@gmail.com">t.lee.davidson@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I am having difficulty using Connections defined in the IDE with DataSource and DataView.<br>
<br>
First, I tried a sqlite3 connection. In a new Connection dialog, I:<br>
<br>
set the Type to "SQLite",<br>
browsed for and set the path = "/home/user/tmp", then<br>
selected the DB file from the Database file chooser = "test.db".<br>
<br>
I can view the data in the db using the Connection viewer (tab). But, when I run the program, I get:<br>
"Unable to locate `test.db` in `~/tmp`".<br>
<br>
I tried with different paths and files, and it complains that it cannot find any of them.<br>
<br>
<br>
So, I tried a mysql connection. In a new Connection dialog, I:<br>
set the Type to "MySQL",<br>
set the host to "localhost" and set the user and password appropriately,<br>
ensured that "Remember password" was enabled,<br>
selected the DB from the Database chooser.<br>
<br>
The same as with the SQLite connection, I can view the data in the db using the Connection viewer (tab). But, when I run the <br>
program, I get:<br>
"Cannot open database: Access denied for user 'user'@'localhost' (using password: NO)"<br>
<br>
<br>
Is there something I am missing in setting up these connections?<br></blockquote><div><br></div><div>I'm not sure but I believe that if the SQLite database is not inside the project then it must be specified in the opening code like the others:<br><br>  Connections["Connection1"].Type = "sqlite3"<br>  Connections["Connection1"].Host = "/path/of/database"<br>  Connections["Connection1"].Name = "test"<br>  $hConn = Connections["Connection1"]<br><br>of course for MySQL it is necessary to add:<br><br>  Connections["Connection1"].Login<br>  Connections["Connection1"].Password<br>  Connections["Connection1"].Port<br><br>Regards<br>Gianluigi <br></div></div></div>