"Not enought storage is availabe to process this command.

27/05/2005 - 08:35 por David C. | Informe spam
Hola,

Alguien sabe que quiere decir esto cuando ejecuto un programa en VB.NET CF
para PPC utlizando InTheHand?
Es problema de Hardaware o problema de Software.

El botón asiciado que siempre da el error hace varias inserciones en un
DataGrid...

Salu2

David

Preguntas similare

Leer las respuestas

#1 ACP
27/05/2005 - 10:27 | Informe spam
Hola,

es un error de sqlce 2.0 y quiere decir exactamente eso, que no tienes
bastante memoria libre en el dispostivo para que sqlce haga las operaciones
que le pides.

Cuanta memoria tiene tu dispositivo?? Como de grande es la base de datos??
que operaciones realizas sobre ella?? como haces estas operaciones?? liberas
bien los objetos que no utilizas?? has visto el progreso de la memoria usada
mientras ejecutas tu aplicación??

Echale un vistazo al foro de microsoft de sql ce, este error suele darse más
de lo que debería.

http://groups-beta.google.com/group...fb0617ecd0

Saludos

ACP


"David C." escribió:

Hola,

Alguien sabe que quiere decir esto cuando ejecuto un programa en VB.NET CF
para PPC utlizando InTheHand?
Es problema de Hardaware o problema de Software.

El botón asiciado que siempre da el error hace varias inserciones en un
DataGrid...

Salu2

David



Respuesta Responder a este mensaje
#2 luis molina Micasoft
16/06/2005 - 18:34 | Informe spam
estoy de acuerdo de que en la mayoria de los casos se debe a falta de
memoria, pero tambien se produce cuando no se hace un uso correcto de la bd,
es decir se deben cerrrar todos los datareader y hacer dispose de todos los
commands. te mando un codigo de como deberia tratarse la bd (evitando
datareaders siempre que sea posible)

Imports System.Data.SqlServerCe
Imports System.Data.SqlServerCe.SqlCeException

Imports System.io
Imports System.text

Public Class PocketDbClass
' --
' libreria creada especificamente para acceso local en la pda a sqlce
' -
Dim oUtil As New Utility
Private Conn As SqlCeConnection
Private comando As SqlCeCommand
Private da As SqlCeDataAdapter


Public _local_DatabaseFile As String
Public _local_ConnString As String


Public ReadOnly Property localDatabaseFile() As String
Get
Return _local_DatabaseFile
End Get
End Property

Public ReadOnly Property local_ConnString() As String
Get
Return _local_ConnString
End Get
End Property

' para que esta direccion funcione en conexiones poner
' que la tarjeta de red conecta a internet no al trabajo

Dim cc As config

Public Sub New()
Me._local_DatabaseFile = Path.Combine(maquina.DirectorioAplicacion,
"xxxxx.sdf")
Me._local_ConnString = "Data Source= " & Me._local_DatabaseFile

End Sub


Overloads Sub Finalize()
MyBase.Finalize()
End Sub 'Finalize


Private Sub open()
Try
If Me.Conn Is Nothing Then
Me.Conn = New SqlCeConnection
End If

If Me.Conn.State = ConnectionState.Closed Then
Me.Conn.ConnectionString = local_ConnString & ";Password = '.'"
Me.Conn.Open()
End If
Catch ex As SqlCeException

MsgBox(oUtil.ComposeSqlErrorMessage(ex))
Catch ex2 As NotSupportedException

MsgBox(ex2.Message)
End Try

End Sub



' return command object
Private Function GetCommand() As SqlCeCommand
'/ create command object
If Me.comando Is Nothing Then
Me.comando = New SqlCeCommand
End If

Me.comando.Connection = Me.Conn
Me.comando.CommandType = CommandType.Text
Me.comando.CommandText = String.Empty
Return Me.comando

End Function

' return data adapter
Private Function GetAdapter(ByVal sql As String) As SqlCeDataAdapter
' make sure we have open connection
Me.open()
Return New SqlCeDataAdapter(sql, Me.Conn)
End Function


