 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Thu Sep 21, 2006 3:36 am Post subject: Help whit TDatabse |
|
|
Hello:
I have and application (this is a purchase application) that can
load dll. and run functions of this dll. so I am developing this dll,
that has a conection to a oracle DB, but when I try to set the name of
the database at the DAtabaseName property of the TDatabase or any of
the properties, I get end exeption, can some one helpme here is the
code in C++.
#include <dbtables.hpp>
#include <IniFiles.hpp>
#define CSIParameterFileName "\\inifile.ini"
#define DBSection "DB"
#define DBNameItem "DBName"
//*********
TDatabase *CSIDB;
int ErrorCode;
bool initialize()
{
AnsiString DBName="";
TIniFile *env;
env = new TIniFile(CSIParameterFileName);
DBName = env->ReadString(DBSection,DBNameItem,"");
CSIDB->DatabaseName = "csi";
CSIDB->DriverName = "Oracle in OraHome92";
CSIDB->LoginPrompt = false;
CSIDB->Params->Add("USER NAME=usuario");
CSIDB->Params->Add("PASSWORD=pass");
if(CSIDB->DatabaseName == "")
{
ErrorCode = No_DataBase_Name_In_INI;
return(false);
}
delete env;
//*******
return(true);
}
JA |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|