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

hello , Can I ask you a question about "MFC + ODBC + MYSQL "

2004-03-15       - By 

 Back
hello , mysql .  first,sorry for my poor english .
I 'm used CRecordSet to connected database of mysql(linux) . Read source data no error , but can 't write data , has a "memory allocation error " error in used CRecordSet::Update() . into debug , this error (
CATCH_ALL(e)
{
lResult = AfxGetThread()- >ProcessWndProcException(e, &pThreadState- >m_lastSentMsg);
TRACE1( "Warning: Uncaught exception in WindowProc (returning %ld).\n ",
lResult);
DELETE_EXCEPTION(e);
}
END_CATCH_ALL " )
appear in the fun of AfxCallWndProc in wincode.cpp .
my code
CDatabase m_LinuxDB;
CLinuxSet * m_pSet;
m_LinuxDB.OpenEx( _T( "DSN=LSource;UID=zhang;PWD= "), CDatabase::noOdbcDialog );
m_pSet = new CLinuxSet(&m_LinuxDB);
m_pSet- >Open(CRecordset::snapshot,s "select * from [Author] "); //mysql isn 't support CRecordset::dynaset and CRecordset::dynamic
m_pSet- >m_AName = "zhang "; //the length of m_AName is 256(char) in table (m_AName 对应的表中的字段为char的,长256)
m_pSet- >m_AInfo = "zhb "; //the type of m_AInfo is text in table (m_AInfo 对应的类型是text 的)
m_pSet- >Update(); // occur error -- >a messagebox "memory allocation error "
Can you tell me that 's why? how to solve .
我用MFC的CRecordSet类连接linux上的mysql数据库 ,连接正确,也可以读出里面的数据,但是就是不能更新里面的数据 。也就是说一用CRecordSet::Update()就出错,弹出一个MessageBox“memory allocation error” ,调试模式进入WINCODE.CPP的AfxCallWndProc函数里面。出现这错误是什么原因呢?
我的ODBC是MyODBC-3.51 ,你能帮我说说出错的原因么?怎么处理才能使之正确?

Thanks!

        致
礼!






张红兵
zh_aoi_ng@(protected)





-- ---- ---- ---- ---- ---- -----
Do You Yahoo!?
完全免费的雅虎电邮,马上注册获赠额外60兆网络存储空间