I have a problem with ODBC 3.51 Driver

le huynh <[email protected]>
Newsgroups gmane.comp.db.mysql.odbc
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.