Home » U++ Library support » U++ SQL » ExportSch, zero byte file is the result
Re: ExportSch, zero byte file is the result [message #21932 is a reply to message #21927] |
Thu, 11 June 2009 19:10   |
 |
mirek
Messages: 14263 Registered: November 2005
|
Ultimate Member |
|
|
Well, I have recently (2 weeks ago) used this code to study the schema of existing database:
#include <MySql/MySql.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
MySqlSession session;
// substitute your 'username' and 'password' here:
if(!session.Connect("root", "heslo", "test", "10.0.0.19")) {
printf("Can't connect with MySql\n");
return;
}
Sql sql(session);
sql.Execute("use test");
sql.Execute("show tables");
while(sql.Fetch())
Cout() << (String)sql[0] << '\n';
SaveFile("u:/lego.sch", ExportSch(session, "test"));
SaveFile("u:/legoid", ExportIds(session, "test"));
}
and it seems to have worked well....
Mirek
|
|
|
Goto Forum:
Current Time: Sun Jun 29 19:57:18 CEST 2025
Total time taken to generate the page: 0.05366 seconds
|