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++ » UppHub » firebird: CharSet (For add option for Connect)
firebird: CharSet [message #48949] Wed, 08 November 2017 15:07
borbek is currently offline  borbek
Messages: 31
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: Fri Mar 29 00:14:51 CET 2024

Total time taken to generate the page: 0.01338 seconds