Need help to start with Oracle TimesTen with VC++ 2010

Hi,
I have installed TimesTen on Windows 7.
I am trying to compile the example given in the dir  timesten/quickstart/sample_code/ttclasses
basics.cpp

I am getting the errors below:  
What do I need to do in order to fix it?
Thanks

1>------ Build started: Project: basics, Configuration: Debug Win32 ------
1>Build started 4/5/2011 10:44:36 PM.
1>InitializeBuildStatus:
1>  Touching "Debug\basics.unsuccessfulbuild".
1>ClCompile:
1>  basics.cpp
1>c:\basics\basics\basics\basics.cpp(85): error C2660: 'TTCmd::Drop' : function does not take 0 arguments
1>c:\basics\basics\basics\basics.cpp(86): error C2660: 'TTCmd::Drop' : function does not take 0 arguments
1>c:\basics\basics\basics\basics.cpp(87): error C2660: 'TTCmd::Drop' : function does not take 0 arguments
1>c:\basics\basics\basics\basics.cpp(89): error C2661: 'TTConnection::Disconnect' : no overloaded function takes 0 arguments
1>c:\basics\basics\basics\basics.cpp(101): error C2664: 'void TTConnection::Connect(const char *,TTStatus &)' : cannot convert parameter 2 from 'TTConnection::DRIVER_COMPLETION_ENUM' to 'TTStatus &'
1>c:\basics\basics\basics\basics.cpp(109): error C2660: 'TTCmd::ExecuteImmediate' : function does not take 2 arguments
1>c:\basics\basics\basics\basics.cpp(122): error C2664: 'void TTCmd::Prepare(TTConnection *,const char *,TTStatus &)' : cannot convert parameter 3 from 'const char [1]' to 'TTStatus &'
1>c:\basics\basics\basics\basics.cpp(128): error C2664: 'void TTCmd::Prepare(TTConnection *,const char *,TTStatus &)' : cannot convert parameter 3 from 'const char [1]' to 'TTStatus &'
1>c:\basics\basics\basics\basics.cpp(131): error C2664: 'void TTCmd::Prepare(TTConnection *,const char *,TTStatus &)' : cannot convert parameter 3 from 'const char [1]' to 'TTStatus &'
1>c:\basics\basics\basics\basics.cpp(133): error C2660: 'TTConnection::Commit' : function does not take 0 arguments
1>c:\basics\basics\basics\basics.cpp(137): error C2661: 'TTConnection::Rollback' : no overloaded function takes 0 arguments
1>c:\basics\basics\basics\basics.cpp(151): error C2660: 'TTCmd::Execute' : function does not take 0 arguments
1>c:\basics\basics\basics\basics.cpp(152): error C2660: 'TTConnection::Commit' : function does not take 0 arguments
1>c:\basics\basics\basics\basics.cpp(169): error C2660: 'TTCmd::Execute' : function does not take 0 arguments
1>c:\basics\basics\basics\basics.cpp(185): error C2660: 'TTCmd::Execute' : function does not take 0 arguments
1>c:\basics\basics\basics\basics.cpp(187): error C2660: 'TTCmd::FetchNext' : function does not take 0 arguments
1>c:\basics\basics\basics\basics.cpp(190): error C2660: 'TTCmd::Close' : function does not take 0 arguments
1>c:\basics\basics\basics\basics.cpp(194): error C2660: 'TTCmd::Close' : function does not take 0 arguments
1>c:\basics\basics\basics\basics.cpp(208): error C2660: 'TTCmd::Execute' : function does not take 0 arguments
1>c:\basics\basics\basics\basics.cpp(212): error C2660: 'TTCmd::Close' : function does not take 0 arguments
1>c:\basics\basics\basics\basics.cpp(232): error C2661: 'TTConnection::Rollback' : no overloaded function takes 0 arguments
1>c:\basics\basics\basics\basics.cpp(341): error C2660: 'TTConnection::GetTTContext' : function does not take 1 arguments
1>c:\basics\basics\basics\basics.cpp(358): error C2661: 'TTConnection::Rollback' : no overloaded function takes 0 arguments
1>c:\basics\basics\basics\basics.cpp(364): error C2660: 'TTConnection::Commit' : function does not take 0 arguments
1>c:\basics\basics\basics\basics.cpp(385): error C2660: 'TTConnection::SetIsoSerializable' : function does not take 0 arguments
1>c:\basics\basics\basics\basics.cpp(390): error C2660: 'TTConnection::SetIsoReadCommitted' : function does not take 0 arguments
1>c:\basics\basics\basics\basics.cpp(415): error C2661: 'TTConnection::Rollback' : no overloaded function takes 0 arguments
1>c:\basics\basics\basics\basics.cpp(419): error C2660: 'TTConnection::Commit' : function does not take 0 arguments
1>c:\basics\basics\basics\basics.cpp(467): error C2661: 'TTConnection::Rollback' : no overloaded function takes 0 arguments
1>c:\basics\basics\basics\basics.cpp(492): error C2661: 'TTConnection::Rollback' : no overloaded function takes 0 arguments
1>c:\basics\basics\basics\basics.cpp(507): error C2660: 'TTConnection::Commit' : function does not take 0 arguments
1>c:\basics\basics\basics\basics.cpp(511): error C2661: 'TTConnection::Rollback' : no overloaded function takes 0 arguments
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.51
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Open in new window

star90Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sarabandeCommented:
can you post the basics.cpp ?

it looks like some header files were not the correct ones. so as if you would use the c headers for example.

i also wonder whether the c:\basics\basics\basics can be a wrong path?

Sara



0
star90Author Commented:
Hi  sarabande
The basics.cpp is at:
http://download.oracle.com/otn_hosted_doc/timesten/1121/quickstart/sample_code/ttclasses/basics.cpp 

The whole source code of timesten is available for download at:
http://www.oracle.com/technetwork/database/timesten/downloads/index.html

1) ttclasses dir appears in 3 places in the  directory  where I installed timesten (Win 7 64 bit)
<Install Dir>/quickstart/sample_code/ttclasses
<Install Dir>/ttclasses
<Install Dir>/include/ttclasses      // here I found the file    #include <ttclasses/TTInclude.h>


2) I copied  the directory ttclasses (from the first location) to the  project dir.
I added the /TTInclude.h from the third location to my project dir.
I have a basic question:
I added the path of  ttclasses to the include directories  and to the source directories of my project properties but I still got the
"Can not open Include file ttclasses/TTInclude.h"
So I added this file ( ttclasses/TTInclude.h)   to the Header Files of my project.
Is it necessary or what am I doing wrong ?
3) The documentation is available at
http://download.oracle.com/docs/cd/E13085_01/welcome.html
Thanks!
0
star90Author Commented:
I built it again in a different working directory.
This time I did not add any files to the Header files of the project (I just added to the Includes directories and source directories )
I also needed to copy the file tt_version from  quickstart/sample_code/common
I am getting the same errors as above
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

sarabandeCommented:
you could try to click into the TTCmd at line 65 of basics.cpp and do f12 then.

it should go to a header file where class TTCmd was defined.

i am downloading the timesten but i don't know whether that would help me to find out what was wrong with your code.


Sara
0
star90Author Commented:
Thank you
Please write down the stages you do in case its working for you.
0
star90Author Commented:
I meant the steps you do..
0
sarabandeCommented:
did you try to get the definition of TTCmd with f12?

Sara
0
star90Author Commented:
Hi,
In line 65 of the code I see
SampleConnection::~SampleConnection()
{   // this is line 65

If I press F12 it it takes me nowhere..

0
star90Author Commented:
Hi,
I think you meant line 85.
classs TTCmd is defined in the file TTCmd.h (attached)
and the option of 0 argument is controled by TTEXCEPT  (line 235)

So I added #define TTEXCEPT 1 at the first line of basics.cpp

-----------------------------------------------------------------------------------------
I am still getting the LNK errors below:
How can I solve it ? Thanks

1>------ Build started: Project: basic1, Configuration: Debug Win32 ------
1>Build started 4/7/2011 2:57:03 AM.
1>InitializeBuildStatus:
1>  Touching "Debug\basic1.unsuccessfulbuild".
1>ClCompile:
1>  All outputs are up-to-date.
1>ManifestResourceCompile:
1>  All outputs are up-to-date.
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall TTCmd::~TTCmd(void)" (__imp_??1TTCmd@@UAE@XZ) referenced in function __unwindfunclet$??0SampleConnection@@QAE@XZ$0
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall TTConnection::~TTConnection(void)" (__imp_??1TTConnection@@UAE@XZ) referenced in function __unwindfunclet$??0SampleConnection@@QAE@XZ$0
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall TTCmd::TTCmd(void)" (__imp_??0TTCmd@@QAE@XZ) referenced in function "public: __thiscall SampleConnection::SampleConnection(void)" (??0SampleConnection@@QAE@XZ)
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall TTConnection::TTConnection(void)" (__imp_??0TTConnection@@QAE@XZ) referenced in function "public: __thiscall SampleConnection::SampleConnection(void)" (??0SampleConnection@@QAE@XZ)
1>basics.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TTConnection::Disconnect(class TTStatus &)" (?Disconnect@TTConnection@@UAEXAAVTTStatus@@@Z)
1>basics.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TTConnection::Rollback(void)" (?Rollback@TTConnection@@UAEXXZ)
1>basics.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TTConnection::Rollback(class TTStatus &)" (?Rollback@TTConnection@@UAEXAAVTTStatus@@@Z)
1>basics.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TTConnection::Connect(char const *)" (?Connect@TTConnection@@UAEXPBD@Z)
1>basics.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TTConnection::Connect(char const *,class TTStatus &)" (?Connect@TTConnection@@UAEXPBDAAVTTStatus@@@Z)
1>basics.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TTConnection::Connect(char const *,char const *,char const *)" (?Connect@TTConnection@@UAEXPBD00@Z)
1>basics.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TTConnection::Connect(char const *,char const *,char const *,class TTStatus &)" (?Connect@TTConnection@@UAEXPBD00AAVTTStatus@@@Z)
1>basics.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TTConnection::Connect(char const *,unsigned short,class TTStatus &)" (?Connect@TTConnection@@UAEXPBDGAAVTTStatus@@@Z)
1>basics.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TTConnection::Connect(char const *,enum TTConnection::DRIVER_COMPLETION_ENUM,class TTStatus &)" (?Connect@TTConnection@@UAEXPBDW4DRIVER_COMPLETION_ENUM@1@AAVTTStatus@@@Z)
1>basics.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TTConnection::Commit(void)" (?Commit@TTConnection@@UAEXXZ)
1>basics.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TTConnection::Commit(class TTStatus &)" (?Commit@TTConnection@@UAEXAAVTTStatus@@@Z)
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall TTError::~TTError(void)" (__imp_??1TTError@@UAE@XZ) referenced in function __catch$??1SampleConnection@@UAE@XZ$0
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class TTStatus const &)" (__imp_??6@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV01@ABVTTStatus@@@Z) referenced in function __catch$??1SampleConnection@@UAE@XZ$0
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall TTConnection::Disconnect(void)" (__imp_?Disconnect@TTConnection@@UAEXXZ) referenced in function "public: virtual void __thiscall SampleConnection::Disconnect(void)" (?Disconnect@SampleConnection@@UAEXXZ)
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall TTStatus::TTStatus(class TTStatus const &)" (__imp_??0TTStatus@@QAE@ABV0@@Z) referenced in function __catch$?Connect@SampleConnection@@UAEXPBDW4DRIVER_COMPLETION_ENUM@TTConnection@@@Z$0
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall TTStatus::~TTStatus(void)" (__imp_??1TTStatus@@UAE@XZ) referenced in function __catch$?Connect@SampleConnection@@UAEXPBDW4DRIVER_COMPLETION_ENUM@TTConnection@@@Z$0
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall TTWarning::~TTWarning(void)" (__imp_??1TTWarning@@UAE@XZ) referenced in function __catch$?Connect@SampleConnection@@UAEXPBDW4DRIVER_COMPLETION_ENUM@TTConnection@@@Z$0
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall TTConnection::Connect(char const *,enum TTConnection::DRIVER_COMPLETION_ENUM)" (__imp_?Connect@TTConnection@@UAEXPBDW4DRIVER_COMPLETION_ENUM@1@@Z) referenced in function "public: virtual void __thiscall SampleConnection::Connect(char const *,enum TTConnection::DRIVER_COMPLETION_ENUM)" (?Connect@SampleConnection@@UAEXPBDW4DRIVER_COMPLETION_ENUM@TTConnection@@@Z)
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall TTStatus::TTStatus(void)" (__imp_??0TTStatus@@QAE@XZ) referenced in function "public: virtual void __thiscall SampleConnection::Connect(char const *,enum TTConnection::DRIVER_COMPLETION_ENUM)" (?Connect@SampleConnection@@UAEXPBDW4DRIVER_COMPLETION_ENUM@TTConnection@@@Z)
1>basics.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall TTStatus::~TTStatus(void)" (??1TTStatus@@UAE@XZ)
1>basics.obj : error LNK2001: unresolved external symbol "public: __thiscall TTStatus::TTStatus(class TTStatus const &)" (??0TTStatus@@QAE@ABV0@@Z)
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall TTError::TTError(class TTError const &)" (__imp_??0TTError@@QAE@ABV0@@Z) referenced in function __catch$?insert@SampleConnection@@QAEXPAD@Z$0
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall TTCmd::setParam(int,long)" (__imp_?setParam@TTCmd@@QAEXHJ@Z) referenced in function "public: void __thiscall SampleConnection::insert(char *)" (?insert@SampleConnection@@QAEXPAD@Z)
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall TTCmd::setParam(int,char *)" (__imp_?setParam@TTCmd@@QAEXHPAD@Z) referenced in function "public: void __thiscall SampleConnection::insert(char *)" (?insert@SampleConnection@@QAEXPAD@Z)
1>basics.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall TTError::~TTError(void)" (??1TTError@@UAE@XZ)
1>basics.obj : error LNK2001: unresolved external symbol "public: __thiscall TTError::TTError(class TTError const &)" (??0TTError@@QAE@ABV0@@Z)
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall TTCmd::getColumn(int,long *)" (__imp_?getColumn@TTCmd@@QAEXHPAJ@Z) referenced in function "public: void __thiscall SampleConnection::query(char const *,int *)" (?query@SampleConnection@@QAEXPBDPAH@Z)
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall TTCmd::setParam(int,char const *)" (__imp_?setParam@TTCmd@@QAEXHPBD@Z) referenced in function "public: void __thiscall SampleConnection::query(char const *,int *)" (?query@SampleConnection@@QAEXPBDPAH@Z)
1>basics.obj : error LNK2019: unresolved external symbol _SignalReceived referenced in function "public: void __thiscall SampleConnection::TerminateIfRequested(void)" (?TerminateIfRequested@SampleConnection@@QAEXXZ)
1>basics.obj : error LNK2019: unresolved external symbol _StopRequested referenced in function "public: void __thiscall SampleConnection::TerminateIfRequested(void)" (?TerminateIfRequested@SampleConnection@@QAEXXZ)
1>basics.obj : error LNK2019: unresolved external symbol "public: __thiscall ParamParser::~ParamParser(void)" (??1ParamParser@@QAE@XZ) referenced in function __catch$_main$0
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall TTStatus::resetErrors(bool)" (__imp_?resetErrors@TTStatus@@QAEX_N@Z) referenced in function __catch$_main$0
1>basics.obj : error LNK2019: unresolved external symbol __imp__ttCalcElapsedWallClockTime referenced in function __catch$_main$0
1>basics.obj : error LNK2019: unresolved external symbol __imp__ttCalcElapsedThreadTimes referenced in function __catch$_main$0
1>basics.obj : error LNK2019: unresolved external symbol __imp__ttGetThreadTimes referenced in function __catch$_main$0
1>basics.obj : error LNK2019: unresolved external symbol __imp__ttGetWallClockTime referenced in function __catch$_main$0
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall TTConnection::SetIsoReadCommitted(void)" (__imp_?SetIsoReadCommitted@TTConnection@@QAEXXZ) referenced in function __catch$_main$0
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall TTConnection::SetIsoSerializable(void)" (__imp_?SetIsoSerializable@TTConnection@@QAEXXZ) referenced in function __catch$_main$0
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall TTConnection::Commit(void)" (__imp_?Commit@TTConnection@@UAEXXZ) referenced in function __catch$_main$0
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall TTConnection::Rollback(void)" (__imp_?Rollback@TTConnection@@UAEXXZ) referenced in function __catch$_main$0
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall TTConnection::GetTTContext(char *)" (__imp_?GetTTContext@TTConnection@@QAEXPAD@Z) referenced in function __catch$_main$0
1>basics.obj : error LNK2019: unresolved external symbol _HandleSignals referenced in function _main
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl TTGlobal::setLogLevel(enum TTLog::TTLOG_LEVEL)" (__imp_?setLogLevel@TTGlobal@@SAXW4TTLOG_LEVEL@TTLog@@@Z) referenced in function _main
1>basics.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl TTGlobal::setLogStream(class std::basic_ostream<char,struct std::char_traits<char> > &)" (__imp_?setLogStream@TTGlobal@@SAXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z) referenced in function _main
1>basics.obj : error LNK2019: unresolved external symbol "public: char const * __thiscall ParamParser::getArgValue(char const *)" (?getArgValue@ParamParser@@QAEPBDPBD@Z) referenced in function _main
1>basics.obj : error LNK2019: unresolved external symbol "public: bool __thiscall ParamParser::argUsed(char const *)" (?argUsed@ParamParser@@QAE_NPBD@Z) referenced in function _main
1>basics.obj : error LNK2019: unresolved external symbol "public: void __thiscall ParamParser::processArgs(int,char * * const,char *)" (?processArgs@ParamParser@@QAEXHQAPADPAD@Z) referenced in function _main
1>basics.obj : error LNK2019: unresolved external symbol "public: void __thiscall ParamParser::setArg(char const *,bool,int)" (?setArg@ParamParser@@QAEXPBD_NH@Z) referenced in function _main
1>basics.obj : error LNK2019: unresolved external symbol "public: __thiscall ParamParser::ParamParser(char const *)" (??0ParamParser@@QAE@PBD@Z) referenced in function _main
1>C:\basic1\Debug\basic1.exe : fatal error LNK1120: 53 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.34
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 

