±£´æÎļþµ½AccessÊý¾Ý¿âÖÐ - .NET¼¼Êõ / C#
C# code:
//±£´æÎļþµ½AccessÊý¾Ý¿âÖÐ
FileInfo fi=new FileInfo(fileName);
FileStream fs=fi.OpenRead();
byte[] bytes=new byte[fs.Length];
fs.Read(bytes,0,Convert.ToInt32(fs.Length));
OleDbCommand cm=new OleDbCommand();
cm.Connection=cn;
cm.CommandType=CommandType.Text;
if(cn.State==0) cn.Open();
cm.CommandText="insert into "+tableName+"("+fieldName+") values(@file)";
OleDbParameter spFile=new OleDbParameter("@file",OleDbType.Binary);
spFile.Value=bytes;
cm.Parameters.Add(spFile);
cm.ExecuteNonQuery()
@fileÊÇʲô¶«Î÷£¿£¿£¿£¿ ¿´²»¶®
ÊÇÊý¾Ý±íÖеÄ×Ö¶ÎÃû×Ö»¹ÊdzÌÐòÖж¨ÒåµÄ±äÁ¿£¿
ÊÇʲôÀàÐ͵İ¡£¿
³ÌÐòÖж¨ÒåµÄ
×Ö·û´®ÀàÐÍ
... ²»ºÃÒâ˼£¬Ë¢ÐÂÂýÁË¡£Ì
Ïà¹ØÎÊ´ð£º
txt ºÍXML ¸ñʽÏàÓ¦
²»½èÖúDataSet
µ¼Èë¶ÁÈ¡TXTÎļþ
È»ºóÖ±½ÓдÈëXML(ͬһÎļþ,²»Í¬Êý¾Ý,µÝÔöÔÊý¾ÝûÓб»¸²¸ÇÇé¿öÏÂÔö¼ÓÊý¾Ý.)
½Ì¸öÒªµã»ò×îºÃÊÇÓиö´úÂëÌáʾµÄ
¹ý·ºÃºº °ï¸öæÈö^^
²»»á£¬°ïÂ¥Ö÷ ......
rt£¬ÎÒÊÔÁËÍøÉÏÖ±Á¬AccesÊý¾Ý¿âµÄ·½·¨,windowsÏÂûÓÐÎÊÌâ,µ«ÊÇÔÚlinuxϲ»ÐУ¬ËÄܸøµãÌáʾ£¿Ð»Ð»
ÄãÔõôÁ¬µÄ£¿
AccesÊý¾Ý¿â..
ÄãÔõôÁ·µÄÄØ£¿
Java code:
static String DBDRIVER = "sun.jd ......
¹«Ë¾¿ª·¢Ò»¸ö´¥ÃþÆÁ³ÌÐò£¬ÎÒ¸ºÔðµÄÒ»¿é£¬ÊµÏÖÕâÑùÒ»¸ö¹¦ÄÜ£¬µ±Êó±êµã»÷´°¿ÚÖÐͼƬ£¨Ò»ÕÅͼ·Ö³É¼¸²¿·Ö£©µÄÆäÖÐÒ»²¿·Öʱ£¬½«Õⲿ·ÖͼƬ½ØÈ¡³öÀ´£¬µ¯³öеĴ°¿Ú£¬½«½ØÈ¡³öµÄͼƬÏÔʾ³öÀ´¡£ÎÒʹÓÃRectangeÀà¿ØÖÆÁË·µ»Ø£¬ ......
ÔÚAccessµÄ²éѯÖÐÖ´ÐÐÏÂÃæµÄÓï¾ä,ÎÞЧ,ÌáʾÆÚ´ýselect ,updata ,...
CreateTble C=Answer N="»ØÌû±í"
(
C=ID T="INTEGER" P=No M=No N="񅧏" Z=false,
C=Ques ......