HansH Posted August 28, 2005 Share Posted August 28, 2005 Small application in autoit for doing QDBC queriesChanges:- menu functions are now all functioning- changed variablenames and added more comments- added cliboard and save to file for results.- window resizing now corrected, final bug will be fixed in 3.1.1.71Todo:- further improve catalog layout.You can download the latest version here : http://www.autoitscript.com/fileman/users/HansH/ODBCquery.au3Have funHans Link to comment Share on other sites More sharing options...
awrog Posted August 29, 2005 Share Posted August 29, 2005 Hans, This version works really perfect! Thank you for your effort and keep up the good work! Arno Rog Link to comment Share on other sites More sharing options...
steve8tch Posted August 30, 2005 Share Posted August 30, 2005 Would it take alot of changes to have an option to point the script to an Access mdb file and query the mdb file directly without setting up an ODBC connection? Link to comment Share on other sites More sharing options...
Gigglestick Posted August 30, 2005 Share Posted August 30, 2005 Would it take alot of changes to have an option to point the script to an Access mdb file and query the mdb file directly without setting up an ODBC connection?The queries work the same way, you just have to access the file instead of a DSN using a different connection string. See ConnectionStrings.com. My UDFs: ExitCodes Link to comment Share on other sites More sharing options...
steve8tch Posted August 30, 2005 Share Posted August 30, 2005 Thanks c0deWorm - what a useful site. I will have a play this evening Link to comment Share on other sites More sharing options...
tkrampe Posted August 1, 2006 Share Posted August 1, 2006 That is my Problem, what is my error? Link to comment Share on other sites More sharing options...
spanga Posted January 7, 2007 Share Posted January 7, 2007 I thought this script was great! Too bad it doesn't work with the latest beta Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 7, 2007 Moderators Share Posted January 7, 2007 I thought this script was great! Too bad it doesn't work with the latest beta Latest Beta? I didn't know there was a Beta, there's the 3.2.2.0 release version I believe. 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...
Will66 Posted January 7, 2007 Share Posted January 7, 2007 (edited) Hi, looks interesting, unfortunately its not working for me using latest distribution 3.2.2 Ran a syntax check in Scite which returned a few line feed errors but still nothings happening. It would be nice to see a short description of what this script does or requires, i'm new here but have downloaded a few scripts to find out what they do because of insufficient description, quite a few times i've had to search for an include file like excelcom.au3 and in one case found all the required files then lol : msgbox "Sorry this does'nt work for office 2000, bad luck" Ok, now thats off my chest, thanx to the creators and contributors of autoit for a great product! I've been playing around with it for couple of days now and finding it more and more useful. I'm a begginer obviously but put together a simple access dbviewer - ie, no table reationships and limited error handling. Basically, click file open to open an msaccess db and view its tables, click a table to view its records... expandcollapse popup#include <GUIConstants.au3> #include <GuiList.au3> #Include <GuiListView.au3> opt ("MustDeclareVars", 1) Dim $gui = GUICreate("DB Viewer", 800, 600) Dim $filemenu = GUICtrlCreateMenu ("&File") Dim $fileitem = GUICtrlCreateMenuitem ("Open",$filemenu) Dim $tablesLabel, $tablesButton, $fieldsList Global $tablesList Global $objConn Dim $file , $msg GUICtrlSetLimit(-1,200) Func DB_Open($file) If Not $tablesLabel Then $tablesLabel=GUICtrlCreateLabel ("Tables", 10,10) If Not $tablesList Then $tablesList=GUICtrlCreateList ("", -1,25,120 ,97) Else _GUICtrlListClear($tablesList) EndIf $objConn = ObjCreate("ADODB.Connection") $objConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & $file & ";") Dim $rsTables = $objConn.OpenSchema(20) With $rsTables While Not .EOF If .Fields("TABLE_TYPE").Value == "TABLE" Then GUICtrlSetData($tablesList,.Fields("TABLE_NAME").Value) .MoveNext WEnd .Close EndWith $objConn.Close ;If Not $tablesButton then $tablesButton = GUICtrlCreateButton("View", 10, 125, 50) EndFunc Func Table_Open($file, $menustate) Dim $headerFields Dim $reclist $objConn = ObjCreate("ADODB.Connection") $objConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & $file & ";") Dim $rsFields = $objConn.Execute("SELECT * FROM " & $menustate) Dim $i For $i = 0 to $rsFields.Fields.count - 1 $headerFields&=$rsFields.fields($i).name & "|" Next If $fieldsList then _GUICtrlListViewDeleteAllItems ($fieldsList) GUICtrlDelete($fieldsList) EndIf $fieldsList=GUICtrlCreateListView ($headerFields, 170,25,600 ,250) While Not $rsFields.EOF $reclist="" For $i = 0 to $rsFields.Fields.count - 1 $reclist&=$rsFields.fields($i).value & "|" Next GUICtrlCreateListViewItem($reclist, $fieldsList) $rsFields.MoveNext WEnd $rsFields.Close $objConn.Close EndFunc GUISetState () Do $msg = GUIGetMsg() if $msg == $tablesList Then Dim $menustate = GUICtrlRead($tablesList) If $menustate Then Dim $menutext = GUICtrlRead($tablesList, 1) Table_Open($file, $menustate) EndIf EndIf ;if $msg == $tablesList then MsgBox(0,"listview", "clicked="& GUICtrlRead($tablesList, 1)) If $msg = $fileitem Then $file = FileOpenDialog("Choose file...",@ScriptDir,"Microsoft Acces Databases (*.mdb)") If @error <> 1 Then DB_Open($file) EndIf Until $msg = $GUI_EVENT_CLOSE Edited January 7, 2007 by Will66 Link to comment Share on other sites More sharing options...
dragonlord Posted June 18, 2007 Share Posted June 18, 2007 the code hangs up for me at the call for ODBCsources() . any ideas why ? Link to comment Share on other sites More sharing options...
Wayada Posted June 28, 2007 Share Posted June 28, 2007 the code hangs up for me at the call for ODBCsources() . any ideas why ? Try replacing the ODBCsources function with this one: Func ODBCsources($h_controlID, $s_RegEntry, $s_Type) Local $s_List, $i_dsncount, $s_VarNm, $s_Value, $i $i = 1 $s_VarNm = RegEnumVal($s_RegEntry, $i) $s_Value = RegRead($s_RegEntry, $s_Varnm) While $s_VarNm <> ("No more data is available." & @CRLF) $s_VarNm = RegEnumVal($s_RegEntry, $i) $s_Value = RegRead($s_RegEntry, $s_Varnm) If $s_Varnm <> ("No more data is available." & @CRLF) Then GUICtrlCreateListViewItem($s_VarNm & "|" & $s_Type & "|" & $s_Value, $h_controlID) $i += 1 $i_DSNcount += 1 EndIf Wend EndFunc Link to comment Share on other sites More sharing options...
boomingranny Posted August 1, 2007 Share Posted August 1, 2007 is anyone else getting "404: The page/file you requested could not be found." when attempting to download this? Link to comment Share on other sites More sharing options...
tweast Posted August 1, 2007 Share Posted August 1, 2007 (edited) Same problem here. Looks like the user file areas have disappeared. Hope it's temporary.update: Found code in this thread - http://www.autoitscript.com/forum/index.php?showtopic=25549is anyone else getting "404: The page/file you requested could not be found." when attempting to download this? Edited August 1, 2007 by tweast Link to comment Share on other sites More sharing options...
Zedna Posted August 4, 2007 Share Posted August 4, 2007 is anyone else getting "404: The page/file you requested could not be found." when attempting to download this?Link from first post is to Autoit fileman area. Autoit fileman area has been corrupted and now recovered for users who made request. Look here for details. Resources UDF ResourcesEx UDF AutoIt Forum Search 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