C#¶ÁдAccessÊý¾Ý¿âµÄOLE¶ÔÏó×Ö¶Î
£¨Ò»£©°ÑÎļþÄÚÈÝдÈëAccessÊý¾Ý¿âµÄOLE¶ÔÏó×Ö¶ÎÖУº
if (File.Exists(txtBrow.Text) != false) // Îı¾¿òtxtBrowÖÐÄÚÈÝΪÎļþ·¾¶¼°ÎļþÃû
{
//»ñÈ¡Îļþºó׺
FileInfo p = new FileInfo(txtBrow.Text.Trim());
F_str_Type = p.Extension.ToLower();
if (F_str_Type.Length > 5)
{
MessageBox.Show("²»¿Éʶ±ðµÄÎļþ¸ñʽ£¬ÇëÖØÐÂÈ·ÈÏ£¡","¾¯¸æ");
return;
}
//ÅжÏÎļþ´óС
if (p.Length == 0)
{
MessageBox.Show("ÎļþµÄ´óСΪ“0”£¬²»Äܱ£´æ£¡", "¾¯¸æ");
return;
}
//´´½¨Îļþ¶ÔÏóÒÔ´ò¿ªµÄÐÎʽ¶ÁÈ¡Îļþ
FileStream sFileStream = new FileStream(txtBrow.Text, FileMode.Open);
//·ÖÅäÊý×é´óС
byte[] bFile = new byte[sFileStream.Length];
//½«ÎļþÄÚÈݶÁ½øÊý×é
sFileStream.Read(bFile, 0, (int)sFileStream.Length);
//¹Ø±ÕÎļþ¶ÔÏó
sFileStream.Close();
//²éÕÒÎĵµÀà±ðºÅ
OleDbDataReader topicread = SaveConn.GetReader("select File_ID from FileTopic where File_Topic='" + cbbTopic.Text.Trim() + "'");
//Read()·½·¨ÓÃÀ´¶ÁÈ¡OleDbDataReader¶ÔÏóÖеļǼ
topicread.Read();
T_int_Topic=(int)topicread["File_ID"];
OleDbConnectio
Ïà¹ØÎĵµ£º
MSSQL:
declare @begin datetime
declare @End datetime
set @begin=getdate()
--Ö´ÐеÄÓï¾äдÔÚÕâÀï
set @End=getdate()
select datediff(millisecond,@begin,@End) as Ö´ÐеÄʱ¼ä
--millisecond±íʾºÁÃë Èç¹û¿´Ãë¿ÉÒÔʹÓÃss
C#:
ºÜ¶àʱº ......
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
this.comboBox2.Items.Clear();
switch(this.comboBox1.SelectedIndex)
  ......
vc±à³ÌdebugʱÌáʾ
First-chance exception in exShowBmp.exe (HOOKDLL.DLL): 0xC0000005: Access Violation.
First-chance exception in exShowBmp.exe: 0xC0000005: Access Violation.
¿ÉÄܵÄÔÒò:
ÄÚ´æ·ÃÎÊ´íÎó¡£Ó¦¸ÃÊÇ·ÃÎÊÁ˲»¸Ã·ÃÎʵĵط½£¬¿ÉÄÜÊÇʹÓÓҰָÕë”·ÃÎÊÔì³ÉµÄ¡£±ÈÈç·ÃÎÊÒ»¸öÒѾÊÍ·ÅÁ覄 ......