Joboy2k 8 Posted August 8, 2010 hey guys. iv started to venture in to the sqlite commands and im hitting the same error which is prohibiting me from learning how to use it. i keep getting this error message ! SQLite.au3 Error --> Function: _SQLite_Open --> Error: Library used incorrectly i then borrowed this code from another help topic to see if it was just me not understanding what im doing but i got the same error message expandcollapse popup#include <iNet.au3> #include <SQLite.au3> #include <SQLite.dll.au3> #include <Array.au3> $treeviewini = @DesktopCommonDir&"\ini.ini" iniwrite($treeviewini,1,1,1) Func _ScanNetwork() $StartIP = StringSplit(IniRead( $TreeViewINI, "Configure", "Scan Range Begin","NotFound"),".") $EndIP = StringSplit(IniRead( $TreeViewINI, "Configure", "Scan Range End","NotFound"),".") Dim $aIp1[5] Dim $Result SplashTextOn("Network Scan", "Scanning...", 200,200, -1, -1, 20, "") for $i =$StartIP[1] to 255 for $j = $StartIP[2] to 255 for $k =$StartIP[3] to 255 for $L = $StartIP[4] to 255 $ip = ($aIp1[1] + $i) & "." & ($aIp1[2] + $j) & "." & ($aIp1[3] + $k) & "." & ( $aIp1[4] + $l ) $ping = Ping($ip,1) if $ping then $Result = $ip & " is on" TCPStartup() $Hostname = _TCPIpToName ($ip) TCPShutdown () If @error Then MsgBox(0, "_TCPIpToName()", "@error = " & @error & @LF & "@extended = " & @extended) Else _SQLite_Startup () _SQLite_Open (@Scriptdir & "\database\test.db") $qq = _SQLite_Exec (-1, "INSERT INTO PCInfo(Name, IP) VALUES ('" & $Hostname & "', '" & $ip & "');") ;msgbox(0,$SQLITE_OK,@error) _SQLite_Close() _SQLite_Shutdown() EndIf Else $Result = $ip & " is off" endif ControlSetText("Network Scan", "", "Static1", $Result) ;Test to see if we are at the last IP. If so, break the loop If $i & $j & $k & $L= $EndIP[1] & $EndIP[2] & $EndIP[3] & $EndIP[4] Then $AtEndofIPRange = 1 ExitLoop EndIf Next If $AtEndofIPRange = 1 then ExitLoop Next If $AtEndofIPRange = 1 then ExitLoop Next If $AtEndofIPRange = 1 then ExitLoop next ;Sleep(1000) SplashOff() EndFunc _scannetwork() obviously i know the problem is in this section and i think its go to do with the _SQLite_open command but i dont understand whats wrong _SQLite_Startup () _SQLite_Open (@Scriptdir & "\database\test.db") $qq = _SQLite_Exec (-1, "INSERT INTO PCInfo(Name, IP) VALUES ('" & $Hostname & "', '" & $ip & "');") ;msgbox(0,$SQLITE_OK,@error) _SQLite_Close() _SQLite_Shutdown() please help because its gone over my head why i cant figure it out. thank you Share this post Link to post Share on other sites
Joboy2k 8 Posted August 8, 2010 im sorry i found the reason. i didnt realice that the SQLite open command didnt create the directory also. i just tried it and it works im sorry for the waste of your time reading this. thanks anyway Share this post Link to post Share on other sites
PsaltyDS 39 Posted August 9, 2010 No problem, thanks for posting the resolution rather than just abandoning the topic. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Share this post Link to post Share on other sites