yucatan Posted July 7, 2008 Share Posted July 7, 2008 hi i have a TCP login created but now i wanne add some more functions in the prog and i need a database with that _SQLite what is that ? can i use it to store messages b.v. when i log in i can see that peopel have send me a message ? Link to comment Share on other sites More sharing options...
weaponx Posted July 7, 2008 Share Posted July 7, 2008 _SQLite is meant for runtime databases, meaning databases that are only stored in memory for the duration of your script. If you need to query a SQL server you need to find the SQL UDF or search for ADODB. Link to comment Share on other sites More sharing options...
Dead Posted July 7, 2008 Share Posted July 7, 2008 (edited) Example expandcollapse popup#include <SQLite.au3> #include <SQLite.dll.au3> #include <File.au3> #include <Array.au3> $Database = @ScriptDir & "\Database.db";Location Of Database file ;Creates The Database file if it does not exist If FileExists($Database) = 1 Then _FileCreate($Database) EndIf #Region;Write To Database File _SQLite_Startup();Starts SQLite _Sqlite_Open($Database);Opens Up Database ;Title is the Column title in the database ;BLOB Means Write The data as it is entered in to the database _SQLite_Exec(-1, "Create table If Not Exists tbltest (Title BLOB);");Creates a Table called tbltest if it does not exist _SQLite_Exec(-1, "Insert into tbltest values ('ENTER YOUR DATA HERE');");Inputs data in to tbltest _SQLite_Close();closes database _SQLite_Shutdown();shutsdown SQLite #EndRegion #Region; Read Data From Database File Local $aResult, $iRows, $iColumns, $var _SQLite_Startup() _Sqlite_Open($Database) $var = _SQLite_GetTable (-1, "SELECT * FROM tbltest;", $aResult, $iRows, $iColumns);Reads all of the data from the database If $var = $SQLITE_OK Then;IF Every thing is ok Display the array _ArrayDisplay($aResult, "") Else MsgBox(16, "SQLite Error: " & $var, _SQLite_ErrMsg ()) EndIf _SQLite_Close() _SQLite_Shutdown() #EndRegion Edited July 7, 2008 by Dead Link to comment Share on other sites More sharing options...
ChrisL Posted July 7, 2008 Share Posted July 7, 2008 _SQLite is meant for runtime databases, meaning databases that are only stored in memory for the duration of your script. If you need to query a SQL server you need to find the SQL UDF or search for ADODB.How's that then?I have several scripts that use sqlite successfully with a permanent database. Also the sqlite site shows how it can use quite large database's. The examples show in memory database but if you specify a path in the _SQLite_Open () function it is then a permanent database that can be accessed by another script. You can have multiple reads on a single database but only 1 write which you deal with using the timeout feature. Or have I missed your point? [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
weaponx Posted July 7, 2008 Share Posted July 7, 2008 How's that then?I have several scripts that use sqlite successfully with a permanent database. Also the sqlite site shows how it can use quite large database's. The examples show in memory database but if you specify a path in the _SQLite_Open () function it is then a permanent database that can be accessed by another script. You can have multiple reads on a single database but only 1 write which you deal with using the timeout feature. Or have I missed your point?Well for one the OP was asking about TCP functions so the database must be remote. Secondly, the SQLite storage file is proprietary and has nothing to do with an actual SQL database, if he is wanting to open an existing SQL DB with SQLite that will not work. Link to comment Share on other sites More sharing options...
ptrex Posted July 8, 2008 Share Posted July 8, 2008 @weaponxWell for one the OP was asking about TCP functions so the database must be remote. Secondly, the SQLite storage file is proprietary and has nothing to do with an actual SQL database, if he is wanting to open an existing SQL DB with SQLite that will not work.I think you don't know what you are talking about !! muttley @ChrisLYou are totally correct.Regards,ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
weaponx Posted July 8, 2008 Share Posted July 8, 2008 @weaponxI think you don't know what you are talking about !! muttley @ChrisLYou are totally correct.Regards,ptrexThe OP was asking about TCP functions, implying a need for ADO access to SQL. I was saying SQLite is meant to be standalone and its purpose is not to connect to a Microsoft SQL server. SQLite does offer the ability to open and store database files in its own proprietary format. Link to comment Share on other sites More sharing options...
ptrex Posted July 8, 2008 Share Posted July 8, 2008 @weaponxI am totally not agreeing with your statement._SQLite is meant for runtime databases, meaning databases that are only stored in memory for the duration of your script.I am not sure where you ever got that from ? SQLite is a full fletched database, with all main functionality you might need. Except not being client - server, doesn't mean the database file can't be stored on a server.And there is a flavour of SQLite that does support client - server functionality. But it is not for free.Unless someone makes a AU3 version of the client - server, for free.regardsptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 8, 2008 Moderators Share Posted July 8, 2008 @weaponxI am totally not agreeing with your statement.I am not sure where you ever got that from ? SQLite is a full fletched database, with all main functionality you might need. Except not being client - server, doesn't mean the database file can't be stored on a server.And there is a flavour of SQLite that does support client - server functionality. But it is not for free.Unless someone makes a AU3 version of the client - server, for free.regardsptrexYou have my vote muttley . Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
weaponx Posted July 8, 2008 Share Posted July 8, 2008 @weaponxI am totally not agreeing with your statement.I am not sure where you ever got that from ? SQLite is a full fletched database, with all main functionality you might need. Except not being client - server, doesn't mean the database file can't be stored on a server.And there is a flavour of SQLite that does support client - server functionality. But it is not for free.Unless someone makes a AU3 version of the client - server, for free.regardsptrexWhy did you quote my original response? I re-explained it more clearly. I think the misunderstanding here is due to the OP not clearly stating his intention. Link to comment Share on other sites More sharing options...
yucatan Posted July 10, 2008 Author Share Posted July 10, 2008 _SQLite is meant for runtime databases, meaning databases that are only stored in memory for the duration of your script. If you need to query a SQL server you need to find the SQL UDF or search for ADODB.i know but why i cant use sqlite because my server.exe is always running the client ask for data via tcp..so then its always runnign right ? Link to comment Share on other sites More sharing options...
weaponx Posted July 10, 2008 Share Posted July 10, 2008 i know but why i cant use sqlite because my server.exe is always running the client ask for data via tcp..so then its always runnign right ?If your server is running a script that uses SQLite then the database would always be available to TCP clients. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now