Public Sub Close()
Try
If Me.Conn.State = ConnectionState.Open Then
Me.Conn.Close()
End If

Me.comando.Dispose()

' quito la recoleccion de basura porque
' ralentiza
' -
'Dim gc As System.GC
'gc.Collect()
'gc = Nothing
Catch ex As Exception
Finally

End Try

End Sub
'Close

Public Function existeBd() As Boolean
Return File.Exists(Me.localDatabaseFile)
End Function

' si no existe la bd la crea, pero no la borra si ya existe.
Public Sub CreateDBinicial()
' si no existe la base de datos la crea
Dim seguir As Boolean = True

Try
'// If database exists, delete it and create a new one
Dim archivo As String
archivo = Me.localDatabaseFile

If Not File.Exists(archivo) Then
Try
CreateDB()
Catch ex As Exception

End Try

End If
Catch ex As Exception
seguir = False

Finally
Me.Close()

End Try

End Sub


Public Sub CreateDB()
Dim archivo As String
archivo = Me.localDatabaseFile

Dim seguir As Boolean = True

Try


Me.Close()

'// If database exists, delete it and create a new one
If File.Exists(archivo) Then
Try
File.Delete(archivo)
Catch ex As Exception
End Try

End If
Catch ex As Exception
seguir = False
End Try


Try


' creamos una bd encriptada y con la clave del usuario.
Dim clave As String

' sin encriptar
' Dim sqlEngine As New SqlCeEngine("Data Source=" & archivo)

' encriptada -- no va encriptada para no tener que instalar
' el high encryption pack.
Dim sqlEngine As New SqlCeEngine("Data Source=" & archivo & ";password=" &
"" & "")


sqlEngine.CreateDatabase()
sqlEngine.Dispose()



Catch ex As SqlCeException
seguir = False
End Try

Try

If seguir Then
' ahora creamos las tablas
Dim sql As String


' tabla admins
sql = "CREATE TABLE admins ...

ExecuteSQL(sql)

' tabla valoraciones
sql = "CREATE TABLE ..


ExecuteSQL(sql)
End If

Catch ex2 As SqlCeException
MsgBox(ex2.Message)
Catch ex As Exception
Finally
Me.Close()

End Try

End Sub


' ejecuta el sql y devuelve un dataset

Public Function sqlDataTable(ByVal sql As String) As DataTable
Dim ds As New DataSet
Dim da As New SqlCeDataAdapter

Try

Me.open()
Me.GetCommand()

da.SelectCommand = Me.comando
da.SelectCommand.Connection = Me.Conn
'Me.comando.CommandText = sql
da.SelectCommand.CommandText = sql

da.Fill(ds)
Return ds.Tables(0)


Catch ex As SqlCeException
MsgBox(oUtil.ComposeSqlErrorMessage(ex))

Finally
da.SelectCommand.Dispose()
da.Dispose()

Conn.Close()
' Conn = Nothing

End Try

End Function


Public Function sqlDataset(ByVal sql As String, ByRef ds As
System.Data.DataSet)
Dim da As New SqlCeDataAdapter

Try
''Conn.Close()
'If Conn.State = ConnectionState.Closed Then
' Conn.ConnectionString = local_ConnString '"Data Source=" &
cc.LocalDBLocation & cc.LocalDBName
' Conn.Open()
'End If

Me.open()
Me.GetCommand()

' Create the SelectCommand instance to run a select query
da.SelectCommand = Me.comando 'New SqlCeCommand
' Set SelectCommand object properties
da.SelectCommand.Connection = Me.Conn
da.SelectCommand.CommandText = sql

da.Fill(ds)
Return ds


Catch ex As SqlCeException
MsgBox(oUtil.ComposeSqlErrorMessage(ex))

Finally
da.SelectCommand.Dispose()
da.Dispose()

Me.Close()
' Conn = Nothing

End Try

End Function

