SQLite有办法透过网络连接吗?
目前在公司的linux pc上有一个SQLite server, 我想用在同个区網底下的win pc去连接SQLite server用ASP進行操作, 请问有办法办到吗? 还是SQLite server无法支持网络连接....找了一个下午
剛才我自己試了下, 底下是我的ASP code, mydb目前是我自己在本機上建出來的sqlite文件, 意思是只要把Linux上那個db文件分享出來, windows只能抓到該檔就能進行操作嗎, 不知道有沒有同步上的問題?
<%
Set conn = Server.createObject("ADODB.Connection") '建立一個連線
Set rs = Server.createObject("ADODB.RecordSet") '建立一個recordset
conn.open "DRIVER={SQLite3 ODBC Driver};Database=C:\mydb"
rs.open "select * from Tab_ID",conn,1,3
Do While not rs.EOF
Response.Write rs("ID") & " <br>" & rs("Name")
rs.movenext
Loop
rs.close '關閉recordset
Set rs = Nothing '將recordset設為nothing
conn.close '關閉連線
%>
};Database=C:\mydb"
这是你本地C盘的,当然不是LINUX上的,LINUX你需要用SAMBA来把文件共享出来。
謝謝^^ 明天到公司試試看!
相关问答:
我现在手头有这么一个问题,我想让一个操作sqlite3的程序在一个ARM板子上跑起来,板子上的os是wince5.0。
我是这么做的,我先从sqlite3主页下载源码下来,有这么3个文件:sqlite3.c、sqlite3.h、sqlite3ext.h , ......
如下语句 :
select TimeSpan from T_Table where onlineDate = '2009-12-2'
数据库里面有符合条件的值但是查不出来
如果改成如下:
select TimeSpan from T_Table where onlineDate = '200 ......
程序代码如下:
sqlTime = "select SUM(onlineTimeSpan) from T_OnlineTimeSum where ipAddress = :a AND onlineDate BETWEEN :b AND :c";
  ......
在vs2005中引用了using System.Data.SQLite;
定义了一个连数据库连接变量public SQLiteConnection dBConn;
就报下面这个错误了.
The type 'System.Data.Common.DbConnection' is defined in an ass ......
SqlServer中这样统计:
select name from sysobjects where xtype='U'
要知道总数的话就简单了:
select count(*) from sysobjects where xtype='U'
Oracle中这样查询:
Sele ......