SELECT query on nchar or nvarchar field size of >128 fails!
-
12. března 2012 11:23
I created a table, Computers, with a column, Name. The Name column is set to Length of 128 and Data Type "nchar".
Running a SELECT query fails with #3105, "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done."Changing the Length to 127 or less, it works.
Help, please?
Code:
ADODB::_ConnectionPtr connection; ADODB::_RecordsetPtr recordset; CoInitialize(NULL); hr = connection.CreateInstance(__uuidof(ADODB::Connection)); if (FAILED(hr)) { CoUninitialize(); return; } recordset.CreateInstance(__uuidof(ADODB::Recordset)); connection->CursorLocation = ADODB::adUseClient; connection->Open("Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data Source=\"c:\\test.sdf\”;",L"",L"",0); recordset->Open(L"SELECT Name FROM Computers",connection.GetInterfacePtr(), ADODB::adOpenStatic, ADODB::adLockReadOnly, ADODB::adCmdText);
- Upravený JeffR2 12. března 2012 11:24
Všechny reakce
-
12. března 2012 18:10Actually, any nchar or nvarchar field that is of length of 128 or more does not work.
-
13. března 2012 9:34Moderátor
Hi JeffR2,
Could you please have a look at the KB article below about this type of issue?
TechNet Subscriber Support
PRB: "Multiple-step OLE DB operation generated errors" when opening ADO connection
If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.Stephanie Lv
TechNet Community Support
-
13. března 2012 21:51
Didn't work.
The OLEDB_SERVICES is in the registry.
What is "Max characters per delimited column=" in the connect string? This could be the issue?
- Upravený JeffR2 13. března 2012 21:52
-
23. března 2012 7:11