Beispiel #1
0
void qObjODBC::EvalColName(qCtx *ctx, qStr *out, qArgAry *args) 
{
	assert(myStmt.RowCount()!=-1);
	if (myStmt.RowCount() == -1)
		return;
	CDbCol *col;
	if ((col = GetEvalCol(ctx, args))) {
		out->PutS(col->Name);
	}
}
Beispiel #2
0
void qObjODBC::EvalCol(qCtx *ctx, qStr *out, qArgAry *args) 
{
	assert(myStmt.RowCount()!=-1);
	if (myStmt.RowCount() == -1)
		return;
	CDbCol *col;
	if ((col = GetEvalCol(ctx, args))) {
		int ind = col->GetInd();
		if (myStmt.HasData() && SQL_HAS_DATA(ind)) {
			col->ConvBuf();
			col->RTrim();
			if (col->GetBuf() && *col->GetBuf())
				out->PutS(col->GetBuf());
		}
	}
}
Beispiel #3
0
void qObjODBC::EvalCol(qCtx *ctx, qStr *out, qArgAry *args) 
{
	assert(myStmt.RowCount()!=-1);
	if (myStmt.RowCount() == -1)
		return;
	CDbCol *col;
	if ((col = GetEvalCol(ctx, args))) {
		int ind = col->GetInd();
		// smx_log(SMXLOGLEVEL_DEBUG, "ind for %s is %d", (const char *) col->Name, ind);
		if (myStmt.HasData() && SQL_HAS_DATA(ind)) {
			col->ConvBuf();
			col->RTrim();
			if (col->GetBuf() && *col->GetBuf())
				out->PutS(col->GetBuf());
		}
	}
}
Beispiel #4
0
void qObjODBC::EvalColumn(qCtx *ctx, qStr *out, qArgAry *args) 
{
	assert(myStmt.RowCount()!=-1);
	if (myStmt.RowCount() == -1)
		return;
	CDbCol *col;
	if ((col = GetEvalCol(ctx, args))) {
		int ind = col->GetInd();
		if (myStmt.HasData() && SQL_HAS_DATA(ind)) {
			col->ConvBuf();
			if (ind >= 0) {
				int n = min((SQLINTEGER)ind, col->DispSize);
				out->PutS(col->GetBuf(), n);
			} else {
				out->PutS(col->GetBuf());
			}
		}
	}
}