M
merco
hi,
i'm using this code
http://www.opennetcf.org/Forums/topic.asp?TOPIC_ID=235
to paging a dataset.
Due to customer specifications, i have to run my app both in PocketPc
and Desktop PC.
So i create to different classes called: NxDataCacheCE.vb and
NxDataCacheDesktop.VB.
In this classes i use System.Data.SqlServerCe and
System.Data.SqlClient.
To semplify my work i also use a class wrapper called NxDataCache:
Public Class NxDataCache
Private NxDcCE As NxDataCacheCE
Private NxDcDesktop As NxDataCacheDesktop
Public Sub New()
If Parametri.Palmare Then
NxDcCE = New NxDataCacheCE
NxDcDesktop = Nothing
Else
NxDcDesktop = New NxDataCacheDesktop
NxDcCE = Nothing
End If
End Sub
Public Sub PrepareData(ByVal SQL As String, ByVal DataWindow As
Integer, ByVal DataTableName As String)
If Parametri.Palmare Then
NxDcCE.PrepareData(Parametri.Cn_SQLCE, SQL, DataWindow,
DataTableName)
Else
NxDcDesktop.PrepareData(Parametri.Cn_SQL, SQL, DataWindow,
DataTableName)
End If
End Sub
Public Sub FillDS(ByVal StartFrom As Integer, ByVal Size As
Integer)
If Parametri.Palmare Then
NxDcCE.FillDS(StartFrom, Size)
Else
NxDcDesktop.FillDS(StartFrom, Size)
End If
End Sub
ReadOnly Property SQLData() As System.Data.DataTable
Get
If Parametri.Palmare Then
Return NxDcCE.SQLData
Else
Return NxDcDesktop.SQLData
End If
End Get
End Property
Protected Overrides Sub Finalize()
NxDcCE = Nothing
NxDcDesktop = Nothing
MyBase.Finalize()
End Sub
End Class
I get this error, when i call PrepareData
Could not load file or assembly 'System.Data.SqlServerCe,
Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or
one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT:
0x80131040)
Why ? On pocketPC all runs ok.
i'm using this code
http://www.opennetcf.org/Forums/topic.asp?TOPIC_ID=235
to paging a dataset.
Due to customer specifications, i have to run my app both in PocketPc
and Desktop PC.
So i create to different classes called: NxDataCacheCE.vb and
NxDataCacheDesktop.VB.
In this classes i use System.Data.SqlServerCe and
System.Data.SqlClient.
To semplify my work i also use a class wrapper called NxDataCache:
Public Class NxDataCache
Private NxDcCE As NxDataCacheCE
Private NxDcDesktop As NxDataCacheDesktop
Public Sub New()
If Parametri.Palmare Then
NxDcCE = New NxDataCacheCE
NxDcDesktop = Nothing
Else
NxDcDesktop = New NxDataCacheDesktop
NxDcCE = Nothing
End If
End Sub
Public Sub PrepareData(ByVal SQL As String, ByVal DataWindow As
Integer, ByVal DataTableName As String)
If Parametri.Palmare Then
NxDcCE.PrepareData(Parametri.Cn_SQLCE, SQL, DataWindow,
DataTableName)
Else
NxDcDesktop.PrepareData(Parametri.Cn_SQL, SQL, DataWindow,
DataTableName)
End If
End Sub
Public Sub FillDS(ByVal StartFrom As Integer, ByVal Size As
Integer)
If Parametri.Palmare Then
NxDcCE.FillDS(StartFrom, Size)
Else
NxDcDesktop.FillDS(StartFrom, Size)
End If
End Sub
ReadOnly Property SQLData() As System.Data.DataTable
Get
If Parametri.Palmare Then
Return NxDcCE.SQLData
Else
Return NxDcDesktop.SQLData
End If
End Get
End Property
Protected Overrides Sub Finalize()
NxDcCE = Nothing
NxDcDesktop = Nothing
MyBase.Finalize()
End Sub
End Class
I get this error, when i call PrepareData
Could not load file or assembly 'System.Data.SqlServerCe,
Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or
one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT:
0x80131040)
Why ? On pocketPC all runs ok.