[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-odbc
Subject:    I have a problem with ODBC 3.51 Driver
From:       le huynh <kitobiki () yahoo ! com>
Date:       2007-01-03 2:26:04
Message-ID: 20070103022604.72975.qmail () web54113 ! mail ! yahoo ! com
[Download RAW message or body]


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=testDB;UID=root;PWD=;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);

Can you help me?
Thanks.

hr = m_Report->put_SQLQueryString(());

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic