I have a problem with ODBC 3.51 Driver

I have a problem with ODBC 3.51 Driver

am 03.01.2007 03:16:13 von le huynh

--0-1406260636-1167790573=:93027
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit


I connect via ODBC 3.51 Driver use VC6.0, all data in report are OK
except image field (blob). There is no image in this field showed. This
is my coding below:

IReportPtr m_Report;
ADODB::_ConnectionPtr Conn = NULL;
ADODB::_RecordsetPtr RS;

HRESULT hr = Conn.CreateInstance( __uuidof( ADODB::Connection ) );
ASSERT(SUCCEEDED(hr))

CString strConn;
strConn.Format("DRIVER={MySQL ODBC 3.51
Driver};SERVER=localhost;DATABASE=xxx;UID=xxx;PWD=xxx;OPTION =3;");

_bstr_t bstrAccessConnect = strConn.AllocSysString();

Conn->ConnectionString = bstrAccessConnect;

_bsrt_t bstrEmpty(L"");

Conn->Open(bstrEmpty,bstrEmpty,bstrEmpty,-1);

RS.CreateInstance(__uuidof(ADODB::Recordset));
RS->Open((_bstr_t)strSQL, _variant_t((IDispatch *)Conn, true),
ADODB::adOpenStatic, ADODB::adLockReadOnly, ADODB::adCmdText);


VARIANT var;
VariantInit(&var);

var.vt = VT_DISPATCH;
var.pdispVal = (IDispatch*)RS;
hr = m_Report->Database->SetDataSource(var);

hr = m_Report->put_SQLQueryString(());



Can you help me?

Thanks.


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--0-1406260636-1167790573=:93027--