Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MySQL++ - Programming with the C++ API to MySQL
MaxDB - Everything about MaxDB, formerly known as SAP DB
ODBC - ODBC with the MySQL Connector/ODBC driver
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
Update one field with more fields from another table
Getting Identity after INSERT
ERROR 2002: Can 't connect to local MySQL server through socket
mysql test 4 1 fails with the gis test
MySQL Cluster Software
Downgrade Mysql from 4 to 3 23
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Can 't access mysql after kernel upgrade
Executing MySQL Commands From Within C Program
Comparing and writing out BLOBS
Preventing Duplicate Entries
FULLTEXT query format question
Strange behavior, Table Level Permission
Does the binary log enabling affect the MySQL performances?
mysql:it 's a db not a dbms how it 's possible?!
mysql have same function mthod as Oracle decode()
 
I have a problem with ODBC 3.51 Driver

I have a problem with ODBC 3.51 Driver

2007-01-02       - By le huynh

 Back
Reply:     1     2  


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