BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help whit TDatabse

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Thu Sep 21, 2006 3:36 am    Post subject: Help whit TDatabse Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.