找回密码
 加入
搜索
查看: 4640|回复: 5

sqlite如何打开带密码的数据库文件?

[复制链接]
发表于 2009-4-20 11:09:41 | 显示全部楼层 |阅读模式
sqlite如何打开带密码的数据库文件?
_SQLite_Open ( )好像只有个路径,数据库有密码的怎么打开呢?

[ 本帖最后由 ydpd 于 2009-4-20 11:31 编辑 ]
发表于 2009-7-22 01:57:34 | 显示全部楼层
$pro= ObjCreate("ADODB.Connection")
$RS = ObjCreate("ADODB.Recordset")
$pro.Open ("driver={SQL Server};server=192.168.0.251;uid=test;pwd=test;database=test")
$RS.ActiveConnection = $pro
$sql='select top 1 dtTime1 FROM tLogs ORDER BY dtTime2 DESC '
$RS.Open($sql)
While (Not $RS.eof And Not $RS.bof)
$a=$RS.Fields (0).value
$y=StringMid($a,1,4)
$m=StringMid($a,5,2)
$d=StringMid($a,7,2)
$t1=StringMid($a,9,2)
$t2=StringMid($a,11,2)
$t3=StringMid($a,13,2)
MsgBox(0,"",$y & '/' &$m & '/' & $d & ' ' & $t1 & ':' & $t2 & ':' & $t3)
MsgBox(0,"",$a)
$RS.movenext
        WEnd
        $RS.close
        $pro.close 
看看对你有无帮助
发表于 2009-8-4 23:18:21 | 显示全部楼层
LS你给出的例子是用于mssql server连接的,并不是LZ想要的,LZ需要的是sqlite的。
不过可惜的是,我也不知道怎办~sqlite有密码吗?
发表于 2010-3-3 17:06:22 | 显示全部楼层
这个问题解决了?
发表于 2010-3-17 11:00:46 | 显示全部楼层
关注中
发表于 2012-11-25 18:12:27 | 显示全部楼层
是呀,解决了?
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-29 17:38 , Processed in 0.100445 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表