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 » Developing U++ » Bazaar » firebird: CharSet (For add option for Connect)
firebird: CharSet [message #48949] Wed, 08 November 2017 15:07
borbek is currently offline  borbek
Messages: 30
Registered: November 2010
Location: Russia
Member
Hello! Is it possible add into "Connect" method the charset parameter?

For example:

void FBSession::Connect(
	const char* dbname,
	const char* host,
	const char* user,
	const char* pswd,
        const char* charset,
	const String& dllName,
	ibpp::network_protocol_t protocol
	)
{
	if (!dllName.IsEmpty())
		dll.SetLibName(dllName);
	if (!dll.Load())
		throw ibpp::DbExc(dll.GetLibName() + " wasn't found.");

	// Service
	svc.attach(host, user, pswd, protocol);
	SvcConnected = true;

	// Database
	db.setUserName(user);
	db.setPassword(pswd);
	
	db.setCharSet(charset);    
	
	db.attach(dbname);
	DbConnected = true;
	DbName = dbname;


otherwise, when connecting to my base
 db.attach 
causes the error if you don't add
db.setCharSet("WIN1251");
before it.

Thanks!

[Updated on: Sun, 12 November 2017 07:18]

Report message to a moderator

Previous Topic: Job package: A lightweight worker thread for non-blocking operations.
Next Topic: firebird error message
Goto Forum:
  


Current Time: Tue Feb 19 10:21:46 CET 2019

Total time taken to generate the page: 0.01226 seconds