// TTCmd.h: interface for the TTCmd class.
//
// $Id: TTCmd.h /main/16 2010/03/29 09:39:43 alansu Exp $
// $Revision: /main/16 $
// $Name:  $
//
// Copyright (c) 1999, 2010, Oracle and/or its affiliates. 
// All rights reserved. 
//
//////////////////////////////////////////////////////////////////////

#ifndef __TT_CMD_H_
#define __TT_CMD_H_

#include "TT__Header.h"

#ifdef _WIN32
#if _MSC_VER > 1000
#pragma once
#endif /* _MSC_VER > 1000 */
#endif /* _WIN32 */

#include "TTCommand.h"
#include "TTColumn.h"
#include "TTParameter.h"
#include "TTGlobal.h"

class IMPORTEXPORT TTCmd : public TTCommand
{
 friend class TTParameter;

 public:
  enum TTCMD_PARAM_INPUTOUTPUT_TYPE { PARAM_IN = SQL_PARAM_INPUT,
                                      PARAM_INOUT = SQL_PARAM_INPUT_OUTPUT,
                                      PARAM_OUT = SQL_PARAM_OUTPUT };
  // Deprecated.
  enum TTCMD_USER_BIND_LEVEL { TTCMD_USER_BIND_NONE, TTCMD_USER_BIND_PARAMS,
                               TTCMD_USER_BIND_COLUMNS, TTCMD_USER_BIND_ALL };

  
  // --------------------------------------------------------
  // data members
  // --------------------------------------------------------
 private:
  int nColumns;
  int nParameters;
  int nRows; // for bulk inserts, updates, and deletes in TT 4.5+

 protected:
  TTParameter*  paramP;
  TTColumn*     columnP;

 private:
  bool beingExecuted;
  bool batchOperation;
  bool paramsDescribed;
  int currentColPos;

  // is the user binding columns &/or params?
  TTCMD_USER_BIND_LEVEL user_bind_setting;
  bool fullyBound; // are all columns & parameters bound?
  u_short max_batch_size; // the maximum size (# rows) for a batch operation
  // --------------------------------------------------------

  // --------------------------------------------------------
  // ctors, dtor, op=
  // --------------------------------------------------------
 public:
  TTCmd();
  virtual ~TTCmd(); // throws TTStatus
 private: // explicitly declared private to prevent use
  TTCmd (const TTCmd &);
  TTCmd & operator=(const TTCmd &);
  // --------------------------------------------------------

 private:
  void cleanup() ; // internal routine to clean up all data members

 protected:  
  // PrepareStmt is a subroutine of Prepare & PrepareUserBind
  virtual void PrepareStmt(TTConnection* cP,
                           const char* sqlp,
                           const char* explanationP,
                           TTCMD_USER_BIND_LEVEL level,
                           u_short batch_size,
                           TTStatus&);  
  void BindColumns(TTStatus&) ; // used by TTCmd::PrepareStmt, externalized for
  //                            // non-SQL inheritors (e.g., metadata
  //                            // queries) of TTCmd
  void PopulateParamObjs(TTStatus&); // subroutine of TTCmd::PrepareStmt
  void InitRCCmdAfterExec(TTCmd&, SQLHSTMT rcStmtH, TTStatus& stat);
  void DescribeParams(TTStatus&);
TT_DEPRECATED_PROTECTED:
  // Convenience method: print a query plan to the strstream param.
  void PrintQueryPlan (STDOSTRSTREAM& str, const char* sqlp, TTStatus&);

 public:
  bool queryBeingExecuted() const { return beingExecuted; } // Deprecated
  bool isBeingExecuted()    const { return beingExecuted; }
  int  getNColumns()          const { return nColumns; }
  int  getNParameters()       const { return nParameters; }
  SQLHSTMT getHandle()      { return TTCommand::getHandle(); }
  u_short batchSize() const { return max_batch_size; }

  // --------------------------------------------------------------
  // Exception-throwing methods:
  // --------------------------------------------------------------
 public:
  // There are two versions of Prepare for convenience -- we need
  // compatability with original signature, but third parameter to
  // PrepareStmt (const char * explanationP) is not (currently) used
  virtual void Prepare(TTConnection* cP, const char* sqlp, TTStatus& stat)
  { TTCmd::PrepareStmt(cP, sqlp, "", TTCmd::TTCMD_USER_BIND_PARAMS, 1, stat); }
#ifdef TTEXCEPT // deprecated
  inline virtual void Prepare(TTConnection* cP, const char* sqlp)
  { TTStatus ttst; Prepare(cP, sqlp, ttst); }
#endif

  // deprecated
  virtual void Prepare(TTConnection* cP, const char* sqlp, const char* explP,
                       TTStatus& stat)
  { TTCmd::PrepareStmt (cP, sqlp, explP, TTCmd::TTCMD_USER_BIND_PARAMS, 1, stat); }
#ifdef TTEXCEPT // deprecated
  // deprecated
  inline virtual void Prepare(TTConnection* cP, const char* sqlp, const char* explP)
  { TTStatus ttst; Prepare(cP, sqlp, explP, ttst); }
#endif

  // A version of Prepare where the user can bind own params and/or columns
  // (and potentially multiple rows at once).
  // DEPRCATED
  virtual void PrepareBatch (TTConnection* cP, const char* sqlp,
                             TTCMD_USER_BIND_LEVEL level, u_short batSz,
                             TTStatus& stat)
  {
    // TT only supports parameter binding
    if (level == TTCmd::TTCMD_USER_BIND_COLUMNS) {
      stat.rc = SQL_ERROR;
      stat.appendErrMsg("Error in TTCmd::PrepareBatch() -- unsupported user bind level "
                        "TTCmd::TTCMD_USER_BIND_COLUMNS "
                        "specified while compiling statement "
                        "<%s>.", const_cast<char*>(sqlp));
      stat.throwError();
      return;
    }
    if (level == TTCmd::TTCMD_USER_BIND_ALL) {
      stat.rc = SQL_ERROR;
      stat.appendErrMsg("Error in TTCmd::PrepareBatch() -- unsupported user bind level "
                        "TTCmd::TTCMD_USER_BIND_ALL "
                        "specified while compiling statement "
                        "<%s>.", const_cast<char*>(sqlp));
      stat.throwError();
      return;
    }

    batchOperation = true;
    TTCmd::PrepareStmt(cP, sqlp, "", level, batSz, stat);
  }

#ifdef TTEXCEPT // deprecated
   // deprecated
  inline virtual void PrepareBatch(TTConnection* cP, const char* sqlp,
                             TTCMD_USER_BIND_LEVEL level, u_short batSz)
  { TTStatus ttst; PrepareBatch(cP, sqlp, level, batSz, ttst); }
#endif

  // A version of Prepare where the user can bind own params and/or columns
  // (and potentially multiple rows at once).
  inline virtual void PrepareBatch (TTConnection* cP, const char* sqlp,
                                    u_short batSz, TTStatus& stat)
  {
    // TT only supports parameter binding, TTCMD_USER_BIND_PARAMS
    PrepareBatch(cP, sqlp, TTCmd::TTCMD_USER_BIND_PARAMS, batSz, stat);

  }
#ifdef TTEXCEPT // deprecated
  inline virtual void PrepareBatch(TTConnection* cP, const char* sqlp,
                                   u_short batSz)
  { TTStatus ttst; PrepareBatch(cP, sqlp, batSz, ttst); }
#endif

  // TTCmd::getRowCount() -- returns # of rows affected by the recent
  // Execute() call of this TTCmd object.
  int getRowCount(TTStatus&);
  inline int getRowCount()
  { TTStatus ttst; return getRowCount(ttst); }

 public:
  virtual void RePrepare(TTConnection* cP, TTStatus&); // throws TTStatus
#ifdef TTEXCEPT // deprecated
  inline virtual void RePrepare(TTConnection* cP)
  { TTStatus ttst; RePrepare(cP, ttst); }
#endif
  virtual void Execute(TTStatus&);    // throws TTStatus
#ifdef TTEXCEPT // deprecated
  inline virtual void Execute()
  { TTStatus ttst; Execute(ttst); }
#endif

  // This second version of Execute is used when the user is performing
  // a batch of insert/update/delete operation, and needs to specify how
  // many rows of parameters are going to be executed at once.
  //
  // The return value is the number of statements that were successfully
  // executed by the batch operation.
  virtual int  ExecuteBatch(u_short numRows, TTStatus&); // throws TTStatus
#ifdef TTEXCEPT // deprecated
  inline virtual int ExecuteBatch(u_short numRows)
  { TTStatus ttst; return ExecuteBatch(numRows, ttst); } // throws TTStatus }
#endif

  // The return value is the # of rows affected (calls SQLRowCount() under the covers).
  virtual int  ExecuteImmediate(TTConnection* cP,
                                const char* sqlp,
                                TTStatus&); // throws TTStatus
#ifdef TTEXCEPT // deprecated
  inline virtual int  ExecuteImmediate(TTConnection* cP, const char* sqlp)
  { TTStatus ttst; return ExecuteImmediate(cP, sqlp, ttst); }
#endif

  virtual int FetchNext(TTStatus&);  // throws TTStatus (retval: 1: no more data; 0: row fetched)
#ifdef TTEXCEPT // deprecated
  inline virtual int FetchNext()
  { TTStatus ttst; return FetchNext(ttst); }
#endif

  virtual void Close(TTStatus&);      // throws TTStatus
#ifdef TTEXCEPT // deprecated
  inline virtual void Close()
  { TTStatus ttst; Close(ttst); }
#endif

  virtual void Drop(TTStatus&);       // throws TTStatus
  
#ifdef TTEXCEPT // deprecated
  inline virtual void Drop()
  { TTStatus ttst; Drop(ttst); }
#endif

  int getMaxRows(TTStatus&);                        // throws TTStatus
#ifdef TTEXCEPT // deprecated
  inline int getMaxRows()
  { TTStatus ttst; return getMaxRows(ttst); }
#endif

  void setMaxRows(const int nMaxRows, TTStatus&);      // throws TTStatus
#ifdef TTEXCEPT // deprecated
  inline void setMaxRows(const int nMaxRows)
  { TTStatus ttst; setMaxRows(nMaxRows, ttst); }
#endif

  void setQueryThreshold(const int nSecs, TTStatus&); // throws TTStatu
#ifdef TTEXCEPT // deprecated
  inline void setQueryThreshold(const int nSecs)
  { TTStatus ttst; setQueryThreshold(nSecs, ttst); }
#endif

