Hi.
I am using VS2005 to create an app for WM5. I use OLE DB to access a SQL
Mobile 3 database.
I am really a beginner when it comes to OLE DB (having worked a lot with
ADO before), but I have managed to run SQL statements successfully, and
are now trying to read data. I create a rowset based on a SELECT
statement. In one case I select from a simple table with two fields, and
that works great. But if I select from a table that has 21 fields, it
actually crash'es... The statement that crashes is:
m_pRowset->GetData(m_hRows[0], m_hAccessor, m_pRowBuffer);
The debug log is:
Data Abort: Thread=927f9888 Proc=90841f30 'wm5test.exe'
AKY=00020001 PC=0084b250(sqlceoledb30.dll+0x0002b250) RA=0084b1f0
(sqlceoledb30.dll+0x0002b1f0) BVA=241608a5 FSR=00000003
Does anyone know what this might be?
If I open the table in MS Query Analyzer, it opens without problem,
displaying the data correctly...
This is the CREATE statement for the table that works:
CREATE TABLE tblPocketSetup (SetupKey nvarchar(50) CONSTRAINT pkSetupKey
PRIMARY KEY,SetupValue ntext);
This is the CREATE statement for the table that crashes:
CREATE TABLE tblPocketCustomer (CustomerID int CONSTRAINT pkCustomerID
PRIMARY KEY,CustomerIDText nvarchar(50) default NULL,OrganizationNumber
nvarchar(30) DEFAULT NULL,CompanyLastname nvarchar(50) default
'',ContactFirstname nvarchar(50) default NULL,Address nvarchar(30)
default NULL,Address2 nvarchar(30) default NULL,PostalNumber nvarchar
(10) default NULL,PostalPlace nvarchar(50) default NULL,Phone nvarchar
(20) default NULL,Phone2 nvarchar(20) default NULL,Mobile nvarchar(20)
default NULL,Fax nvarchar(20) default NULL,Email nvarchar(50) default
NULL,DiscountProduct float default '0',DiscountService float default
'0',Status tinyint default '0',DepartmentIDExt nvarchar(50) default
'*',ShowRecord bit default '1',RegEmployeeID int default '0',UpdateInfo
tinyint default '0');
Best regards,
Ole-Johan Ellingsen