Advertisement
Advertisement
| 05.27.2008 at 12:40PM PDT, ID: 23436085 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: |
CString m_DSN = "C:\\NYLBISBuild\\Register\\Database\\db1.MDB"; CString m_connStr = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=" + m_DSN + ";Mode=ReadWrite;Extended Properties=\"\";Jet OLEDB:System database=\"\";Jet OLEDB:Registry Path=\"\";Jet OLEDB:Database Password=\"\";Jet OLEDB:Engine Type=4;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password=\"\";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False"; hr = DataSource->OpenFromInitializationString(m_connStr.AllocSysString()); // S_OK // Create session object CSession Session; Session.Open(*DataSource); // properties CDBPropSet propset (DBPROPSET_ROWSET); propset.AddProperty(DBPROP_ISequentialStream, true); propset.AddProperty(DBPROP_IRowsetChange, true); propset.AddProperty(DBPROP_IRowsetScroll, true); propset.AddProperty(DBPROP_UPDATABILITY, DBPROPVAL_UP_CHANGE | DBPROPVAL_UP_INSERT | DBPROPVAL_UP_DELETE); hr = m_table.Open(Session, "Table2", &propset); // S_OK m_table.MoveFirst(); BYTE byte[10] = "test"; ISequentialStream* pStream; pStream = *(IStream**)m_table._GetDataPtr(1); hr = pStream->Write((void*)byte, sizeof(byte),NULL); // Access Denied hr = m_table.SetData(); //DB_E_ERRORSOCCURRED m_table.Close(); |