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;
Ïà¹ØÎÊ´ð£º
SQLITEÏÂÈçºÎɾ³ýÄÚÈÝÖеĵÚÒ»¸ö<br>
SQLITEϲ»ºÃÓÃ
Ìáʾ:
sqlite error
no such function: stuff
Ôõô½â¾ö?
SQL code:
--------------------------------------------- ......
ÎÒÖªµÀ´ó¼Ò¶¼ËµÊÇ64λϵͳϲ»ÄÜÓÃ32λµÄsyste.sqlite.dll¡£Õâ¸öÎÒÒѾ»»ÁË
VS2008ÖÐÔËÐж¼Ã»ÎÊÌ⣨ͬһϵͳÏ£©
Ò»·Åµ½IISÖоͱ¨´í£º
δÄܼÓÔØÎļþ»ò³ÌÐò¼¯¡°System.Data.SQLite¡±»òËüµÄijһ¸öÒÀÀµÏî¡£ÊÔͼ¼ÓÔظ ......
ÎÒÏëÔÚpdaÉÏÓÃSQLiteÊý¾Ý¿â£¬ÎÒ³ÌÐòÊÇqtдµÄ£¬µ«ÊÇÎÒÓ¦¸ÃÔõÑù½«SQLiteÒÆÖ²µ½winceƽ̨ÉÏÄØ£¬ÎÒÏÖÔÚÓÐÁËSQLite.dllºÍSQLite.lib£¬Ö®ºóÎÒ½»²æ±àÒëÉú³ÉÁË.exeÎļþ£¬ÎªÊ²Ã´ÔÚÄ£ÄâÆ÷Éϲ»ÄÜÔËÐÐÄØ£¿
ÆÚ´ýןßÊֻشð£¬Ð»Ð» ......
GUID£º0C3EDEE8-B14F-4220-8D64-990E00D84AF7
SELECT fldGuid, fldName, fldUserGuid from table
Äܲéѯ fldUserGuid Ϊ£º0C3EDEE8-B14F-4220-8D64-990E00D84AF7 µÄÊý¾ÝÒ»Ìõ
SELECT fldGuid, fldN ......
c# + sqlite ³ö´í£¡£¡£¡
File opened that is not a database file
file is encrypted or is not a database
ºÍÒÔÇ°Ò»ÑùµÄд£¬ÔõôÕâ´Î¾ÍÊDz»Ðа¡£¡£¡£¡
ÎÒ¿ì²»ÐÐÁË£¬´ó¼Ò°ï°ïÎÒ°¡£¡£¡£¡
¼û¹ýһƪÎÄÕÂÊÇ˵Õâ¸ö
......