chenronting 发表于 2010-12-25 17:33:08

回复 14# kingfirekkk


    你好, 我昨天试验都很成功, 很感谢你的帮助, 今天的话,好像文件又新建不了了,不知道是什么问题呢?你这个DLL文件有没有使用次数的限制?真是麻烦你了

chenronting 发表于 2010-12-27 16:48:45

回复 14# kingfirekkk

你好, 我现在用你在 6 楼放出的代码(未作修改)也无法新建出 DB 数据库文件,不知道是什么问题?能帮帮我吗,嘿,谢谢了

kingfirekkk 发表于 2010-12-29 08:32:38

回复 17# chenronting

楼主问的问题确实有,我也不知道怎么回事,代码在WIN7的机器上面能够执行,但在Winxp的机器上面执行了没有反应。
楼主可以注册一下那个DLL文件试试看看..
另外,6楼的代码,有两个地方的注释符号“;”分号是全角字符,请贴下面这一段再试:


#include <SQLite.au3>
; don't include sqlite.dll.au3 !!!
_SQLite_Startup ("System.Data.SQLite.dll")    ;初始化DLL库文件;
;~ ConsoleWrite(_SQLite_LibVersion() & @LF)          ;显示SQLite版本
_SQLite_Open(@ScriptDir&"\test.db") ;打开数据库文件,此处可以自行定义数据库文件路径
_SQLite_Exec(-1, "pragma key = 'andrew is happy!';" & _   ;此行将key=后面的内容换成你自己需要的内容,即可修改密码了。
"Create table if not exists tblTest (a,b int,c single not null);" & _               ;如果不存在表tbltest,则新建一个表,表格内容为,A,B,C三栏,其中B为int类型,C为Single并不为空值
                "Insert into tblTest values ('1',2,3);" & _                                  ;往数据库中插入数据
                "Insert into tblTest values (Null,5,6);")                                     ;往数据库中插入数据
Local $row      ;定义$row,用于显示Row的内容
_SQLite_Exec(-1,"Select oid,* From tblTest","_cb") ;      ;选定表格,同时使用_CB这个UDF来显示整个表格内容            
;~ ConsoleWrite($row & @LF)
_SQLite_Close()      ;关闭数据库
_SQLite_Shutdown(); 解除SQLite.dll

Func _cb($aRow)   ;UDF _CB
    For $s In $aRow
      ConsoleWrite($s & @TAB)
    Next
    ConsoleWrite(@CRLF)
    ; Return $SQLITE_ABORT ; Would Abort the process and trigger an @error in _SQLite_Exec()
EndFunc

chenronting 发表于 2010-12-29 17:32:05

回复 18# kingfirekkk


    你好, 谢谢你的回答 ,我这里再次用你的方法试验了一下, 你说的是注册一下那个DLL,我这里百度过来, 注册时提示(LoadLibrary("D:\System.Data.SQLite.dll") 失败 - 找不到指定的模块。)
页: 1 [2]
查看完整版本: [未解决]求助关于如何加密SQL数据库(内详)