存储空间不足.... [英] Not enough storage....
本文介绍了存储空间不足....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好
当我从一种形式输入到另一种形式时出现一个问题,如果有人可以帮助我,则出现错误没有足够的存储空间来完成此操作",我使用的编程语言是c#
[OP的答案移到了这里]
使用Motorola MC75的设备具有足够的内存,超过90MB,并且TaskManager中的所有进程均关闭.
Hello
I have a problem when making of entering from one form to another appears to me an error "not enough storage is available to complete this operation" if someone can help me, a programming language in which I work is c #
[OP''s answer moved to here]
The device on which work is Motorola MC75 has enough memory over 90MB, and all processes in the TaskManager off
namespace MotorolaSmartphon
{
public partial class Form1 : Form
{
private GPS sl = null;
private Symbol.Barcode.Reader myReader = null;
private Symbol.Barcode.ReaderData myReaderData = null;
public string id_unosa;
public Form1()
{
InitializeComponent();
BarcodFunkcija();
FunkcijaZaUcitavanje();
}
private void menuItem1_Click(object sender, EventArgs e)
{
this.Close();
}
private void Form1_Load(object sender, EventArgs e)
{
FunkcijaZaUcitavanje();
}
public void BarcodFunkcija()
{
myReader = new Symbol.Barcode.Reader();
myReaderData = new Symbol.Barcode.ReaderData(Symbol.Barcode.ReaderDataTypes.Text, 7905);
myReader.Actions.Enable();
myReader.ReadNotify += new EventHandler(myReader_ReadNotify);
myReader.Actions.Read(myReaderData);
}
void myReader_ReadNotify(object sender, EventArgs e)
{
Symbol.Barcode.ReaderData nextReaderData = myReader.GetNextReaderData();
this.textBox1.Text = nextReaderData.Text;
myReader.Actions.Read(myReaderData);
SqlCeConnection connn = null;
connn = new SqlCeConnection(@"Data Source=" + GetExePath() + "\\MC75.sdf");
try
{
connn.Open();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
SqlCeCommand cmd = connn.CreateCommand();
try
{
cmd.CommandText = ("INSERT INTO Unos(Barcod) values" + "(" + nextReaderData.Text + ")");
cmd.ExecuteNonQuery();
}
catch (Exception ex)
{
//MessageBox.Show(ex.ToString());
}
dataGrid1.DataSource = FunkcijaZaUcitavanje();
connn.Close();
}
static DataTable FunkcijaZaUcitavanje()
{
string SqlCeConnection = (@"Data Source=" + GetExePath() + "\\MC75.sdf");
SqlCeConnection sqlConnection = new SqlCeConnection(SqlCeConnection);
sqlConnection.Open();
SqlCeDataAdapter sqlCommand = new SqlCeDataAdapter("select * from unos", sqlConnection);
DataTable tabelazagrid = new DataTable();
sqlCommand.Fill(tabelazagrid);
return tabelazagrid;
}
static string GetExePath()
{
return (System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase));
}
private void Form1_Closing(object sender, CancelEventArgs e)
{
myReader.Actions.Flush();
myReader.Actions.Disable();
myReaderData.Dispose();
myReader.Dispose();
}
private void button1_Click(object sender, EventArgs e)
{
try
{
myReader.Dispose();
}
catch (Exception exx)
{
}
string p;
p = takePicture();
}
private string takePicture()
{
string result = null;
CameraCaptureDialog cameraDialog = new CameraCaptureDialog();
cameraDialog.Mode = CameraCaptureMode.Still;
cameraDialog.StillQuality = CameraCaptureStillQuality.High;
cameraDialog.Resolution = new Size(640, 480);
if (cameraDialog.ShowDialog() == DialogResult.OK)
{
result = cameraDialog.FileName;
}
this.Show();
cameraDialog.Dispose();
return result;
}
private void button3_Click(object sender, EventArgs e)
{
BarcodFunkcija();
}
private void DeleteDataMenuItem_Click_Click(object sender, EventArgs e)
{
SqlCeConnection connn = null;
DialogResult result3 = MessageBox.Show("Brisanje izabranog reda?", "The Question", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question,
MessageBoxDefaultButton.Button2);
if (result3 == DialogResult.Yes)
{
connn = new SqlCeConnection(@"Data Source=" + GetExePath() + "\\MC75.sdf");
try
{
SqlCeCommand SL = new SqlCeCommand(" DELETE FROM Unos where ID = " + Convert.ToInt32(id_unosa), connn);
connn.Open();
SL.ExecuteScalar();
connn.Close();
}
catch (SqlCeException ex)
{
MessageBox.Show(ex.Message.ToString());
}
finally
{
FunkcijaZaUcitavanje();
connn.Close();
}
}
}
private void dataGrid1_Click(object sender, EventArgs e)
{
id_unosa = dataGrid1[dataGrid1.CurrentCell.RowNumber, dataGrid1.CurrentCell.ColumnNumber].ToString();
}
private void button2_Click_1(object sender, EventArgs e)
{
GPS GPS = new GPS();
GPS.Show();
}
}
}
推荐答案
似乎您应该在更多的RAM上进行投资,尝试杀死所有其他进程.也许您必须检查是否有足够的可用磁盘空间,但是我认为这是因为RAM不足.
问候
Seems you should invest in some more RAM, try to kill all other processes. Maybe you have to check for enough free disc space, but I think it''s because of not enough RAM.
Regards
这篇关于存储空间不足....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文