  void setQueryTimeout(const int nSecs, TTStatus&); // throws TTStatus
#ifdef TTEXCEPT // deprecated
  inline void setQueryTimeout(const int nSecs)
  { TTStatus ttst; setQueryTimeout(nSecs, ttst); }
#endif

  int getQueryThreshold(TTStatus&); // throws TTStatus
#ifdef TTEXCEPT // deprecated
  inline int getQueryThreshold()
  { TTStatus ttst; return getQueryThreshold(ttst); }
#endif
  // --------------------------------------------------------------

 public:
  // metadata questions about param #i
  // const char * getParamName(int i); // not returned from DB metadata
  int          getParamType(int pno);
  int          getParamPrecision(int pno);
  int          getParamScale(int pno);
  int          getParamNullability(int pno);

  // metadata questions about column #i
  const char * getColumnName(int cno);
  int          getColumnType(int cno);
  int          getColumnPrecision(int cno);
  int          getColumnScale(int cno);
  int          getColumnNullability(int cno);

  // questions about this particular column #i
  bool         isColumnNull (int cno);
  int          getColumnLength (int cno);

  int          getParamType(int pno, TTStatus&);
  int          getParamPrecision(int pno, TTStatus&);
  int          getParamScale(int pno, TTStatus&);
  int          getParamNullability(int pno, TTStatus&);

  const char * getColumnName(int cno, TTStatus&);
  int          getColumnType(int cno, TTStatus&);
  int          getColumnPrecision(int cno, TTStatus&);
  int          getColumnScale(int cno, TTStatus&);
  int          getColumnNullability(int cno, TTStatus&);

  bool         isColumnNull (int cno, TTStatus&);
  int          getColumnLength (int cno, TTStatus&);

  // getColumn methods
 private:
  // internal sanity-checking method
  void validateColumn(TTStatus&, int cno,
                      const char* method=NULL) const; // throws TTStatus
 public:
  void getColumn(int cno, char** cPP, TTStatus&);
  bool getColumnNullable(int cno, char** cPP, TTStatus&);
  void getColumn(int cno, char** cPP);
  inline bool getColumnNullable(int cno, char** cPP)
  { TTStatus ttst; return getColumnNullable(cno, cPP, ttst); }


  // allow using pre-allocated storage (passing in an array)
  void getColumn(int cno, char* cP, TTStatus&);
  bool getColumnNullable(int cno, char* cP, TTStatus&);
  // allow using pre-allocated storage (passing in an array)
  void getColumn(int cno, char* cP);
  inline bool getColumnNullable(int cno, char* cP)
  { TTStatus ttst; return getColumnNullable(cno, cP, ttst); }

  void getColumn(int cno, double* dP, TTStatus&);
  bool getColumnNullable(int cno, double* dP, TTStatus&);
  void getColumn(int cno, double* dP);
  inline bool getColumnNullable(int cno, double* dP)
  { TTStatus ttst; return getColumnNullable(cno, dP, ttst); }

  void getColumn(int cno, DATE_STRUCT* dP, TTStatus&);
  bool getColumnNullable(int cno, DATE_STRUCT* dP, TTStatus&);
  void getColumn(int cno, DATE_STRUCT* dP);
  inline bool getColumnNullable(int cno, DATE_STRUCT* dP)
  { TTStatus ttst; return getColumnNullable(cno, dP, ttst); }

  void getColumn(int cno, float* fP, TTStatus&);
  bool getColumnNullable(int cno, float* fP, TTStatus&);
  void getColumn(int cno, float* fP);
  inline bool getColumnNullable(int cno, float* fP)
  { TTStatus ttst; return getColumnNullable(cno, fP, ttst); }

#if defined(_WIN32)
  inline void getColumn(int cno, int* iP, TTStatus& stat)
  { getColumn(cno, (SQLINTEGER*)iP, stat); }
  inline bool getColumnNullable(int cno, int* iP, TTStatus& stat)
  { return getColumnNullable(cno, (SQLINTEGER*)iP, stat); }
  inline void getColumn(int cno, int* iP)
  { TTStatus ttst; getColumn(cno, iP, ttst); }
  inline bool getColumnNullable(int cno, int* iP)
  { TTStatus ttst; return getColumnNullable(cno, iP, ttst); }
#else
#ifndef TT_64BIT
  inline void getColumn(int cno, long* iP, TTStatus& st)
  { getColumn(cno, (SQLINTEGER*)iP, st); }
  inline bool getColumnNullable(int cno, long* iP, TTStatus& st)
  { return getColumnNullable(cno, (SQLINTEGER*)iP, st); }
  inline void getColumn(int cno, long* iP)
  { TTStatus ttst; getColumn(cno, iP, ttst); }
  inline bool getColumnNullable(int cno, long* iP)
  { TTStatus ttst; return getColumnNullable(cno, iP, ttst); }
#endif /* !TT_64BIT */
#endif /* _WIN32 */

// BEGIN: won't work with ODBC Driver Managers
  void getColumn(int cno, SQLBIGINT* iP, TTStatus&);
  bool getColumnNullable(int cno, SQLBIGINT* iP, TTStatus&);
  void getColumn(int cno, SQLBIGINT* iP);
  inline bool getColumnNullable(int cno, SQLBIGINT* iP)
  { TTStatus ttst; return getColumnNullable(cno, iP, ttst); }
// END: won't work with ODBC Driver Managers

  void getColumn(int cno, SQLINTEGER* iP, TTStatus&);
  bool getColumnNullable(int cno, SQLINTEGER* iP, TTStatus&);
  void getColumn(int cno, SQLINTEGER* iP);
  inline bool getColumnNullable(int cno, SQLINTEGER* iP)
  { TTStatus ttst; return getColumnNullable(cno, iP, ttst); }

  void getColumn(int cno, SQLSMALLINT* iP, TTStatus&);
  bool getColumnNullable(int cno, SQLSMALLINT* iP, TTStatus&);
  void getColumn(int cno, SQLSMALLINT* iP);
  inline bool getColumnNullable(int cno, SQLSMALLINT* iP)
  { TTStatus ttst; return getColumnNullable(cno, iP, ttst); }

// BEGIN: won't work with ODBC Driver Managers
  void getColumn(int cno, SQLTINYINT* iP, TTStatus&);
  bool getColumnNullable(int cno, SQLTINYINT* iP, TTStatus&);
  void getColumn(int cno, SQLTINYINT* iP);
  inline bool getColumnNullable(int cno, SQLTINYINT* iP)
  { TTStatus ttst; return getColumnNullable(cno, iP, ttst); }
// END: won't work with ODBC Driver Managers


// BEGIN: won't work with ODBC Driver Managers
  void getColumn(int cno, SQLWCHAR** wcPP, TTStatus&);
  bool getColumnNullable(int cno, SQLWCHAR** wcPP, TTStatus&);
  void getColumn(int cno, SQLWCHAR** wcPP, int* byteLenP, TTStatus&);
  bool getColumnNullable(int cno, SQLWCHAR** wcPP, int* byteLenP, TTStatus&);  /* length in bytes */
  void getColumn(int cno, SQLWCHAR** wcPP);
  inline bool getColumnNullable(int cno, SQLWCHAR** wcPP)
  { TTStatus ttst; return getColumnNullable(cno, wcPP, ttst); }
  void getColumn(int cno, SQLWCHAR** wcPP, int* byteLenP);
  inline bool getColumnNullable(int cno, SQLWCHAR** wcPP, int* byteLenP) /* length in bytes */
  { TTStatus ttst; return getColumnNullable(cno, wcPP, byteLenP, ttst); }
// END: won't work with ODBC Driver Managers

  void getColumn(int cno, TIME_STRUCT* tP, TTStatus&);
  bool getColumnNullable(int cno, TIME_STRUCT* tP, TTStatus&);
  void getColumn(int cno, TIME_STRUCT* tP);
  inline bool getColumnNullable(int cno, TIME_STRUCT* tP)
  { TTStatus ttst; return getColumnNullable(cno, tP, ttst); }

  void getColumn(int cno, TIMESTAMP_STRUCT* tsP, TTStatus&);
  bool getColumnNullable(int cno, TIMESTAMP_STRUCT* tsP, TTStatus&);
  void getColumn(int cno, TIMESTAMP_STRUCT* tsP);
  inline bool getColumnNullable(int cno, TIMESTAMP_STRUCT* tsP)
  { TTStatus ttst; return getColumnNullable(cno, tsP, ttst); }

  void getColumn(int cno, void** binPP, int* byteLenP /* OUT */, TTStatus&);
  bool getColumnNullable(int cno, void** binPP, int* byteLenP /* OUT */, TTStatus&); /* length in bytes */
  void getColumn(int cno, void** binPP, int* byteLenP /* OUT */);
  inline bool getColumnNullable(int cno, void** binPP, int* byteLenP /* OUT */)  /* length in bytes */
  { TTStatus ttst; return getColumnNullable(cno, binPP, byteLenP, ttst); }

  void getColumn(int cno, void* binP, int* byteLenP /* OUT */, TTStatus&) ;
  bool getColumnNullable(int cno, void* binP, int* byteLenP /* OUT */, TTStatus&) ;
  // allow using pre-allocated storage (passing in an array)
  void getColumn(int cno, void* binP, int* byteLenP /* OUT */) ;
  inline bool getColumnNullable(int cno, void* binP, int* byteLenP /* OUT */)
  { TTStatus ttst; return getColumnNullable(cno, binP, byteLenP, ttst); }

  // getNextColumn methods
// BEGIN: won't work with ODBC Driver Managers
  void getNextColumn(SQLTINYINT* iP, TTStatus& stat)
  { getColumn(currentColPos++, iP, stat); }
  bool getNextColumnNullable(SQLTINYINT* iP, TTStatus& stat)
  { return getColumnNullable(currentColPos++, iP, stat); }
  void getNextColumn(SQLTINYINT* iP)
  { TTStatus ttst; getColumn(currentColPos++, iP, ttst); }
  bool getNextColumnNullable(SQLTINYINT* iP)
  { TTStatus ttst; return getColumnNullable(currentColPos++, iP, ttst); }
// END: won't work with ODBC Driver Managers

  void getNextColumn(SQLSMALLINT* iP, TTStatus& stat)
  { getColumn(currentColPos++, iP, stat); }
  bool getNextColumnNullable(SQLSMALLINT* iP, TTStatus& stat)
  { return getColumnNullable(currentColPos++, iP, stat); }
  void getNextColumn(SQLSMALLINT* iP)
  { TTStatus ttst; getColumn(currentColPos++, iP, ttst); }
  bool getNextColumnNullable(SQLSMALLINT* iP)
  { TTStatus ttst; return getColumnNullable(currentColPos++, iP, ttst); }

  void getNextColumn(SQLINTEGER* iP, TTStatus& stat)
  { getColumn(currentColPos++, iP, stat); }
  bool getNextColumnNullable(SQLINTEGER* iP, TTStatus& stat)
  { return getColumnNullable(currentColPos++, iP, stat); }
  void getNextColumn(SQLINTEGER* iP)
  { TTStatus ttst; getColumn(currentColPos++, iP, ttst); }
  bool getNextColumnNullable(SQLINTEGER* iP)
  { TTStatus ttst; return getColumnNullable(currentColPos++, iP, ttst); }

#if defined(_WIN32)
  void getNextColumn(int* iP, TTStatus& stat)
  { getColumn(currentColPos++, (SQLINTEGER*)iP, stat); }
  bool getNextColumnNullable(int* iP, TTStatus& stat)
  { return getColumnNullable(currentColPos++, (SQLINTEGER*)iP, stat); }
  void getNextColumn(int* iP)
  { TTStatus ttst; getColumn(currentColPos++, (SQLINTEGER*)iP, ttst); }
  bool getNextColumnNullable(int* iP)
  { TTStatus ttst; return getColumnNullable(currentColPos++, (SQLINTEGER*)iP, ttst); }
#else
#ifndef TT_64BIT
  void getNextColumn(long* iP, TTStatus& stat)
  { getColumn(currentColPos++, (SQLINTEGER*)iP, stat); }
  bool getNextColumnNullable(long* iP, TTStatus& stat)
  { return getColumnNullable(currentColPos++, (SQLINTEGER*)iP, stat); }
  void getNextColumn(long* iP)
  { TTStatus ttst; getColumn(currentColPos++, (SQLINTEGER*)iP, ttst); }
  bool getNextColumnNullable(long* iP)
  { TTStatus ttst; return getColumnNullable(currentColPos++, (SQLINTEGER*)iP, ttst); }
#endif /* !TT_64BIT */
#endif /* _WIN32 */

// BEGIN: won't work with ODBC Driver Managers
  void getNextColumn(SQLBIGINT* iP, TTStatus& stat)
  { getColumn(currentColPos++, iP, stat); }
  bool getNextColumnNullable(SQLBIGINT* iP, TTStatus& stat)
  { return getColumnNullable(currentColPos++, iP, stat); }
  void getNextColumn(SQLBIGINT* iP)
  { TTStatus ttst; getColumn(currentColPos++, iP, ttst); }
  bool getNextColumnNullable(SQLBIGINT* iP)
  { TTStatus ttst; return getColumnNullable(currentColPos++, iP, ttst); }
// END: won't work with ODBC Driver Managers

  void getNextColumn(float* fP, TTStatus& stat)
  { getColumn(currentColPos++, fP, stat); }
  bool getNextColumnNullable(float* fP, TTStatus& stat)
  { return getColumnNullable(currentColPos++, fP, stat); }
  void getNextColumn(float* fP)
  { TTStatus ttst; getColumn(currentColPos++, fP, ttst); }
  bool getNextColumnNullable(float* fP)
  { TTStatus ttst; return getColumnNullable(currentColPos++, fP, ttst); }

  void getNextColumn(double* dP, TTStatus& stat)
  { getColumn(currentColPos++, dP, stat); }
  bool getNextColumnNullable(double* dP, TTStatus& stat)
  { return getColumnNullable(currentColPos++, dP, stat); }
  void getNextColumn(double* dP)
  { TTStatus ttst; getColumn(currentColPos++, dP, ttst); }
  bool getNextColumnNullable(double* dP)
  { TTStatus ttst; return getColumnNullable(currentColPos++, dP, ttst); }

  void getNextColumn(char** cPP, TTStatus& stat)
  { getColumn(currentColPos++, cPP, stat); }
  bool getNextColumnNullable(char** cPP, TTStatus& stat)
  { return getColumnNullable(currentColPos++, cPP, stat); }
  void getNextColumn(char** cPP)
  { TTStatus ttst; getColumn(currentColPos++, cPP, ttst); }
  bool getNextColumnNullable(char** cPP)
  { TTStatus ttst; return getColumnNullable(currentColPos++, cPP, ttst); }

