SqliteÎÞ·¨¸üÐÂ
C# code:
public static bool UpdateFriendUrl(int id, string cnName, string jpName, string logoUrl, string site, int order)
{
string sql = "update FriendUrl set SiteNameCN=@SiteNameCN,SiteNameJP=@SiteNameJP,SiteLogo=@SiteLogo,SiteUrl=@SiteUrl,
SiteSort=@SiteSort where ID=@ID";
using (SQLiteConnection cn = new SQLiteConnection(ConnString))
{
using (SQLiteCommand cmd = new SQLiteCommand())
{
cn.Open();
cmd.Connection = cn;
cmd.CommandText = sql;
cmd.CommandType = CommandType.Text;
cmd.Parameters.Add("@ID", DbType.Int32).Value = id;
cmd.Parameters.Add("@SiteNameCN", DbType.String, 100).Value = cnName;
cmd.Parameters.Add("@SiteNameJP", DbType.String, 100).Value = jpName;
cmd.Parameters.Add("@SiteLogo", DbType.String, 100).Value = logoUrl;
cmd.Parameters.Add("@SiteUrl", DbType.String, 100).Value = site;
cmd.Parameters.Add("@SiteSort", DbType.Int32).Value = order;
try
{
cmd.ExecuteNonQuery();
return true;
}
catch
{
return false;
Ïà¹ØÎÊ´ð£º
»·¾³£ºQNX 6.3.2
°æ±¾£ºSQLite 2.7.3
ÏÖÏó£ºÔÚÃüÁîÐÐÏÂsqlite½øÈ¥£¬Ö´ÐÐ.table¡¢pragmaÖ®Àà¡¢select¶¼Ìáʾ
database is locked
Ææ¹ÖµÄÊÇ£¬¼´Ê¹ÊÇд´½¨Ò»¸öÊý¾Ý¿â£¬Ö´ÐÐÉÏÊöÃüÁîÒ²ÊÇÄÇÑù¡£
Áí£ºÔÚһ̨Íê ......
СµÜ Ūµã¶«Î÷¿ÉÊǵ÷Óà sqlite3_prepare Õâ¸öº¯Êý select ¾ÍºÃʹ Ö»Òª ¸Ä±äÊý¾Ý¿â µÄ¾Í²»ÐÐ ±ÈÈçinsert Ö®ÀàµÄ ËÀ´°ï¸öæ°¡ ÇëÎÊÕâÊÇʲôÔÒò °¡ Óà c ȥʵÏÖµÄ
ÄãÓõÄʲô¹¤¾ß°¡?
°ÑÄã×Ô¼ºµÄ´úÂë·¢ ......
ÒªÔÚlinuxÉÏʹÓÃsqliteÊDz»ÊÇÒªÏȱàÒë°²×°£¿Ôõô°²×°£¿
c#+sqlite+linuxµÄÏà¹ØÓ¦ÓÃÓÐûÓÐһЩÏà¹Ø×ÊÁÏ£¿
linux ÉÏÄÜÔËÐУ㣡¡?
Äã¿ÉÒÔÏÂÔØ±àÒëºÃµÄ£¬Ò²¿ÉÒÔÏÂÔØÔ´´úÂëÔÙ×Ô¼º±àÒë
http://www.sqlite.org/downl ......
ÇëÎʸ÷λ´ó¸ç,ËÓÐÉú³É·ÃÎÊsqliteÊý¾Ý¿âµÄ´úÂëÉú³ÉÆ÷,·üÍû´ó¼Ò°ïæ...
СµÜ¼±ÓÃ
wuyq11
(ÈËÉúÈçÃÎ) ÄúºÃ,wuyq11
UcfarDBAÊÇÔõôʹÓõÄ,СµÜ¿´µ½ÀïÃæÖ»ÓÐcstÎļþ,Ó¦¸ÃÊÇÄ£°å,ÕâЩģ°åÒªÔõÃ´Ê ......