c#Á¬½ÓSqliteÊý¾Ý¿âÎÊÌâ
ÎÒÓÃsqliteadmin½¨ÁËÒ»¸öÊý¾Ý¿âtest.sdb,¿ÉÊÇÔõôҲ´ò²»¿ªÌáʾÈçÏ´íÎó£ºFile opened that is not a database file
file is encrypted or is not a database¡£
ÎÒµÄÁ¬½Ó×Ö·û´®ÈçÏÂÂ¥ÉϵĿɲ»¿ÉÒÔ°ïÎÒ¿´¿´
System.Data.SQLite.SQLiteConnection conn =new System.Data.SQLite.SQLiteConnection();
System.Data.SQLite.SQLiteConnectionStringBuilder connstr
= new System.Data.SQLite.SQLiteConnectionStringBuilder();
connstr.DataSource = datasource;
connstr.Password = "admin";//ÉèÖÃÃÜÂ룬SQLite ADO.NETʵÏÖÁËÊý¾Ý¿âÃÜÂë±£»¤
conn.ConnectionString = connstr.ToString();
conn.Open();
string datasource = @"e:\data\test.sdb";
ÓÐûÓÐÈ˰¡£¬ÎÒÏÖÔÚ¿ÉÒÔÔÚ³ÌÐòÖн¨Ò»¸ö.sdbµÄÊý¾Ý¿âÒ²¿ÉÒÔÏòÀïд¶«Î÷¡£¿ÉÊÇÓÃSqlite AdministratorÈ´´ò²»¿ª³öÏÖÌáʾ£ºqAdmin£ºcannot perfrom this operation on a closed data test £¬ÓÐûÓиßÊÖÖªµÀÊÇʲôÎÊÌâÂð
Ïà¹ØÎÊ´ð£º
//C ½Ó¿Ú
extern "C"
{
TESSDLL_API int __cdecl GetTessText(const char *imagefile, char *text);
}
//ÎÒÔÚC#ÖÐÉùÃ÷
//µ÷ÓÃC DLL Öеĺ¯Êý
[DllImport("OCRapi.dll&quo ......
×î½üÔÚ×ö¸öÍøÉÏÉ̳ǣ¬¹ºÎﳵģ¿é£¬Ã»ÓÐ×ö¹ý£¬Âé·³¸÷λ°ïæ˵Ï´óÖÂ˵ÏÂ˼·£¬ÄÜ·¢Ò»·ÝÔ´Âë¸üºÃ¡£Ð¡µÜÏÈл¹ý¸÷λÁË£»
QQ£º413763818£»
eamil:swebook@126.com
ÍøÉÏÒ»´ó¶Ñ£¡
www.51aspx.com
ȥϠ......
SqlConnection conn = new SqlConnection("server = (local)\\sqlexpress;integrated security = SSPI;database = Northwind");
conn.Open();
Á¬½Ó²»ÉÏ£ ......
ÈçÌ⣺
C# code:
MySQLConnection con = new MySQLConnection( new MySQLConnectionString("localhost","beephpcms","root","root").AsString);
try
......