  void getNextColumn(char* cP, TTStatus& stat)
  { getColumn(currentColPos++, cP, stat); }
  bool getNextColumnNullable(char* cP, TTStatus& stat)
  { return getColumnNullable(currentColPos++, cP, stat); }
  void getNextColumn(char* cP)
  { TTStatus ttst; getColumn(currentColPos++, cP, ttst); }
  bool getNextColumnNullable(char* cP)
  { TTStatus ttst; return getColumnNullable(currentColPos++, cP, ttst); }

  void getNextColumn(void** binPP, int* byteLenP /* OUT */, TTStatus& stat)
  { getColumn(currentColPos++, binPP, byteLenP, stat); }
  bool getNextColumnNullable(void** binPP, int* byteLenP /* OUT */, TTStatus& stat)
  { return getColumnNullable(currentColPos++, binPP, byteLenP, stat); }
  void getNextColumn(void** binPP, int* byteLenP /* OUT */)
  { TTStatus ttst; getColumn(currentColPos++, binPP, byteLenP, ttst); }
  bool getNextColumnNullable(void** binPP, int* byteLenP /* OUT */)
  { TTStatus ttst; return getColumnNullable(currentColPos++, binPP, byteLenP, ttst); }
  
  void getNextColumn(void* binP, int* byteLenP /* OUT */, TTStatus& stat)
  { getColumn(currentColPos++, binP, byteLenP, stat); }
  bool getNextColumnNullable(void* binP, int* byteLenP /* OUT */, TTStatus& stat)
  { return getColumnNullable(currentColPos++, binP, byteLenP, stat); }
  void getNextColumn(void* binP, int* byteLenP /* OUT */)
  { TTStatus ttst; getColumn(currentColPos++, binP, byteLenP, ttst); }
  bool getNextColumnNullable(void* binP, int* byteLenP /* OUT */)
  { TTStatus ttst; return getColumnNullable(currentColPos++, binP, byteLenP, ttst); }

  void getNextColumn(TIMESTAMP_STRUCT* tsP, TTStatus& stat)
  { getColumn(currentColPos++, tsP, stat); }
  bool getNextColumnNullable(TIMESTAMP_STRUCT* tsP, TTStatus& stat)
  { return getColumnNullable(currentColPos++, tsP, stat); }
  void getNextColumn(TIMESTAMP_STRUCT* tsP)
  { TTStatus ttst; getColumn(currentColPos++, tsP, ttst); }
  bool getNextColumnNullable(TIMESTAMP_STRUCT* tsP)
  { TTStatus ttst; return getColumnNullable(currentColPos++, tsP, ttst); }

  void getNextColumn(DATE_STRUCT* dP, TTStatus& stat)
  { getColumn(currentColPos++, dP, stat); }
  bool getNextColumnNullable(DATE_STRUCT* dP, TTStatus& stat)
  { return getColumnNullable(currentColPos++, dP, stat); }
  void getNextColumn(DATE_STRUCT* dP)
  { TTStatus ttst; getColumn(currentColPos++, dP, ttst); }
  bool getNextColumnNullable(DATE_STRUCT* dP)
  { TTStatus ttst; return getColumnNullable(currentColPos++, dP, ttst); }

  void getNextColumn(TIME_STRUCT* tP, TTStatus& stat)
  { getColumn(currentColPos++, tP, stat); }
  bool getNextColumnNullable(TIME_STRUCT* tP, TTStatus& stat)
  { return getColumnNullable(currentColPos++, tP, stat); }
  void getNextColumn(TIME_STRUCT* tP)
  { TTStatus ttst; getColumn(currentColPos++, tP, ttst); }
  bool getNextColumnNullable(TIME_STRUCT* tP)
  { TTStatus ttst; return getColumnNullable(currentColPos++, tP, ttst); }

// BEGIN: won't work with ODBC Driver Managers
void getNextColumn(SQLWCHAR** wcPP, TTStatus& stat)
{ getColumn(currentColPos++, wcPP, stat); }
bool getNextColumnNullable(SQLWCHAR** wcPP, TTStatus& stat)
{ return getColumnNullable(currentColPos++, wcPP, stat); }
void getNextColumn(SQLWCHAR** wcPP)
{ TTStatus ttst; getColumn(currentColPos++, wcPP, ttst); }
bool getNextColumnNullable(SQLWCHAR** wcPP)
{ TTStatus ttst; return getColumnNullable(currentColPos++, wcPP, ttst); }
// END: won't work with ODBC Driver Managers

// BEGIN: won't work with ODBC Driver Managers
void getNextColumn(SQLWCHAR** wcPP, int* byteLenP /* OUT: # bytes */, TTStatus& stat)
{ getColumn(currentColPos++, wcPP, byteLenP, stat); }
bool getNextColumnNullable(SQLWCHAR** wcPP, int* byteLenP /* OUT: # bytes */, TTStatus& stat)
{ return getColumnNullable(currentColPos++, wcPP, byteLenP, stat); }
void getNextColumn(SQLWCHAR** wcPP, int* byteLenP /* OUT: # bytes */)
{ TTStatus ttst; getColumn(currentColPos++, wcPP, byteLenP, ttst); }
bool getNextColumnNullable(SQLWCHAR** wcPP, int* byteLenP /* OUT: # bytes */)
{ TTStatus ttst; return getColumnNullable(currentColPos++, wcPP, byteLenP, ttst); }
// END: won't work with ODBC Driver Managers

  // registerParam methods
 public:
  void registerParam(int pno, 	// 1-based parameter number
                     TTCMD_PARAM_INPUTOUTPUT_TYPE inputOutputType, 
                     int sqltype,                      
                     int precision, 
                     int scale,
                     TTStatus&);
#ifdef TTEXCEPT // deprecated
  inline void registerParam(int pno,
                            TTCMD_PARAM_INPUTOUTPUT_TYPE inputOutputType, 
                            int sqltype, 
                            int precision = 0, 
                            int scale = 0)
  {
    TTStatus stat;

    registerParam(pno, 
                  inputOutputType, 
                  sqltype,                   
                  precision, 
                  scale,
                  stat);
  }
#endif


  // setParam methods
 private:
  // internal sanity-checking method
  void validateParam(TTStatus& stat, int pno,
                     const char* method=NULL) const; // throws TTStatus
 public:
  void setParamNull(int pno, TTStatus&);
  void setParamNull(int pno);

  // This 2nd setParamNull() is for batch operations
  void setParamNull(int pno, u_short rowno, TTStatus&);
  void setParamNull(int pno, u_short rowno);

// BEGIN: won't work with ODBC Driver Managers
  void setParam(int pno, SQLTINYINT value, TTStatus&);
  void setParam(int pno, SQLTINYINT value);
// END: won't work with ODBC Driver Managers

  void setParam(int pno, SQLSMALLINT value, TTStatus&);
  void setParam(int pno, SQLSMALLINT value);

  void setParam(int pno, SQLINTEGER value, TTStatus&);
  void setParam(int pno, SQLINTEGER value);

#if defined(_WIN32)
  inline void setParam(int pno, int value, TTStatus& stat)
  { setParam (pno, (SQLINTEGER)value, stat); }
  inline void setParam(int pno, int value)
  { setParam (pno, (SQLINTEGER)value); }
#else
#ifndef TT_64BIT
  inline void setParam(int pno, long value, TTStatus& st)
  { setParam (pno, (SQLINTEGER)value, st); }
  inline void setParam(int pno, long value)
  { setParam (pno, (SQLINTEGER)value); }
#endif /* !TT_64BIT */
#endif /* _WIN32 */

// BEGIN: won't work with ODBC Driver Managers
  void setParam(int pno, SQLBIGINT value, TTStatus&);
  void setParam(int pno, SQLBIGINT value);
// END: won't work with ODBC Driver Managers

  void setParam(int pno, float value, TTStatus &);
  void setParam(int pno, float value);

  void setParam(int pno, double value, TTStatus&);
  void setParam(int pno, double value);

  void setParam(int pno, char* valueP, TTStatus&);
  void setParam(int pno, char* valueP);

  void setParam(int pno, SQLCHAR* valueP, TTStatus&);
  void setParam(int pno, SQLCHAR* valueP);

  void setParam(int pno, const char* valueP, TTStatus&);
  void setParam(int pno, const char* valueP);

// BEGIN: won't work with ODBC Driver Managers
  void setParam(int pno, SQLWCHAR* valueP, int byteLen, TTStatus&); /* length in bytes */
  void setParam(int pno, SQLWCHAR* valueP, int byteLen);  /* length in bytes */
// END: won't work with ODBC Driver Managers

  void setParam(int pno, const void* valueP, int byteLen, TTStatus&); /* length in bytes */
  void setParam(int pno, const void* valueP, int byteLen);  /* length in bytes */

  void setParam(int pno, TIMESTAMP_STRUCT& valueP, TTStatus&);
  void setParam(int pno, TIMESTAMP_STRUCT& valueP);

  void setParam(int pno, DATE_STRUCT& valueP, TTStatus&);
  void setParam(int pno, DATE_STRUCT& valueP);

  void setParam(int pno, TIME_STRUCT& valueP, TTStatus&);
  void setParam(int pno, TIME_STRUCT& valueP);

  void setParamLength(int pno, int byteLen, TTStatus&);  /* length in bytes */
  void setParamLength(int pno, int byteLen); /* length in bytes */

  // This 2nd setParamLength() is for batch operations
  void setParamLength(int pno, u_short rowno, int byteLen, TTStatus&); /* length in bytes */
  void setParamLength(int pno, u_short rowno, int byteLen); /* length in bytes */

