ca143508 Posted January 4, 2008 Share Posted January 4, 2008 (edited) Hi Guys, I have no idea where to start on this one as I haven't had to do anything SQL based within Autoit yet and was hoping someone can help me out. I want to create a GUI app which has 3 fields on it. File Name, Expiry Date & Category. Once the user fills out those fields and hits a submit button, I want it to write to a table called "Records" for example in the matching fields on a remote server running SQL 2000. Ideally it would be great to not have to have a system DSN configured on the machine if that is at all possible. Any help or advice you can give me would be fantastic. Thanks in advance guys. Michael. Edited January 4, 2008 by ca143508 Link to comment Share on other sites More sharing options...
ptrex Posted January 4, 2008 Share Posted January 4, 2008 @ca143508This is where you should start if you have never touched SQL before.SQL schoolregardsptrex 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...
ca143508 Posted January 4, 2008 Author Share Posted January 4, 2008 I have done work with SQL before. I know how to build queries etc but integrating into AutoIT is where I have no idea where to start. Link to comment Share on other sites More sharing options...
ptrex Posted January 4, 2008 Share Posted January 4, 2008 @ca143508 Maybe a good start is then to open the HELP file and type in "sqlite". 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...
MadBoy Posted January 4, 2008 Share Posted January 4, 2008 @ca143508Maybe a good start is then to open the HELP file and type in "sqlite".regards,ptrexPtrex i think he means MS SQL not SQLLITE. I've seen some MS SQL udf in examples forum i think. My little company: Evotec (PL version: Evotec) Link to comment Share on other sites More sharing options...
ptrex Posted January 4, 2008 Share Posted January 4, 2008 @ca143508Here is howe you would create a DNS less connection to SQLConnectionstringsregards,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...
ca143508 Posted January 14, 2008 Author Share Posted January 14, 2008 Ok - So I have got my SQL stuff sorted (Thanks to some code on the forum here which got me in the right direction). now I am only stuck on the GUI side of things. How to I get a GUI to call the function after the fields are filled in and use those entries to populate my dbase??? a copy of my SQL code is below. $dbname="master" $tblname="tbl1" $fldname="Feild1" $sqlCon = ObjCreate("ADODB.Connection") $sqlCon.Open("Driver={SQL Server};Server=127.0.0.1;Database=Master;Uid=MySQLUser;Pwd=MySQLPassword;") $SQL = "SELECT * FROM tbl1" $DSN_Connect = _getfield($SQL,$dbname,$fldname) Func _getfield($_SQL,$_dbname,$_fldname) dim $_output $adoCon = ObjCreate("ADODB.Connection") $adoCon.Open("Driver={SQL Server};Server=127.0.0.1;Database=Master;Uid=MySQLUser;Pwd=MySQLPassword;") $adoRs = ObjCreate ("ADODB.Recordset") $adoSQL = $_sql $adoRs.CursorType = 2 $adoRs.LockType = 3 $adoRs.Open($adoSql, $adoCon) $adoRS.AddNew $adoRS.Fields("Field1").Value = "InputField1" $adoRS.Fields("Field2").Value = "InputField2" $adoRS.Fields("Field3").Value = "InputField3" $adoRS.Fields("Field4").Value = "InputField4" $adoRS.Update $adoCon.Close EndFunc 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