Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
mirek is currently offline  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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: umlauts in mysql-update
Next Topic: Needs Moved - Errors when compiling - Allocation Functions not Linking? [VS2008]
Goto Forum:
  


Current Time: Sun Jun 29 14:25:42 CEST 2025

Total time taken to generate the page: 0.03644 seconds