  // getParam methods
// BEGIN: won't work with ODBC Driver Managers
  bool getParam(int pno, SQLTINYINT* iP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  bool getParam(int pno, SQLTINYINT* iP);
#endif /* TTEXCEPT */
// END: won't work with ODBC Driver Managers

  bool getParam(int pno, SQLSMALLINT* iP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  bool getParam(int pno, SQLSMALLINT* iP);
#endif /* TTEXCEPT */

  bool getParam(int pno, SQLINTEGER* iP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  bool getParam(int pno, SQLINTEGER* iP);
#endif /* TTEXCEPT */

#if defined(_WIN32)
  inline bool getParam(int pno, int* iP, TTStatus& stat)
  { return getParam(pno, (SQLINTEGER*)iP, stat); }  
#ifdef TTEXCEPT // deprecated
  inline bool getParam(int pno, int* iP)
  { return getParam(pno, (SQLINTEGER*)iP); }  
#endif /* TTEXCEPT */
#else
#ifndef TT_64BIT
  inline bool getParam(int pno, long* iP, TTStatus& stat)
  { return getParam(pno, (SQLINTEGER*)iP, stat); } 
#ifdef TTEXCEPT // deprecated
  inline bool getParam(int pno, long* iP)
  { return getParam(pno, (SQLINTEGER*)iP); } 
#endif /* TTEXCEPT */
#endif /* !TT_64BIT */
#endif /* _WIN32 */

// BEGIN: won't work with ODBC Driver Managers
  bool getParam(int pno, SQLBIGINT* iP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  bool getParam(int pno, SQLBIGINT* iP);
#endif /* TTEXCEPT */
// END: won't work with ODBC Driver Managers

  bool getParam(int pno, float* fP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  bool getParam(int pno, float* fP);
#endif /* TTEXCEPT */

  bool getParam(int pno, double* dP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  bool getParam(int pno, double* dP);
#endif /* TTEXCEPT */

  bool getParam(int pno, char** cPP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  bool getParam(int pno, char** cPP);
#endif /* TTEXCEPT */

  // allow using pre-allocated storage (passing in an array)
  bool getParam(int pno, char* cP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  bool getParam(int pno, char* cP);
#endif /* TTEXCEPT */

// BEGIN: won't work with ODBC Driver Managers
  bool getParam(int pno, SQLWCHAR** wcPP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  bool getParam(int pno, SQLWCHAR** wcPP);
#endif /* TTEXCEPT */

  bool getParam(int pno, SQLWCHAR** wcPP, int* byteLenP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  bool getParam(int pno, SQLWCHAR** wcPP, int* byteLenP);
#endif /* TTEXCEPT */
// END: won't work with ODBC Driver Managers

  bool getParam(int pno, void** binPP, int* byteLenP /* OUT */, TTStatus&);
#ifdef TTEXCEPT // deprecated
  bool getParam(int pno, void** binPP, int* byteLenP /* OUT */);
#endif /* TTEXCEPT */

  // allow using pre-allocated storage (passing in an array)
  bool getParam(int pno, void* binP, int* byteLenP /* OUT */, TTStatus&) ;
#ifdef TTEXCEPT // deprecated
  bool getParam(int pno, void* binP, int* byteLenP /* OUT */) ;
#endif /* TTEXCEPT */

  bool getParam(int pno, TIMESTAMP_STRUCT* tsP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  bool getParam(int pno, TIMESTAMP_STRUCT* tsP);
#endif /* TTEXCEPT */

  bool getParam(int pno, DATE_STRUCT* dP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  bool getParam(int pno, DATE_STRUCT* dP);
#endif /* TTEXCEPT */

  bool getParam(int pno, TIME_STRUCT* tP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  bool getParam(int pno, TIME_STRUCT* tP);
#endif /* TTEXCEPT */

  bool getParam(int pno, TTCmd** rcCmd, TTStatus&);
#ifdef TTEXCEPT // deprecated
  bool getParam(int pno, TTCmd** rcCmd);
#endif /* TTEXCEPT */


  // ------------------------------------------------------------
  // user-binding parameter methods for batch operations
  // ------------------------------------------------------------
 private:
  // internal sanity-checking method
  void validateBatchParams(TTStatus& stat, int pno, u_short batSz,
                           u_short rowno=0,
                           const char* method=NULL) const; // throws TTStatus
  // We need to reset the param length arrays in between calls to
  // SQLExecute for batch operations.
  void resetBatchParamLengths();
 public:
  void BindParameter(int pno, u_short batSz, char** user_cPP, size_t maxByteLen, TTStatus&);
#ifdef TTEXCEPT // deprecated
  inline void BindParameter(int pno, u_short batSz, char** user_cPP, size_t maxByteLen)
  { TTStatus ttst; BindParameter(pno, batSz, user_cPP, maxByteLen, ttst); }
#endif

  void BindParameter(int pno, u_short batSz, const void** user_binPP,
                     SQLLEN * userByteLenP, size_t maxByteLen, TTStatus&);
#ifdef TTEXCEPT // deprecated
  inline void BindParameter(int pno, u_short batSz, const void** user_binPP,
                            SQLLEN * userByteLenP, size_t maxByteLen)
  { TTStatus ttst; BindParameter(pno, batSz, user_binPP, userByteLenP, maxByteLen, ttst); }
#endif

  void BindParameter(int pno, u_short batSz, double* user_dP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  inline void BindParameter(int pno, u_short batSz, double* user_dP)
  { TTStatus ttst; BindParameter(pno, batSz, user_dP, ttst); }
#endif

  void BindParameter(int pno, u_short batSz, DATE_STRUCT* user_dsP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  inline void BindParameter(int pno, u_short batSz, DATE_STRUCT* user_dsP)
  { TTStatus ttst; BindParameter(pno, batSz, user_dsP, ttst); }
#endif

  void BindParameter(int pno, u_short batSz, float* user_fP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  inline void BindParameter(int pno, u_short batSz, float* user_fP)
  { TTStatus ttst; BindParameter(pno, batSz, user_fP, ttst); }
#endif

#ifdef _WIN32
  void BindParameter(int pno, u_short batSz, int* user_iP, TTStatus& stat)
  { BindParameter (pno, batSz, (SQLINTEGER*)user_iP, stat); }
#ifdef TTEXCEPT // deprecated
  inline void BindParameter(int pno, u_short batSz, int* user_iP)
  { TTStatus ttst; BindParameter (pno, batSz, (SQLINTEGER*)user_iP, ttst); }
#endif
#endif /* _WIN32 */

// BEGIN: won't work with ODBC Driver Managers
  void BindParameter(int pno, u_short batSz, SQLBIGINT* user_biP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  inline void BindParameter(int pno, u_short batSz, SQLBIGINT* user_biP)
  { TTStatus ttst; BindParameter(pno, batSz, user_biP, ttst); }
#endif
// END: won't work with ODBC Driver Managers

  void BindParameter(int pno, u_short batSz, SQLINTEGER* user_iP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  inline void BindParameter(int pno, u_short batSz, SQLINTEGER* user_iP)
  { TTStatus ttst; BindParameter(pno, batSz, user_iP, ttst); }
#endif

  void BindParameter(int pno, u_short batSz, SQLSMALLINT* user_siP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  inline void BindParameter(int pno, u_short batSz, SQLSMALLINT* user_siP)
  { TTStatus ttst; BindParameter(pno, batSz, user_siP, ttst); }
#endif

// BEGIN: won't work with ODBC Driver Managers
  void BindParameter(int pno, u_short batSz, SQLTINYINT* user_tiP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  inline void BindParameter(int pno, u_short batSz, SQLTINYINT* user_tiP)
  { TTStatus ttst; BindParameter(pno, batSz, user_tiP, ttst); }
#endif
// END: won't work with ODBC Driver Managers

// BEGIN: won't work with ODBC Driver Managers
  void BindParameter(int pno, u_short batSz, SQLWCHAR** user_wcPP,
                     SQLLEN* userByteLenP, size_t maxByteLen, TTStatus&);
#ifdef TTEXCEPT // deprecated
  inline void BindParameter(int pno, u_short batSz, SQLWCHAR** user_wcPP,
                     SQLLEN* userByteLenP, size_t maxByteLen)
  { TTStatus ttst; BindParameter(pno, batSz, user_wcPP, userByteLenP, maxByteLen, ttst); }
#endif
// END: won't work with ODBC Driver Managers

  void BindParameter(int pno, u_short batSz, TIME_STRUCT* user_tsP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  inline void BindParameter(int pno, u_short batSz, TIME_STRUCT* user_tsP)
  { TTStatus ttst; BindParameter(pno, batSz, user_tsP, ttst); }
#endif

  void BindParameter(int pno, u_short batSz, TIMESTAMP_STRUCT* user_tssP, TTStatus&);
#ifdef TTEXCEPT // deprecated
  inline void BindParameter(int pno, u_short batSz, TIMESTAMP_STRUCT* user_tssP)
  { TTStatus ttst; BindParameter(pno, batSz, user_tssP, ttst); }
#endif

//#ifndef TT_64BIT
//  void BindParameter (int pno, u_short batSz, long * user_lP, TTStatus&);
//#endif /* TT_64BIT */
  //
  // don't worry about these for now
  // void BindParameter (int pno, u_short batSz, SQLCHAR ** user_cPP, TTStatus&);
  // void BindParameter (int pno, u_short batSz, const char ** user_cPP, TTStatus&);
  //
  // ---------------------------------------------------------------------

 public:
  // os << column(i)
  void printColumn (int cno, STDOSTREAM& os, const char* nullString, TTStatus& stat) const;
  inline void
  printColumn (int cno, STDOSTREAM& os, const char* nullString) const
  { TTStatus ttst; printColumn(cno, os, nullString, ttst); }

};

inline void
TTCmd::setParamNull(int pno)
{ TTStatus ttst; setParamNull(pno, ttst); }

inline void
TTCmd::setParamLength(int pno, int byteLen)
{ TTStatus ttst; setParamLength(pno, byteLen, ttst); }

inline void
TTCmd::setParamNull(int pno, u_short rowno)
{ TTStatus ttst; setParamNull(pno, rowno, ttst); }

inline void
TTCmd::setParamLength(int pno, u_short rowno, int byteLen)
{ TTStatus ttst; setParamLength(pno, rowno, byteLen, ttst); }

//
// inline'd TTCmd::setParam methods
//
// BEGIN: won't work with ODBC Driver Managers
inline void
TTCmd::setParam(int pno, SQLTINYINT value)
{ TTStatus ttst; setParam(pno, value, ttst); }
// END: won't work with ODBC Driver Managers

inline void
TTCmd::setParam(int pno, SQLSMALLINT value)
{ TTStatus ttst; setParam(pno, value, ttst); }

inline void
TTCmd::setParam(int pno, SQLINTEGER value)
{ TTStatus ttst; setParam(pno, value, ttst); }

// BEGIN: won't work with ODBC Driver Managers
inline void
TTCmd::setParam(int pno, SQLBIGINT value)
{ TTStatus ttst; setParam(pno, value, ttst); }
// END: won't work with ODBC Driver Managers

inline void
TTCmd::setParam(int pno, float value)
{ TTStatus ttst; setParam(pno, value, ttst); }

inline void
TTCmd::setParam(int pno, double value)
{ TTStatus ttst; setParam(pno, value, ttst); }

inline void
TTCmd::setParam(int pno, char* valueP)
{ TTStatus ttst; setParam(pno, valueP, ttst); }

inline void
TTCmd::setParam(int pno, SQLCHAR* valueP)
{ TTStatus ttst; setParam(pno, valueP, ttst); }

inline void
TTCmd::setParam(int pno, const char* valueP)
{ TTStatus ttst; setParam(pno, valueP, ttst); }

// BEGIN: won't work with ODBC Driver Managers
inline void
TTCmd::setParam(int pno, SQLWCHAR* valueP, int byteLen)
{ TTStatus ttst; setParam(pno, valueP, byteLen, ttst); }
// END: won't work with ODBC Driver Managers

inline void
TTCmd::setParam(int pno, const void* valueP, int byteLen)
{ TTStatus ttst; setParam(pno, valueP, byteLen, ttst); }

inline void
TTCmd::setParam(int pno, TIMESTAMP_STRUCT& valueP)
{ TTStatus ttst; setParam(pno, valueP, ttst); }

inline void
TTCmd::setParam(int pno, DATE_STRUCT& valueP)
{ TTStatus ttst; setParam(pno, valueP, ttst); }

inline void
TTCmd::setParam(int pno, TIME_STRUCT& valueP)
{ TTStatus ttst; setParam(pno, valueP, ttst); }

//
// inline'd TTCmd::getColumn methods
//
inline void
TTCmd::getColumn(int cno, char** cPP)
{ TTStatus ttst; getColumn(cno, cPP, ttst); }

// allow passing in an array (pre-allocated storage)
inline void
TTCmd::getColumn(int cno, char* cP)
{ TTStatus ttst; getColumn(cno, cP, ttst); }

inline void
TTCmd::getColumn(int cno, double* dP)
{ TTStatus ttst; getColumn(cno, dP, ttst); }

inline void
TTCmd::getColumn(int cno, DATE_STRUCT* dP)
{ TTStatus ttst; getColumn(cno, dP, ttst); }

inline void
TTCmd::getColumn(int cno, float* fP)
{ TTStatus ttst; getColumn(cno, fP, ttst); }

// BEGIN: won't work with ODBC Driver Managers
inline void
TTCmd::getColumn(int cno, SQLBIGINT* iP)
{ TTStatus ttst; getColumn(cno, iP, ttst); }
// END: won't work with ODBC Driver Managers

inline void
TTCmd::getColumn(int cno, SQLINTEGER* iP)
{ TTStatus ttst; getColumn(cno, iP, ttst); }

inline void
TTCmd::getColumn(int cno, SQLSMALLINT* iP)
{ TTStatus ttst; getColumn(cno, iP, ttst); }

// BEGIN: won't work with ODBC Driver Managers
inline void
TTCmd::getColumn(int cno, SQLTINYINT* iP)
{ TTStatus ttst; getColumn(cno, iP, ttst); }
// END: won't work with ODBC Driver Managers

// BEGIN: won't work with ODBC Driver Managers
inline void
TTCmd::getColumn(int cno, SQLWCHAR** wcPP)
{ TTStatus ttst; getColumn(cno, wcPP, ttst); }
// END: won't work with ODBC Driver Managers

// BEGIN: won't work with ODBC Driver Managers
inline void
TTCmd::getColumn(int cno, SQLWCHAR** wcPP, int* byteLenP /* OUT: # bytes */)
{ TTStatus ttst; getColumn(cno, wcPP, byteLenP, ttst); }
// END: won't work with ODBC Driver Managers

inline void
TTCmd::getColumn(int cno, TIME_STRUCT* tP)
{ TTStatus ttst; getColumn(cno, tP, ttst); }

inline void
TTCmd::getColumn(int cno, TIMESTAMP_STRUCT* tsP)
{ TTStatus ttst; getColumn(cno, tsP, ttst); }

inline void
TTCmd::getColumn(int cno, void** binPP, int* byteLenP /* OUT: # bytes */)
{ TTStatus ttst; getColumn(cno, binPP, byteLenP, ttst); }

// allow passing in an array (pre-allocated storage)
inline void
TTCmd::getColumn(int cno, void* binP, int* byteLenP /* OUT: # bytes */)
{ TTStatus ttst; getColumn(cno, binP, byteLenP, ttst); }

//
// end of inline'd TTCmd::getColumn methods
//


//
// start of TTCmd param metadata queries
//
inline int
TTCmd::getParamNullability(int pno)
{ TTStatus ttst; return getParamNullability(pno, ttst); }

inline int
TTCmd::getParamPrecision(int pno)
{ TTStatus ttst; return getParamPrecision(pno, ttst); }

inline int
TTCmd::getParamScale(int pno)
{ TTStatus ttst; return getParamScale(pno, ttst); }

inline int
TTCmd::getParamType(int pno)
{ TTStatus ttst; return getParamType(pno, ttst); }
//
// end of TTCmd param metadata queries
//


//
// start of TTCmd column metadata queries
//
inline const char *
TTCmd::getColumnName(int cno)
{ TTStatus ttst; return getColumnName(cno, ttst); }

inline int
TTCmd::getColumnType(int cno)
{ TTStatus ttst; return getColumnType(cno, ttst); }

inline int
TTCmd::getColumnPrecision(int cno)
{ TTStatus ttst; return getColumnPrecision(cno, ttst); }

inline int
TTCmd::getColumnScale(int cno)
{ TTStatus ttst; return getColumnScale(cno, ttst); }

inline int
TTCmd::getColumnNullability(int cno)
{ TTStatus ttst; return getColumnNullability(cno, ttst); }
//
// end of TTCmd column metadata queries
//
inline bool
TTCmd::isColumnNull(int cno)
{ TTStatus ttst; return isColumnNull(cno, ttst); }

inline int
TTCmd::getColumnLength(int cno) // returns # of bytes
{ TTStatus ttst; return getColumnLength(cno, ttst); }

//
// inline'd TTCmd::getParam methods
//

// BEGIN: won't work with ODBC Driver Managers
#ifdef TTEXCEPT // deprecated
inline bool
TTCmd::getParam(int pno, SQLTINYINT* iP)
{ TTStatus ttst; return getParam(pno, iP, ttst); }
#endif /* TTEXCEPT */
// END: won't work with ODBC Driver Managers

#ifdef TTEXCEPT // deprecated
inline bool
TTCmd::getParam(int pno, SQLSMALLINT* iP)
{ TTStatus ttst; return getParam(pno, iP, ttst); }
#endif

#ifdef TTEXCEPT // deprecated
inline bool
TTCmd::getParam(int pno, SQLINTEGER* iP)
{ TTStatus ttst; return getParam(pno, iP, ttst); }
#endif

// BEGIN: won't work with ODBC Driver Managers
#ifdef TTEXCEPT // deprecated
inline bool
TTCmd::getParam(int pno, SQLBIGINT* iP)
{ TTStatus ttst; return getParam(pno, iP, ttst); }
#endif /* TTEXCEPT */
// END: won't work with ODBC Driver Managers

#ifdef TTEXCEPT // deprecated
inline bool
TTCmd::getParam(int pno, float* fP)
{ TTStatus ttst; return getParam(pno, fP, ttst); }
#endif

#ifdef TTEXCEPT // deprecated
inline bool
TTCmd::getParam(int pno, double* dP)
{ TTStatus ttst; return getParam(pno, dP, ttst); }
#endif

#ifdef TTEXCEPT // deprecated
inline bool
TTCmd::getParam(int pno, char** cPP)
{ TTStatus ttst; return getParam(pno, cPP, ttst); }
#endif

// allow passing in an array (pre-allocated storage)
#ifdef TTEXCEPT // deprecated
inline bool
TTCmd::getParam(int pno, char* cP)
{ TTStatus ttst; return getParam(pno, cP, ttst); }
#endif

// BEGIN: won't work with ODBC Driver Managers
#ifdef TTEXCEPT // deprecated
inline bool
TTCmd::getParam(int pno, SQLWCHAR** wcPP)
{ TTStatus ttst; return getParam(pno, wcPP, ttst); }
#endif /* TTEXCEPT */
// END: won't work with ODBC Driver Managers

// BEGIN: won't work with ODBC Driver Managers
#ifdef TTEXCEPT // deprecated
inline bool
TTCmd::getParam(int pno, SQLWCHAR** wcPP, int* byteLenP /* OUT: # bytes */)
{ TTStatus ttst; return getParam(pno, wcPP, byteLenP, ttst); }
#endif /* TTEXCEPT */
// END: won't work with ODBC Driver Managers

#ifdef TTEXCEPT // deprecated
inline bool
TTCmd::getParam(int pno, void** binPP, int* byteLenP /* OUT: # bytes */)
{ TTStatus ttst; return getParam(pno, binPP, byteLenP, ttst); }
#endif

// allow passing in an array (pre-allocated storage)
#ifdef TTEXCEPT // deprecated
inline bool
TTCmd::getParam(int pno, void* binP, int* byteLenP /* OUT: # bytes */)
{ TTStatus ttst; return getParam(pno, binP, byteLenP, ttst); }
#endif

#ifdef TTEXCEPT // deprecated
inline bool
TTCmd::getParam(int pno, TIMESTAMP_STRUCT* tsP)
{ TTStatus ttst; return getParam(pno, tsP, ttst); }
#endif

#ifdef TTEXCEPT // deprecated
inline bool
TTCmd::getParam(int pno, DATE_STRUCT* dP)
{ TTStatus ttst; return getParam(pno, dP, ttst); }
#endif

#ifdef TTEXCEPT // deprecated
inline bool
TTCmd::getParam(int pno, TIME_STRUCT* tP)
{ TTStatus ttst; return getParam(pno, tP, ttst); }
#endif

#ifdef TTEXCEPT // deprecated
inline bool
TTCmd::getParam(int pno, TTCmd** rcCmd)
{ TTStatus ttst; return getParam(pno, rcCmd, ttst); }
#endif
//
// end of inline'd TTCmd::getParam methods
//

#endif /* !__TT_CMD_H_ */

Open in new window

0
sarabandeCommented:
gratulations. you solved your compile errors by defining the TTEXCEPT macro. you also can put the macro definition into the preprocessor settings of your project.

the linker errors are easier to solve. you only need to add the lib folder of your tt installation to the library paths defined below Tools - Options - Projects And Solutions - VC++ Directories - Library Files.

then create a new folder in your project tree and insert all the .lib files of the timesten lib folder into that folder. the linker then would find the unresollved symbols in those files.

Sara
0
star90Author Commented:
I am using VC2010
The option for Tools - Options - Projects And Solutions - VC++ Directories - Library Files.
has  deprecated.

I added the lib directory to
VC++ directories-> library directory

Linker->general->additional library directory
Link library dependency ->yes
use library dependency input ->yes

linker->Input->additional dependencies -> I added the libraries names

For some of them (e.g. ttclasses1121.lib) I got the error:
fatal error LNK1112 module machine type ´X64´ conflicts with target machine ´X86´

0
star90Author Commented:
I verified hat the timesten that I downloaded is Win64
0
sarabandeCommented:
did you look thru the html helps that came with the package? on a first glance i saw they expect you to build the samples by nmake and makefiles.

if the timesten is w64 and your w7 also is w64 you would need a 64-bit vs2010 and build w64 project. but the demo sample probably is not suitable for that scenario (an i myself run vs2008 32-bit on w7-64bit). generally, building 64-bit programs makes only sense if you want to make special software for the w64 platform.

i would recommend you downloading timesten 32-bit and build 32-bit application.

Sara
0
star90Author Commented:
Thanks for the answer.

1) How do I know which libraries to add to the linker->Input->additional dependencies ?
Do I need to add all the libraries in the lib Dir?

2) If I use the 32 bit version do I still need to use the nmake? (or is it the make command?)

3) I see the compile and Run instructions below
Please explain
When I write nmake in the Windows command line its writting
´nmake is not recognized as an internal or external command ´

4) also in the VC2010 in the command line I wrote nmake basics.exe and VC wrote
"command nmake is not valid"

5) What is supposed to be the output of the nmake command? new .lib files?

6) Assuming I want to use more than 4GB  of RAM with my program and timesten
do I need to compile to the WIN64?
Thanks!
-----------------------------------------------------------------------------------

How to compile the sample TTClasses (C++) programs

To compile the sample programs in the sample_code/ttclasses directory, you simply run the makefile supplied in the same directory. Note that the appropriate makefile is made available based on the platform of your TimesTen installation.

To build a specific sample program in the sample_code/ttclasses directory, use the following command:
      [Windows]       > nmake <program-name>.exe**
      [Linux/Unix]       $ make <program-name>
      where <program-name> is the program you want to compile.

For example, to compile the typetest.cpp program, you do:
      [Windows]       > nmake typetest.exe**
      [Linux/Unix]       $ make typetest

Due to C++ name mangling, C++ programs that use C++ libraries need to use compatible C++ compilers (and even C++ compiler versions). To address this C++ compatibility issue, the TimesTen C++ TTClasses library is shipped as source code which enables users to re-compile the TTClasses library with their desired C++ compiler.
The TTClasses library and Quick Start executables are built with Visual Studio 2003 and are shipped by default.

** On Windows, the "nmake" command must be run on a Visual Studio Command Prompt. If you do not use the Visual Studio Command Prompt, you must run the appropriate vcvars*.bat script to set the appropriate environment variables to support command line builds.

 
0
sarabandeCommented:
1) if you download the 32-bit version of timesten the libraries should be 32-bit only (though i am not sure cause i got the same libraries (names) than you). if you find a makefile somewhere (name Makefile or extension *.mak) you could look in and check the the linker options. here the needed libraries should be seen. if nothing helps i would try first ttclasses1121.lib and nothing else. if it is 64-bit exchange it by any of the other libs until you get rid of this error. if you have more unresolved symbols try the other libraries (perhaps ttutil1121.lib).

2) the nmake is only senseful if you want to follow their quickstart tutorial or use an existing makefile. by the way vs2010 should be able to handle a makefile as project template. so if you find one you could try to open it with vs2010.

3) nmake currently is not in your path. open a cmd window and navigate to root of your windows drive. for example

   c:
   cd \

then type

     dir /s nmake.exe

it probably is below your VS2010 installation folder in vc\bin.

then add the path to environment variable Path, for example

  set path=%path%;"c:\program files\vs2010\vc\bin"

4) as far as i have seen they have a batch file which sets the environment correctly. open the html files that came with the installation with a browser.

5) the output of nmake should be a .exe file for the sample

6) yes. if your program needs to allocate storage for more than 4gb ram, it needs to be 64-bit. that doesn't apply to timesten server if you install the 64-bit version.

Sara
0
star90Author Commented:
I want to compile the program with VC++ 2010 and to run it with the debug mode.
I understand that the nmake enables me to compile the .cpp code with the included libraries to create .exe file that I can run Independently.

1) However Can I make new .lib files for 64 bit from the source code in TimesTen/1121_64/ttclasses  ?

2) I attached the Makefile that i find in  TimesTen/1121_64/ttclasses
The first MakeFile points to the ODBC mgr dir that is in:
 TimesTen/1121_64/quickstart/samplecode/odbc_drivemgr

I Attached  the ODBCmgr  Makefile also
What can I learn from it?
Do I need to link to libraries related to ODBC?


 
MakeFile TTclasses
#
# 64-bit Windows PSDK Makefile for the TimesTen TTCLASSES class
# library.
#
# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 
#

ODBC    =       ..
TTDMDIR  = ..\quickstart\sample_code\odbc_drivermgr

MAKEFILE = 	WIN64
64BIT	=	/DTT_64BIT

TTVER   =       1121

### Uncomment the eight lines below (which all start VCPP_) if you get
### errors like "Could not open include file: 'windows.h': No such
### file or directory" or like "LINK: fatal error LNK1104: cannot open
### file "uuid.lib"
###
### NOTE: nmake does not tolerate leading spaces, so you must make
### sure that each line below starts "VCPP_...", without a space in the
### first column (i.e., *not* " VCPP_...").
###
### VCPP_INSTALL_DIR = "C:\Program Files\Microsoft Visual Studio\VC98"
### VCPP_INCLUDE1 = $(VCPP_INSTALL_DIR)\atl\include
### VCPP_INCLUDE2 = $(VCPP_INSTALL_DIR)\mfc\include
### VCPP_INCLUDE3 = $(VCPP_INSTALL_DIR)\include
### VCPP_INCLUDE_DIRS = /I$(VCPP_INCLUDE1) /I$(VCPP_INCLUDE2) /I$(VCPP_INCLUDE3)
### VCPP_LIB1     = $(VCPP_INSTALL_DIR)\mfc\lib
### VCPP_LIB2     = $(VCPP_INSTALL_DIR)\lib
### VCPP_LIB_DIRS = /LIBPATH:$(VCPP_LIB1) /LIBPATH:$(VCPP_LIB2)
###
### An alternative solution for setting the INCLUDE and LIB env vars
### correctly for VC++ is to run the VCVARS32.BAT file contained in
### the VC++ bin directory.

EXCEPTIONS = /DTTEXCEPT 
### NB: _WIN32 is defined by cl.exe automatically
WINDOWS     = /DTTCLASSES /DWIN64 /DVSNET /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE

THREAD_SAFE =   /D_MT
POSIX_THREADS = 

OPTFLAG =       

!IF DEFINED(DEBUG)
DEBUGFLAG =     /DTTDEBUG
LIBEXT    =     d
!ENDIF

CFLAGS	=	/nologo /MD /EHsc /Ox /Zi \
            $(DEBUGFLAG) $(WINDOWS) $(EXCEPTIONS)  $(64BIT) \
            /D$(TTVERSION) $(THREAD_SAFE) \
            /I$(TTC_INCLUDEDIR) /I$(ODBC)\include $(VCPP_INCLUDE_DIRS)

DLLFLAGS=	/nologo /link /BASE:0x7FF73600000 /DEBUG /dll 

# For VS 2003
!IF DEFINED(MSSDK)
DLLFLAGS = $(DLLFLAGS) bufferoverflowu.lib
!ENDIF

###
### DIRLIBS: libs to link for direct TTClasses library
### DMLIBS : libs to link for driver manager TTClasses library
### CSLIBS : libs to link for client/server TTClasses library
### TTDMLIBS : libs to link for TT driver manager TTClasses library
###

DIRLIBS	  = $(ODBC)\lib\ttdv$(TTVER)$(LIBEXT).lib $(ODBC)\lib\tten$(TTVER)$(LIBEXT).lib \
          $(VCPP_LIB_DIRS)
DMLIBS	= odbc32.lib $(VCPP_LIB_DIRS)
TTDMLIBS = $(ODBC)\lib\ttdrvmgr$(TTVER).lib $(VCPP_LIB_DIRS)
CSLIBS  = $(ODBC)\lib\ttclient$(TTVER).lib $(VCPP_LIB_DIRS)

CPLUSPLUS	=	cl

###
### list of object targets below
###

TTC_INCLUDEDIR	=	$(ODBC)/include/ttclasses

TTC_CPP_OBJS = \
TTCmd.obj \
TTCommand.obj \
TTConnection.obj \
TTColumn.obj \
TTConnectionPool.obj \
TTParameter.obj \
TTCatalog.obj \
TTStatus.obj \
TTTypes.obj \
TTEnvironment.obj \
TTXla.obj \
TTLog.obj \
TTGlobal.obj 

TTC_C_OBJS = \
ttTime.obj

TTC_NOXLA_OBJS = \
TTCmd.obj \
TTCommand.obj \
TTConnection.obj \
TTColumn.obj \
TTConnectionPool.obj \
TTParameter.obj \
TTCatalog.obj \
TTStatus.obj \
TTTypes.obj \
TTEnvironment.obj \
ttTime.obj \
TTLog.obj \
TTGlobal.obj 

#
#	Top-level targets
#

!IF DEFINED(DEBUG)
TTCLASSES_LIB	=	lib\ttclasses$(TTVER)D.lib
TTCLASSES_DLL	=	lib\ttclasses$(TTVER)D.dll
TTCLASSES_CS_LIB	=	lib\ttclasses$(TTVER)CSD.lib
TTCLASSES_CS_DLL	=	lib\ttclasses$(TTVER)CSD.dll
TTCLASSES_DM_LIB	=	lib\ttclasses$(TTVER)DMD.lib
TTCLASSES_DM_DLL	=	lib\ttclasses$(TTVER)DMD.dll
TTCLASSES_TTDM_LIB	=	lib\ttclasses$(TTVER)TTDMD.lib
TTCLASSES_TTDM_DLL	=	lib\ttclasses$(TTVER)TTDMD.dll
!ELSE
TTCLASSES_LIB	=	lib\ttclasses$(TTVER).lib
TTCLASSES_DLL	=	lib\ttclasses$(TTVER).dll
TTCLASSES_CS_LIB	=	lib\ttclasses$(TTVER)CS.lib
TTCLASSES_CS_DLL	=	lib\ttclasses$(TTVER)CS.dll
TTCLASSES_DM_LIB	=	lib\ttclasses$(TTVER)DM.lib
TTCLASSES_DM_DLL	=	lib\ttclasses$(TTVER)DM.dll
TTCLASSES_TTDM_LIB	=	lib\ttclasses$(TTVER)TTDM.lib
TTCLASSES_TTDM_DLL	=	lib\ttclasses$(TTVER)TTDM.dll
!ENDIF

# For TTDM Dependencies
TTDMLIB	    = $(ODBC)\lib\ttdrvmgr$(TTVER).lib
TTDMDLL	    = $(ODBC)\bin\ttdrvmgr$(TTVER).dll
TTDMDEPS    = $(TTDMLIB) $(TTDMDLL)

###
### by default, build direct, client/server and TT + MS Driver Manager TTClasses library
### and example programs
###

!IF EXIST($(TTDMDIR))
all:    	$(TTCLASSES_DLL) $(TTCLASSES_CS_DLL) $(TTCLASSES_DM_DLL) $(TTCLASSES_TTDM_DLL)
!ELSE
all:    	$(TTCLASSES_DLL) $(TTCLASSES_CS_DLL) $(TTCLASSES_DM_DLL)
!ENDIF

###
### best performance (recommended) use of TTClasses is the direct library
###

$(TTCLASSES_DLL) $(TTCLASSES_LIB): $(TTC_CPP_OBJS) $(TTC_C_OBJS)
	-mkdir lib
	$(CC) /Fe$(TTCLASSES_DLL) $(TTC_CPP_OBJS) $(TTC_C_OBJS) $(DLLFLAGS) $(DIRLIBS)
	-copy $(TTCLASSES_LIB) $(ODBC)\lib
	-copy $(TTCLASSES_DLL) $(ODBC)\bin

###
### you can also link with TimesTen's client driver
###

client:         $(TTCLASSES_CS_DLL)

$(TTCLASSES_CS_DLL) $(TTCLASSES_CS_LIB): $(TTC_NOXLA_OBJS) 
	-mkdir lib
	$(CC) /Fe$(TTCLASSES_CS_DLL) \
        $(TTC_NOXLA_OBJS) $(DLLFLAGS) $(CSLIBS)
	-copy $(TTCLASSES_CS_LIB) $(ODBC)\lib
	-copy $(TTCLASSES_CS_DLL) $(ODBC)\bin

###
### also possible to use the Windows Driver Manager
### (NB: slower than direct mode)
###

msdm:	$(TTCLASSES_DM_DLL)

$(TTCLASSES_DM_DLL) $(TTCLASSES_DM_LIB): $(TTC_NOXLA_OBJS)
	-mkdir lib
	$(CC) /Fe$(TTCLASSES_DM_DLL) $(TTC_NOXLA_OBJS)  \
        $(DLLFLAGS) $(DMLIBS)
	-copy $(TTCLASSES_DM_LIB) $(ODBC)\lib
	-copy $(TTCLASSES_DM_DLL) $(ODBC)\bin

###
### also possible to use the TimesTen Driver Manager
### (NB: Faster than Windows Driver Manager)
###


ttdm:	$(TTCLASSES_TTDM_DLL)

$(TTCLASSES_TTDM_DLL) $(TTCLASSES_TTDM_LIB): $(TTC_NOXLA_OBJS) $(TTDMDEPS)
	$(CC) /Fe$(TTCLASSES_TTDM_DLL) $(TTC_NOXLA_OBJS)  \
        $(DLLFLAGS) $(TTDMLIBS)
	-copy $(TTCLASSES_TTDM_LIB) $(ODBC)\lib
	-copy $(TTCLASSES_TTDM_DLL) $(ODBC)\bin

clean:          
		-erase *.obj
		-erase lib\*.pdb
		-erase lib\*.exp
		-erase lib\*.lib
		-erase lib\*.dll
		-erase lib\*.ilk
		-erase lib\*.dll.manifest
		-erase $(TTCLASSES_DLL)
		-erase $(TTCLASSES_LIB)
		-erase $(TTCLASSES_CS_DLL)
		-erase $(TTCLASSES_CS_LIB)
		-erase $(TTCLASSES_DM_DLL)
		-erase $(TTCLASSES_DM_LIB)
		-erase $(TTCLASSES_TTDM_DLL)
		-erase $(TTCLASSES_TTDM_LIB)

###
### .obj rules
###

$(TTC_C_OBJS):
	$(CC) $(CFLAGS) -c $*.c /Fo$@

$(TTC_CPP_OBJS):
	$(CPLUSPLUS) $(CFLAGS) -c $*.cpp /Fo$@

#
# Targets for building TimesTen Driver Manager shared library
#

$(TTDMLIB):
	cd $(TTDMDIR) && nmake

$(TTDMDLL):
	cd $(TTDMDIR) && nmake

Open in new window

#
# Build TimesTen Sample Programs (Windows)
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. 
#
# $Revision: /main/20 $
#

INSTDIR         = ..\..\..

QUICKCODEDIR    = $(INSTDIR)\quickstart\sample_code
COMMDIR         = $(QUICKCODEDIR)\common
TTVER           = 1121
TT_LIB_VERSION  = $(TTVER)

CC              = cl.exe /nologo



# WIN64 Driver Manager
PLATCFLAGS  = /Ox /DWINDOWS /DWIN64 /DWIN32 /DWINVER=0x500 /DTT_LIB_VERSION=$(TT_LIB_VERSION) /D_CRT_SECURE_NO_DEPRECATE
LDFLAGS     = /LD /MD /FIXED:NO 
LINKFLAGS   = /link


# For VS 2003
!IF DEFINED(MSSDK)
LDFLAGS = $(LDFLAGS) bufferoverflowu.lib
!ENDIF





INCS            = /I. /I.\include /I$(INSTDIR)\include /I$(COMMDIR) /I$(INSTDIR)\include\ttclasses
CFLAGS          = $(PLATCFLAGS) $(INCS)

TTLINK          = /LIBPATH:$(INSTDIR)\lib


DMDLL         = ttdrvmgr$(TT_LIB_VERSION).dll
DMLIB         = ttdrvmgr$(TT_LIB_VERSION).lib
DMOBJ	        = ttdrvmgr.obj
DMSRC	        = ttdrvmgr.c
DMHDR	        = ttdrvmgr.h ttdmbldopt.h

#
# Top level targets
#

all:		$(DMOBJ) $(DMDLL)

clean:
	del /Q *.dll *.lib *.obj *.exp $(INSTDIR)\bin\$(DMDLL) $(INSTDIR)\lib\$(DMLIB)

dist:
	copy /Y ttdrvmgr.h $(INSTDIR)\include
	copy /Y $(DMDLL) $(INSTDIR)\bin
	copy /Y $(DMLIB) $(INSTDIR)\lib

#
# Targets for building executables
#



$(DMDLL):	$(DMOBJ)
		$(CC) $(LDFLAGS) /Fe$(DMDLL) $(DMOBJ) $(LIBS) $(LINKFLAGS)
		copy /Y $(DMLIB) $(INSTDIR)\lib
		copy /Y $(DMDLL) $(INSTDIR)\bin
		copy /Y ttdrvmgr.h $(INSTDIR)\include

$(DMOBJ):	$(DMSRC) $(DMHDR)
		$(CC) $(INCS) /Fo$(DMOBJ) $(CFLAGS) $(DEBUGFLAG) -c $(DMSRC)

Open in new window

0
star90Author Commented:
I also attached the MakeFile taken from Samplecode/TTclasses
#
# Windows (2000/XP) Visual Studio Makefile for the
# TimesTen TTCLASSES demo programs.
#
# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 
#
#

ODBC    =  ..\..\..
COMMON  =  $(ODBC)\quickstart\sample_code\common
TTCLASSESDIR = $(ODBC)\ttclasses
TTVER   =  1121


### Uncomment the eight lines below (which all start VCPP_) if you get
### errors like "Could not open include file: 'windows.h': No such
### file or directory" or like "LINK: fatal error LNK1104: cannot open
### file "uuid.lib"
###
### NOTE: nmake does not tolerate leading spaces, so you must make
### sure that each line below starts "VCPP_...", without a space in the
### first column (i.e., *not* " VCPP_...").
###
######### FOR VS2003 #########
### VCPP_INSTALL_DIR = "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7"
######### FOR VS2005 #########
### VCPP_INSTALL_DIR = "C:\Program Files\Microsoft Visual Studio 8\VC"
######### FOR VS2008 #########
### VCPP_INSTALL_DIR = "C:\Program Files\Microsoft Visual Studio 9.0\VC"
##############################
### VCPP_INCLUDE1 = $(VCPP_INSTALL_DIR)\atlmfc\include
### VCPP_INCLUDE2 = $(VCPP_INSTALL_DIR)\include
### VCPP_INCLUDE_DIRS = /I$(VCPP_INCLUDE1) /I$(VCPP_INCLUDE2)
### VCPP_LIB1     = $(VCPP_INSTALL_DIR)\atlmfc\lib
### VCPP_LIB2     = $(VCPP_INSTALL_DIR)\lib
### VCPP_LIB_DIRS = /LIBPATH:$(VCPP_LIB1) /LIBPATH:$(VCPP_LIB2)
###
### An alternative solution for setting the INCLUDE and LIB env vars
### correctly for VC++ is to run the VCVARS32.BAT file contained in
### the VC++ bin directory.

EXCEPTIONS = /DTTEXCEPT
### NB: _WIN32 is defined by cl.exe automatically
WINDOWS     = /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE 

WINDOWS	= $(WINDOWS) /DTT_64BIT /DWIN64

THREAD_SAFE =   /D_MT
POSIX_THREADS = 

OPTFLAG =

!IF DEFINED(DEBUG)
DEBUGFLAG =     /DTTDEBUG
LIBEXT    =     d
!ENDIF

CSDEFS     = /DTTCLIENTSERVER

CFLAGS	=	  /nologo /MD /EHsc /Ox /Zi \
            $(DEBUGFLAG) $(WINDOWS) $(EXCEPTIONS) $(THREAD_SAFE) \
            /I$(TTC_INCLUDEDIR) /I$(ODBC)\include $(VCPP_INCLUDE_DIRS) \
            /I$(COMMON)

LDFLAGS	=	/nologo /link /STACK:3000000 /FIXED:NO /DEBUG $(VCPP_LIB_DIRS)

# For VS 2003
!IF DEFINED(MSSDK)
LDFLAGS = $(LDFLAGS) bufferoverflowu.lib
!ENDIF
###
### DIRLIBS: libs to link for direct TTClasses library
### DMLIBS : libs to link for driver manager TTClasses library
### CSLIBS : libs to link for client/server TTClasses library
### TTDMLIBS : libs to link for TT driver manager TTClasses library
###

DIRLIBS	= $(ODBC)\lib\ttdv$(TTVER)$(LIBEXT).lib $(ODBC)\lib\tten$(TTVER)$(LIBEXT).lib \
          $(VCPP_LIB_DIRS)
DMLIBS	= odbc32.lib $(VCPP_LIB_DIRS)
CSLIBS  = $(ODBC)\lib\ttclient$(TTVER).lib $(VCPP_LIB_DIRS)
TTDMLIBS    = $(ODBC)\lib\ttdrvmgr$(TTVER).lib $(VCPP_LIB_DIRS)


CPLUSPLUS	=	cl

###
### list of object targets below
###

TTC_INCLUDEDIR	=	$(ODBC)\include\ttclasses

TTC_DEMO_CPP_OBJS = \
basics.obj \
bulkcp.obj \
bulktest.obj \
testprog_utils.obj \
catalog.obj \
plsqlTTCLASSES.obj \
pooltest.obj \
ttSizeAll.obj \
typetest.obj

TTC_CLIENT_DEMO_CPP_OBJS = \
basics_client.obj \
bulkcp_client.obj \
bulktest_client.obj \
testprog_utils_client.obj \
catalog_client.obj \
plsqlTTCLASSES_client.obj \
pooltest_client.obj \
ttSizeAll_client.obj \
typetest_client.obj


TTC_DEMO_C_OBJS = \
portable_thread_windows.obj

TTC_CLIENT_DEMO_C_OBJS = \
portable_thread_windows_client.obj

TESTPROGS = \
basics.exe \
bulkcp.exe \
bulktest.exe \
catalog.exe \
plsqlTTCLASSES.exe \
pooltest.exe \
ttSizeAll.exe \
typetest.exe

TESTPROGS_CS = \
basicsCS.exe \
bulkcpCS.exe \
bulktestCS.exe \
catalogCS.exe \
plsqlTTCLASSESCS.exe \
pooltestCS.exe \
ttSizeAllCS.exe \
typetestCS.exe

TESTPROGS_DM = \
basicsDM.exe \
bulkcpDM.exe \
bulktestDM.exe \
catalogDM.exe \
pooltestDM.exe \
ttSizeAllDM.exe \
typetestDM.exe

TESTPROGS_TTDM = \
basicsTTDM.exe \
bulkcpTTDM.exe \
bulktestTTDM.exe \
catalogTTDM.exe \
plsqlTTCLASSESTTDM.exe \
pooltestTTDM.exe \
ttSizeAllTTDM.exe \
typetestTTDM.exe

TTC_SOURCE = TTCmd.cpp TTCommand.cpp TTConnection.cpp TTColumn.cpp TTConnectionPool.cpp TTParameter.cpp TTCatalog.cpp TTTStatus.cpp TTypes.cpp TTEnvironment.cpp ttTime.c TTXla.cpp TTLog.cpp TTGlobal.cpp

TTC_INCLUDE = TTCmd.h TTCommand.h TTConnection.h TTColumn.h TTConnectionPool.h TTParameter.h TTCatalog.h TTStatus.h TTTypes.h TTEnvironment.h TTXla.h ttTime.h TTLog.h TTGlobal.h TTIostream.h TT__Header.h TTInclude.h

SRC  = src

#
#	Top-level targets
#

UTILS	     = testprog_utils.obj
UTILS_CLIENT = testprog_utils_client.obj

!IF DEFINED(DEBUG)
TTCLASSES_LIB	      =	$(ODBC)\lib\ttclasses$(TTVER)D.lib
TTCLASSES_DLL		    =	$(ODBC)\bin\ttclasses$(TTVER)D.dll
TTCLASSES_CS_LIB  	=	$(ODBC)\lib\ttclasses$(TTVER)CSD.lib
TTCLASSES_CS_DLL		=	$(ODBC)\bin\ttclasses$(TTVER)CSD.dll
TTCLASSES_DM_LIB	  =	$(ODBC)\lib\ttclasses$(TTVER)DMD.lib
TTCLASSES_DM_DLL		=	$(ODBC)\bin\ttclasses$(TTVER)DMD.dll
TTCLASSES_TTDM_LIB	=	$(ODBC)\lib\ttclasses$(TTVER)TTDMD.lib
TTCLASSES_TTDM_DLL	=	$(ODBC)\bin\ttclasses$(TTVER)TTDMD.dll
!ELSE
TTCLASSES_LIB	      =	$(ODBC)\lib\ttclasses$(TTVER).lib
TTCLASSES_DLL		    =	$(ODBC)\bin\ttclasses$(TTVER).dll
TTCLASSES_CS_LIB	  =	$(ODBC)\lib\ttclasses$(TTVER)CS.lib
TTCLASSES_CS_DLL		=	$(ODBC)\bin\ttclasses$(TTVER)CS.dll
TTCLASSES_DM_LIB	  =	$(ODBC)\lib\ttclasses$(TTVER)DM.lib
TTCLASSES_DM_DLL		=	$(ODBC)\bin\ttclasses$(TTVER)DM.dll
TTCLASSES_TTDM_LIB	=	$(ODBC)\lib\ttclasses$(TTVER)TTDM.lib
TTCLASSES_TTDM_DLL	=	$(ODBC)\bin\ttclasses$(TTVER)TTDM.dll
!ENDIF

TTCLASSESDEPS	  = $(TTCLASSES_LIB) $(TTCLASSES_DLL) 

###
### by default, build both direct & client/server TTClasses library
### and example programs
###

all: $(TESTPROGS) $(TESTPROGS_CS) $(TESTPROGS_DM) $(TESTPROGS_TTDM)

###
### best performance (recommended) use of TTClasses is the direct library
###

###
### you can also link with TimesTen's client driver
###

client: $(TESTPROGS_CS)

###
### also possible to use the Windows Driver Manager
### (NB: slower than direct mode)
###

msdm:	$(TESTPROGS_DM)


###
### also possible to use the TimesTen Driver Manager
### (NB: Often faster than MS Driver Manager)
###

ttdm:	$(TESTPROGS_TTDM)

clean:
		-erase *.obj
		-erase *.pdb
		-erase *.ilk
		-erase *.manifest
		-erase $(TESTPROGS)
		-erase $(TESTPROGS_CS)
		-erase $(TESTPROGS_DM)
		-erase $(TESTPROGS_TTDM)

###
### .obj rules
###

$(TTC_DEMO_C_OBJS):
	$(CC) /I$(DEMO) $(CFLAGS) -c $*.c /Fo$@

$(TTC_DEMO_CPP_OBJS):
	$(CPLUSPLUS) $(CFLAGS) -c $*.cpp /Fo$@

$(TTC_CLIENT_DEMO_C_OBJS):
	$(CC) /I$(DEMO) $(CSDEFS) $(CFLAGS) -c $(*:_client=).c /Fo$@

$(TTC_CLIENT_DEMO_CPP_OBJS):
	$(CPLUSPLUS) $(CSDEFS) $(CFLAGS) -c $(*:_client=).cpp /Fo$@

#.c.obj:
#	$(CC) $(CFLAGS) /c $<
#
#.cpp.obj:
#	$(CPLUSPLUS) $(CFLAGS) /c $<

###
### sample program targets
###

basics.exe: basics.obj $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ basics.obj $(UTILS) $(TTCLASSES_LIB) $(LDFLAGS)

bulkcp.exe: bulkcp.obj $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ bulkcp.obj $(UTILS) $(TTCLASSES_LIB) $(LDFLAGS)

bulktest.exe: bulktest.obj $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ bulktest.obj $(UTILS) $(TTCLASSES_LIB) $(LDFLAGS)

catalog.exe: catalog.obj $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ catalog.obj $(UTILS) $(TTCLASSES_LIB) $(LDFLAGS)

plsqlTTCLASSES.exe: plsqlTTCLASSES.obj $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ plsqlTTCLASSES.obj $(UTILS) $(TTCLASSES_LIB) $(LDFLAGS)

pooltest.exe: pooltest.obj portable_thread_windows.obj $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ pooltest.obj \
        portable_thread_windows.obj \
        $(UTILS) $(TTCLASSES_LIB) $(LDFLAGS)

ttSizeAll.exe: ttSizeAll.obj $(TTCLASSES_LIB) $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ ttSizeAll.obj $(UTILS) $(TTCLASSES_LIB) $(LDFLAGS)

typetest.exe: typetest.obj $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ typetest.obj $(UTILS) $(TTCLASSES_LIB) $(LDFLAGS)

###
### client/server sample program targets
###

basicsCS.exe: basics_client.obj $(TTCLASSES_CS_LIB) $(UTILS_CLIENT) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ basics_client.obj $(UTILS_CLIENT) $(TTCLASSES_CS_LIB) $(LDFLAGS)

bulkcpCS.exe: bulkcp_client.obj $(TTCLASSES_CS_LIB) $(UTILS_CLIENT) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ bulkcp_client.obj $(UTILS_CLIENT) $(TTCLASSES_CS_LIB) $(LDFLAGS)

bulktestCS.exe: bulktest_client.obj $(TTCLASSES_CS_LIB) $(UTILS_CLIENT) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ bulktest_client.obj $(UTILS_CLIENT) $(TTCLASSES_CS_LIB) $(LDFLAGS)

catalogCS.exe: catalog_client.obj $(TTCLASSES_CS_LIB) $(UTILS_CLIENT) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ catalog_client.obj $(UTILS_CLIENT) $(TTCLASSES_CS_LIB) $(LDFLAGS)

plsqlTTCLASSESCS.exe: plsqlTTCLASSES_client.obj $(TTCLASSES_CS_LIB) $(UTILS_CLIENT) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ plsqlTTCLASSES_client.obj $(UTILS_CLIENT) $(TTCLASSES_CS_LIB) $(LDFLAGS)

pooltestCS.exe: pooltest_client.obj $(TTCLASSES_CS_LIB) portable_thread_windows_client.obj $(UTILS_CLIENT) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ pooltest_client.obj \
        portable_thread_windows_client.obj \
        $(UTILS_CLIENT) $(TTCLASSES_CS_LIB) $(LDFLAGS)

ttSizeAllCS.exe: ttSizeAll_client.obj $(TTCLASSES_CS_LIB) $(UTILS_CLIENT) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ ttSizeAll_client.obj $(UTILS_CLIENT) $(TTCLASSES_CS_LIB) $(LDFLAGS)

typetestCS.exe: typetest_client.obj $(TTCLASSES_CS_LIB) $(UTILS_CLIENT) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ typetest_client.obj $(UTILS_CLIENT) $(TTCLASSES_CS_LIB) $(LDFLAGS)

###
### MS driver/manager sample program targets
###

basicsDM.exe: basics.obj $(TTCLASSES_DM_LIB) $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ basics.obj $(UTILS) $(TTCLASSES_DM_LIB) $(LDFLAGS)

bulkcpDM.exe: bulkcp.obj $(TTCLASSES_DM_LIB) $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ bulkcp.obj $(UTILS) $(TTCLASSES_DM_LIB) $(LDFLAGS)

bulktestDM.exe: bulktest.obj $(TTCLASSES_DM_LIB) $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ bulktest.obj $(UTILS) $(TTCLASSES_DM_LIB) $(LDFLAGS)

catalogDM.exe: catalog.obj $(TTCLASSES_DM_LIB) $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ catalog.obj $(UTILS) $(TTCLASSES_DM_LIB) $(LDFLAGS)

pooltestDM.exe: pooltest.obj $(TTCLASSES_DM_LIB) portable_thread_windows.obj $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ pooltest.obj \
        portable_thread_windows.obj \
        $(UTILS) $(TTCLASSES_DM_LIB) $(LDFLAGS)

ttSizeAllDM.exe: ttSizeAll.obj $(TTCLASSES_DM_LIB) $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ ttSizeAll.obj $(UTILS) $(TTCLASSES_DM_LIB) $(LDFLAGS)

typetestDM.exe: typetest.obj $(TTCLASSES_DM_LIB) $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ typetest.obj $(UTILS) $(TTCLASSES_DM_LIB) $(LDFLAGS)

###
### TimesTen driver/manager sample program targets
###

basicsTTDM.exe: basics.obj $(TTCLASSES_TTDM_LIB) $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ basics.obj $(UTILS) $(TTCLASSES_TTDM_LIB) $(LDFLAGS)

bulkcpTTDM.exe: bulkcp.obj $(TTCLASSES_TTDM_LIB) $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ bulkcp.obj $(UTILS) $(TTCLASSES_TTDM_LIB) $(LDFLAGS)

bulktestTTDM.exe: bulktest.obj $(TTCLASSES_TTDM_LIB) $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ bulktest.obj $(UTILS) $(TTCLASSES_TTDM_LIB) $(LDFLAGS)

catalogTTDM.exe: catalog.obj $(TTCLASSES_TTDM_LIB) $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ catalog.obj $(UTILS) $(TTCLASSES_TTDM_LIB) $(LDFLAGS)

plsqlTTCLASSESTTDM.exe: plsqlTTCLASSES.obj $(TTCLASSES_TTDM_LIB) $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ plsqlTTCLASSES.obj $(UTILS) $(TTCLASSES_TTDM_LIB) $(LDFLAGS)

pooltestTTDM.exe: pooltest.obj $(TTCLASSES_TTDM_LIB) portable_thread_windows.obj $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ pooltest.obj \
        portable_thread_windows.obj $(UTILS) $(TTCLASSES_TTDM_LIB) $(LDFLAGS)

ttSizeAllTTDM.exe: ttSizeAll.obj $(TTCLASSES_TTDM_LIB) $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ ttSizeAll.obj $(UTILS) $(TTCLASSES_TTDM_LIB) $(LDFLAGS)

typetestTTDM.exe: typetest.obj $(TTCLASSES_TTDM_LIB) $(UTILS) $(TTCLASSESDEPS)
	$(CPLUSPLUS) /Fe$@ typetest.obj $(UTILS) $(TTCLASSES_TTDM_LIB) $(LDFLAGS)

#
# Targets for building TimesTen TTClasses library
#

$(TTCLASSES_LIB):
	cd $(TTCLASSESDIR) && nmake

$(TTCLASSES_DLL):
	cd $(TTCLASSESDIR) && nmake

Open in new window

0
star90Author Commented:
I have also found instructions for compiling the libraries (below)

http://download.oracle.com/docs/cd/E11882_01/timesten.112/e13074/compiling.htm#BCGDIDJB

I tried the command
cd TimesTen
cd tt1121_64
cd ttclasses
nmake /I client -DTTDEBUG -DTT64_BIT >out.txt
amd I am getting the attached errors
fatal error U1065: invalid option ´_´

Was I supposed to get .lib files for 64 bits? or for this I need to compile the libraries with VC++ ?
--------------------------------------------------------------------------
From the link above:
TTDEBUG: Generate additional debugging and error checking logic

Compile TTClasses with -DTTDEBUG to generate extra debugging information. This extra information reduces performance somewhat, so use this flag only in development (not production) systems.
TT_64BIT: Use TTClasses with 64-bit TimesTen

Compile TTClasses with -DTT_64BIT if you are writing a 64-bit TimesTen application.

Note that 64-bit TTClasses has been tested on AIX, HP-UX, Solaris, Red Hat Linux, and Tru64.
0
sarabandeCommented:
1) However Can I make new .lib files for 64 bit from the source code in TimesTen/1121_64/ttclasses  ?

before creating new libs for 64-bit you should use the existing ones which all seem to have _64 as suffix in their names. if you achieved to create a 64-bit exectuable you also can think on creating 64-bit libraries (static libs or import libs + dll). but i have no experience with that.


2) I attached the Makefile that i find in  TimesTen/1121_64/ttclasses
The first MakeFile points to the ODBC mgr dir that is in:
 TimesTen/1121_64/quickstart/samplecode/odbc_drivemgr

first, the 64-bit makefile shows that you got all for making 64-bit executables.

second, the odbc interface allows programmatical access to the timesten db. i would assume that the TimesTen classes have an optional  odbc interface what would mean that you could use them even if you decide to not using oracle dbms.

the error U1065: invalid option ´_´  seems to indicate that you were not using the correct nmake. you should use the one that came with vs2010 and was suitable for 64-bit builds. you might do a search on your vs2010 installation for nmake*. note, my nmake (vs2008) doesn't support /l option.


I Attached  the ODBCmgr  Makefile also
What can I learn from it?
Do I need to link to libraries related to ODBC?

i don't think so. the ODBCMgr probably is only a sample for using TimesTen with odbc. so you can learn how to create applications based on odbc if that is what you want to do.

from my experiences with oracle they probably have an OCI interface as well (OCI is the native API to oracle dbms) and/or a PL/SQL interface where a preprocessor was used to compile PL/SQL code for dbms access.

"Compile TTClasses with -DTTDEBUG" normally means that you add the -DTTDEBUG to the compiler options CFLAGS (or similar) which normally can be set by environment variables.  

in the makefile you posted they do set the -DTTDEBUG when the environment variable DEBUG was defined. so if you do on the commandline

  set DEBUG=1
  nmake -f Makefile

it would set the -DTTDEBUG to the CFLAGS.

the -DTT64_BIT was set fixed in the makefile which was a 64-bit makefile to create a 64-bit library of the ttclasses. if your download already had 64-bit libraries you don't need to make a new build. but you can use the makefile to find out which compiler options and linker options and directories for include and libraries and library files you need for a 64-bit build.

Sara

0
star90Author Commented:
Thanks for the answer.
I will try to connect to TimesTen using ODBC.
0
sarabandeCommented:
for that you only should need a running TimesTen dbms (server) and an odbc driver for TimesTen (installed at the client).

Sara
0
star90Author Commented:
The Timesten is  running.
1) in the ODBC manager I added the Timesten manager and the Timesten client.

2) I understand that there is an option to use the 3 files sql.h sqlext.h and tt_xla and the example code that is provided with the installation file.

3) I want to add reference to the driver (Timesten Client  or the Timesten  Database Manager )
and to use something like
OdbcConnection ^mycon=gcnew OdbcConnection(Driver={Driver name};Dns=timesTen_client;Uid=user;Pwd=pwd);

myCon->Open();

4) I see in the VC++ Tools->Database->Microsoft Odbc Data Source
under the Use user or system Data name
the option of timesten_client
but when trying to test connection I get the error
Error [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and application.

5) I don´t know where the Timesten client and TimesTen Data Manager are located in order to add them as reference to my project in VC++.
I can see them in the ODBC manager but I don´t know if I need to add  reference for them in  the VC++ project

6) Do I need to set the File Dsn in the ODBC data manager?
What do I need to do?
Thanks
0
sarabandeCommented:
the sql.h and sqlext.h is only for native C access to odbc, for example calling SQLDriverConnect function.

if you are familiar with managed VC you could use the odbc classes. you only should add a 'datasource' to the odbc settings in windows registry using the odbc administrator panel (odbcad32.exe). when opening the panel you can select from the list of installed odbc drivers where you must have an entry for the timesten (if not you need to find odbc client setup for timesten).

your current connection string seems to have a wrong driver Driver={Driver name. the 'Driver name' must be exactly the name of the timesten odbc driver as you see it in the odbc administrator panel.

if you defined a datasource you can replace the DRIVER=<driver name> by DSN=<datasource>  where datasource is the name you defined in the panel.

Sara
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
star90Author Commented:
Hi Sara,
Thanks its working!!
0
sarabandeCommented:
congratulations!

Sara
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.