Floppy Posted February 10, 2012 Share Posted February 10, 2012 Hello,Can someone help me figuring out how to create a MS Access database, and creating tables and data into it, please?I found this UDF but it's very old and gives me some errors.Thank you and bye Link to comment Share on other sites More sharing options...
supersonic Posted February 10, 2012 Share Posted February 10, 2012 Last modified: Sunday, May 01, 2011 -- it's not soo old... Link to comment Share on other sites More sharing options...
Floppy Posted February 10, 2012 Author Share Posted February 10, 2012 (edited) Yes, but it gives me an error Access.au3 line 291 The requested action with this object has failed.: $oADO.Execute ("CREATE TABLE " & $adTable & '(' & $F_Out & ')') $oADO.Execute ("CREATE TABLE " & $adTable & '(' & $F_Out & ')')^ ERROR How can I do? Edited February 10, 2012 by FSoft Link to comment Share on other sites More sharing options...
BrewManNH Posted February 10, 2012 Share Posted February 10, 2012 Do you have Access installed? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator Link to comment Share on other sites More sharing options...
Floppy Posted February 10, 2012 Author Share Posted February 10, 2012 No. Do I need it? If so, which version? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 10, 2012 Moderators Share Posted February 10, 2012 FSoft, That last post is worth this at the very least! M23 water 1  Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area  Link to comment Share on other sites More sharing options...
spudw2k Posted February 10, 2012 Share Posted February 10, 2012 You should be able to use ADODB, no Access required....I think. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF  Link to comment Share on other sites More sharing options...
Floppy Posted February 10, 2012 Author Share Posted February 10, 2012 How can I use ADODB? Link to comment Share on other sites More sharing options...
Floppy Posted February 11, 2012 Author Share Posted February 11, 2012 Can someone teach me how to use ADODB? Thanks! Link to comment Share on other sites More sharing options...
water Posted February 11, 2012 Share Posted February 11, 2012 Search the forum for ADODB and you will find what you need! My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki  Link to comment Share on other sites More sharing options...
jchd Posted February 11, 2012 Share Posted February 11, 2012 ADODB is just like a driver component which always needs an actual (ADO compatible) DB engine behind the scene. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Floppy Posted February 11, 2012 Author Share Posted February 11, 2012 (edited) FSoft, That last post is worth this at the very least! M23 I don't understand anything of this?!? Search the forum for ADODB and you will find what you need! I tried to search but I couldn't find any good script... Now I installed Access 2010, but the error persist Access.au3 line 291The requested action with this object has failed.: $oADO.Execute ("CREATE TABLE " & $adTable & '(' & $F_Out & ')') $oADO.Execute ("CREATE TABLE " & $adTable & '(' & $F_Out & ')')^ ERROR Edited February 11, 2012 by FSoft Link to comment Share on other sites More sharing options...
water Posted February 11, 2012 Share Posted February 11, 2012 If you work with objects you need a COM error handler to grab error information to help you debug your code. Something like: Local $oErrorHandler = ObjEvent("AutoIt.Error", "_ErrFunc") ; Here goes your code ; User's COM error function. Will be called if COM error occurs Func _ErrFunc($oError) ; Do anything here. ConsoleWrite("err.number is: " & @TAB & $oError.number & @CRLF & _ "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ "err.description is: " & @TAB & $oError.description & @CRLF & _ "err.source is: " & @TAB & $oError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ "err.retcode is: " & @TAB & $oError.retcode & @CRLF & @CRLF) EndFunc ;==>_ErrFunc My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki  Link to comment Share on other sites More sharing options...
Floppy Posted February 11, 2012 Author Share Posted February 11, 2012 It outputs thiserr.number is: 0err.windescription: 0err.description is: 0err.source is: 0err.helpfile is: 0err.helpcontext is: 0err.lastdllerror is: 0err.scriptline is: 0err.retcode is: 0 Link to comment Share on other sites More sharing options...
Floppy Posted February 11, 2012 Author Share Posted February 11, 2012 I figured out I have to put that code in AccessConstants.au3 It gives this: err.description is: La query deve contenere almeno un campo di destinazione. err.windescription: Errore non specificato. err.number is: 80020009 err.lastdllerror is: 0 err.scriptline is: 67 err.source is: Microsoft JET Database Engine err.helpfile is: err.helpcontext is: 5003000 Link to comment Share on other sites More sharing options...
water Posted February 11, 2012 Share Posted February 11, 2012 It look like the SQL statement is wrong (if Google translated correctly from italian to german) My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki  Link to comment Share on other sites More sharing options...
Floppy Posted February 11, 2012 Author Share Posted February 11, 2012 Ok, I figured out that error is because I didn't create any primary key. Now I created one, but I'm getting another error when I try to add a record. It says "Type Incompatibility". It's strange because I set the fields of the database to "text" and my script write text strings (I also tried to put the strings in String()) How can I do now? :-( Link to comment Share on other sites More sharing options...
Floppy Posted February 12, 2012 Author Share Posted February 12, 2012 Anyone knows why it says "Type Incompatibility"? Link to comment Share on other sites More sharing options...
Floppy Posted February 13, 2012 Author Share Posted February 13, 2012 Why noone helps me with this "Type Incompatibility" error? Link to comment Share on other sites More sharing options...
Juvigy Posted February 13, 2012 Share Posted February 13, 2012 You will have to post your code and give more details in order for someone to help you. 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