Adding uppdev....

git-svn-id: svn://ultimatepp.org/upp/trunk@328 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2008-08-15 08:36:24 +00:00
commit 4a1c627474
2823 changed files with 619073 additions and 0 deletions

View file

@ -0,0 +1,10 @@
description "Logging to MySql";
uses
MySql;
file
main.cpp;
mainconfig
"" = "MT";

19
uppdev/SQL_MySql/main.cpp Normal file
View file

@ -0,0 +1,19 @@
#include <MySql/MySql.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
MySqlSession session;
// substitute your 'username' and 'password' here:
if(!session.Connect("root", "koblih", "mysql", "localhost")) {
printf("Can't connect with MySql\n");
return;
}
Sql sql(session);
sql.Execute("use mysql");
sql.Execute("show tables");
while(sql.Fetch())
Cout() << (String)sql[0] << '\n';
}