谁帮忙看一下数据库的这个怎么用
如题所述,琢磨了一晚上没想出个名堂[ 本帖最后由 netegg 于 2008-10-5 19:42 编辑 ] 我用的是3.2.13.7.1
出现下面的错误是正常的:
ann.au3(1,24) : ERROR: Opt() called with illegal argument 1: "RunErrorsFatal"
Opt("RunErrorsFatal", 0)
------------------------------------------------------
但后面再出现了4个错误\18个报警:
E:\Downloads\Annu\ann.au3(24,113) : WARNING: $WS_OVERLAPPEDWINDOW: possibly used before declaration.
$gui = GuiCreate("Annuaire", 452, 340,(@DesktopWidth-452)/2, (@DesktopHeight-340)/2 , $WS_OVERLAPPEDWINDOW +
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\ann.au3(24,127) : WARNING: $WS_VISIBLE: possibly used before declaration.
$gui = GuiCreate("Annuaire", 452, 340,(@DesktopWidth-452)/2, (@DesktopHeight-340)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE +
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\ann.au3(24,145) : WARNING: $WS_CLIPSIBLINGS: possibly used before declaration.
$gui = GuiCreate("Annuaire", 452, 340,(@DesktopWidth-452)/2, (@DesktopHeight-340)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\ann.au3(29,87) : WARNING: $ES_WANTRETURN: possibly used before declaration.
$AnnInput = GuiCtrlCreateInput($AnnSearchData, 100, 10, 340, 20, $ES_WANTRETURN)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\ann.au3(32,87) : WARNING: $ES_READONLY: possibly used before declaration.
$AnnDisplay = GuiCtrlCreateInput($AnnFields, 100, 40, 340, 20, $ES_READONLY)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\ann.au3(44,109) : WARNING: $ES_MULTILINE: possibly used before declaration.
$AnnDisplay = GuiCtrlCreateInput($AnnFields, 100, 220, 340, 40, BitOR($ES_READONLY, $ES_MULTILINE)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\ann.au3(67,24) : WARNING: $AnnDb: possibly used before declaration.
dbDeleteRecord($AnnDb)
~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\ann.au3(68,30) : WARNING: $AnnNbRecord: possibly used before declaration.
dbInfo($AnnDb, $AnnNbRecord,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\ann.au3(68,44) : WARNING: $AnnNbfields: possibly used before declaration.
dbInfo($AnnDb, $AnnNbRecord, $AnnNbfields,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\ann.au3(68,58) : WARNING: $AnnRecordNo: possibly used before declaration.
dbInfo($AnnDb, $AnnNbRecord, $AnnNbfields, $AnnRecordNo)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\ann.au3(76,66) : WARNING: $AnnAddDisplay possibly not declared/created yet
$AnnAddDisplay = GuiCtrlCreateInput("", 100, 10, 340, 20)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\ann.au3(101,53) : WARNING: $AnnAddDisplay: possibly used before declaration.
$AnnFields[$i-1] = GUICtrlRead($AnnAddDisplay[$i])
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\ann.au3(101,54) : WARNING: $AnnFields possibly not declared/created yet
$AnnFields[$i-1] = GUICtrlRead($AnnAddDisplay[$i])
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\ann.au3(137,32) : WARNING: $AnnInput: possibly used before declaration.
$data = GUICtrlRead($AnnInput)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\ann.au3(138,30) : WARNING: $AnnSearchData: possibly used before declaration.
if $data <> $AnnSearchData Then
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\ann.au3(144,72) : ERROR: dbInfo() called with wrong number of args.
If $AnnNbRecord <= 0 then dbInfo($AnnDb, $AnnNbRecord, $AnnNbfields)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\DBFlib.au3(90,63) : REF: definition of dbInfo().
Func dbInfo($db, ByRef $nbrec, ByRef $nbfields, ByRef $curpos)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\ann.au3(152,36) : WARNING: $AnnFields: possibly used before declaration.
dbFieldsValues($AnnDb, $AnnFields,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\ann.au3(154,33) : WARNING: $AnnDisplay: possibly used before declaration.
GUICtrlSetData($AnnDisplay[$i],
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\ann.au3(156,28) : WARNING: $AnnStatus: possibly used before declaration.
GUICtrlSetData($AnnStatus,
~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\ann.au3(24,113) : ERROR: $WS_OVERLAPPEDWINDOW: undeclared global variable.
$gui = GuiCreate("Annuaire", 452, 340,(@DesktopWidth-452)/2, (@DesktopHeight-340)/2 , $WS_OVERLAPPEDWINDOW +
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\DBFlib.au3(110,90) : ERROR: DllStructPtr(): undefined function.
$resr = DllCall($dll_dbf, "int", "dbFieldsInfo", "str", $db, "ptr", DllStructPtr($sn)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\DBFlib.au3(112,23) : ERROR: DllStructDelete(): undefined function.
DllStructDelete($sn)
~~~~~~~~~~~~~~~~~~~~^
E:\Downloads\Annu\ann.au3 - 4 error(s), 18 warning(s)
其中报警全在ANN.AU3内,错误分开在两个脚本(各两个)。 原帖由 liongodmien 于 2008-10-3 08:22 发表 http://www.autoitx.com/images/common/back.gif
我用的是3.2.13.7.1
出现下面的错误是正常的:
ann.au3(1,24) : ERROR: Opt() called with illegal argument 1: "RunErrorsFatal"
Opt("RunErrorsFatal", 0)
------------------------------------- ...
哥们,你的热情我心领了,不过,这些错误我这也能看得到,就不劳你费心了,我问的是脚本到底有什么问题,怎么解决 再发一个数据库的,都帮帮忙看看 这是DBF格式的数据库,没有研究过。 原帖由 netegg 于 2008-10-3 14:56 发表 http://www.autoitx.com/images/common/back.gif
哥们,你的热情我心领了,不过,这些错误我这也能看得到,就不劳你费心了,我问的是脚本到底有什么问题,怎么解决
那些错误提示都是有说明错在什么地方的啦,为什么不按提示找到错误的地方然后DEBUG呢? 提示的是库文件问题,dll方面的我不熟
[ 本帖最后由 netegg 于 2008-10-3 15:21 编辑 ] 我只记得其中一个是145,72,函数调用缺一个数值(,总共4个,好像是缺最后一个),我也去看过那个FDBLIB。AU3,好像是没设默认值的!
由于我太菜了,后面的没看了!
[ 本帖最后由 liongodmien 于 2008-10-3 15:25 编辑 ] 原帖由 liongodmien 于 2008-10-3 15:20 发表 http://www.autoitx.com/images/common/back.gif
我只记得其中一个是145,72,函数调用缺一个数值(,总共4个,好像是缺最后一个),我也去看过那个FDBLIB。AU3,好像是没设默认值的!
由于我太菜了,后面的没看了!
没关系,其实,用数据库也是为了避免用dll文件,那个更麻烦,而且又不是很懂 我尽力修正一下。。。 :face (31): 脚本里用了两个可能是已经不再支持的函数:
DllStructDelete
和
DllStructPtr
期待Sanhen 的修改版,学习。。。。。。。
[ 本帖最后由 liongodmien 于 2008-10-3 15:55 编辑 ] QUOTE(FeReNGi @ May 15 2006, 12:49 PM)
DLLStuctPtr doesn't work. Autoit Complains about it.
Unknown funtion name.
Do we have missed an extra include ????
Might want to try DllStructGetPtr then. If you want the function or your using an old script that calls it, try adding this to the script.
CODE: AutoIt
Func DllStructDelete($stStruct)
$stStruct = 0
EndFunc sanhen, 太麻烦的话就算了,实在没办法还是用sqlite算了,只是如果帮助能中文化就好了,英文看着太费劲 麻烦了。。。修正了。调试没提示错误,也没有任何显示,运行就自动退出。。。。
郁闷了。。。检测到是运行dbOpen函数就自动退出了。实在要用,先用旧版编译吧。
页:
[1]
2