[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
core dump issues
From: |
rockycres |
Subject: |
core dump issues |
Date: |
Wed, 7 May 2008 00:42:51 -0700 (PDT) |
User-agent: |
G2/1.0 |
I am facing coredump issues while running..kindly help me on this
#include <iostream>
#include <string>
#include <occi.h>
#include <occiData.h>
#include <assert.h>
#include <stdio.h>
#include <iomanip>
#include "zlib.h"
using namespace oracle::occi;
using namespace std;
int main()
{
Environment *env = oracle::occi::Environment::createEnvironment
(Environment::DEFAULT);
Connection *conn;
Statement *stmt;
string user = "EQTMKTDATA";
string passwd = "2EQTMKTDATA!";
string db = "uatbar1a";
string sqlStmt = "SELECT symbol ,
period_type ,array_size ,start_date FROM bar_data where symbol ='MSFT'
and period_type= 1 ";
int year=1999;
unsigned int month=2, day=2, hour=2, minute=2, second=2;
// string sqlStmt = "select
symbol,period_type,bar_data_array,array_size from bar_data where
period_type in (3,4,5,6,7,8) and rownum <5";
int cnt=0;
conn = env->createConnection (user, passwd, db);
stmt = conn->createStatement (sqlStmt);
ResultSet *rset = stmt->executeQuery ();
while (rset->next ())
{
oracle::occi::Date sd = rset->getDate(4);
Date temp = sd;
temp.getDate(year,month, day, hour, minute, second);
//cout << " SYMBOL : " << rset->getString (1) << " PT : " << rset-
>getInt(2) << " AS :" << rset->getInt(3) << " DATE "<< rset-
>getString(4)<< endl;
cout << " SYMBOL : " << rset->getString (1) << " PT : "
<< rset->getInt(2) << " AS :" << rset->getInt(3) << endl;
cnt++;
}
stmt->closeResultSet (rset);
conn->terminateStatement (stmt);
env->terminateConnection (conn);
Environment::terminateEnvironment (env);
}
- core dump issues,
rockycres <=