Public Sub ExecuteSQL(ByVal sSql As String)
'//Execute the query like Insert, Update and delete

Me.open()
Me.GetCommand()


Try
Me.comando.CommandText = sSql
Me.comando.ExecuteNonQuery()


Catch err As SqlCeException
MsgBox(oUtil.ComposeSqlErrorMessage(err))
Catch ComErr As Exception
MsgBox(ComErr.ToString, MsgBoxStyle.Information)
Finally

' Me.Close()
End Try

End Sub



Public Sub BackupLocalDatabase()
If File.Exists(cc.LocalDBLocation & cc.LocalDBName) Then
File.Copy(cc.LocalDBLocation & cc.LocalDBName, cc.LocalDBLocation &
cc.LocalDBName + "backup", True)
End If
End Sub


' esta funcion se supone que compacta la base de datos para que
' ocupe menos espacio

Private Function CompactDatabase()
Dim strTmpDBName As String = "/MyDocuments/tmpCompactedDatbase.sdf"
Dim objSqlCeEngine As SqlCeEngine

' Check to see if the local DB exists
If File.Exists(Me._local_DatabaseFile) Then
Try
' ' Compact the database to the new temporary location
objSqlCeEngine = New SqlCeEngine("Data Source=" & Me._local_DatabaseFile)
objSqlCeEngine.Compact("Data Source=" & strTmpDBName)
' ' Now delete the old database and move the new one back to the original
location
File.Delete(Me._local_DatabaseFile)
File.Move(strTmpDBName, Me._local_DatabaseFile)

Catch ex As SqlCeException
' ' Put your error handling code here
End Try ''

' Cleanup
objSqlCeEngine.Dispose()
End If
End Function
End Class

Public Class Utility

Public Function ComposeSqlErrorMessage(ByVal e As SqlCeException) As String
Dim errorCollection As SqlCeErrorCollection = e.Errors
Dim bld As New StringBuilder
Dim inner As Exception = e.InnerException
' Compose SQL Server CE error information into a single string
If Not (inner Is Nothing) Then
bld.Append(("Inner Exception: " & inner.ToString()))
End If

Dim err As SqlCeError
For Each err In errorCollection
bld.Append(ControlChars.Cr & "Error:" & err.HResult.ToString("X"))
bld.Append(ControlChars.Cr & err.Message)
bld.Append(ControlChars.Cr & "Native Error:" & err.NativeError)
bld.Append(ControlChars.Cr & err.Source)

Dim numPar As Integer
For Each numPar In err.NumericErrorParameters
If numPar <> 0 Then
bld.Append(ControlChars.Cr & "N-Parm:" & numPar.ToString())
End If
Next numPar
Dim errPar As String
For Each errPar In err.ErrorParameters
If errPar <> [String].Empty Then
bld.Append(ControlChars.Cr & "E-Parm:" & errPar)
End If
Next errPar
Next err

Return bld.ToString()

End Function



"ACP" escribió:

Hola,

es un error de sqlce 2.0 y quiere decir exactamente eso, que no tienes
bastante memoria libre en el dispostivo para que sqlce haga las operaciones
que le pides.

Cuanta memoria tiene tu dispositivo?? Como de grande es la base de datos??
que operaciones realizas sobre ella?? como haces estas operaciones?? liberas
bien los objetos que no utilizas?? has visto el progreso de la memoria usada
mientras ejecutas tu aplicación??

Echale un vistazo al foro de microsoft de sql ce, este error suele darse más
de lo que debería.

http://groups-beta.google.com/group...fb0617ecd0

Saludos

ACP


"David C." escribió:

> Hola,
>
> Alguien sabe que quiere decir esto cuando ejecuto un programa en VB.NET CF
> para PPC utlizando InTheHand?
> Es problema de Hardaware o problema de Software.
>
> El botón asiciado que siempre da el error hace varias inserciones en un
> DataGrid...
>
> Salu2
>
> David
>
>
>
email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaRespuesta Tengo una respuesta
Search Busqueda sugerida