Home » Developing U++ » UppHub » firebird: CharSet (For add option for Connect)
firebird: CharSet [message #48949] |
Wed, 08 November 2017 15:07 |
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 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
|
|
|
Goto Forum:
Current Time: Sat May 04 09:55:33 CEST 2024
Total time taken to generate the page: 0.02733 seconds
|