Hi,
I did log on to the SQL Server with the same Login/pwd. I noticed one more
thing that this script is able to update the required vaules in some Servers
and in others it cant.
This is a code snippet which will give you an idea of what I am trying to
do.
void CIDPDBInstall:: UpdatePredefinedDDI(void)
{
std::string temp = CSVDDIClauseList[0].c_str();
fp = fopen(logFile, "a");
fprintf(fp,"UpdatePredefinedDDI\n");
std::string updateStmt = "update DigitDiscardInstruction set clause = '" +
temp + "' where fkDialPlan = '" + DialPlan_pkid + "' and name = 'NoDigits'";
fprintf(fp, "\n\n");
fprintf(fp,updateStmt.c_str());
pStmt = m_Con->createStatement();
pRs = pStmt->executeQuery(updateStmt);
delete pRs;
delete pStmt;
If there was a connection failure then i would have got an error message for
that in my logs, but that was not there.......... so i presume that there is
no problem with the connection part.
Any idea of whats happening ??
regards,
santosh.
"Jonathan" <jo******@heelal.nl> wrote in message
news:g4********************************@4ax.com...
On Thu, 20 Jan 2005 17:27:26 +0530, "Santosh" <sr***@cisco.com> wrote:
Hi,
I have a script running which fails when it tries to execute an Update
query, but when i try to run the query from the SQLQueryAnalyzer it runs
fine.
Can somebody try and explain this phenomenon.
Any kind of help will be appretiated.
thanks,
santosh.
It is hard when you have such a general story. But here are a few
guesses:
- Are you logged in using the same user and password from the same
host in both situations?
- Did your script connect to the mysql server? Did you check?
Maybe you could post (part) of the script and then we can try to
figure out what you are doing wrong.
Jonathan