not-me Posted November 22, 2006 Share Posted November 22, 2006 How i can connect to MDB Access database protected by password? by using SQLite.au3 Thanks Link to comment Share on other sites More sharing options...
Bert Posted November 22, 2006 Share Posted November 22, 2006 Do you have the password? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
randallc Posted November 22, 2006 Share Posted November 22, 2006 How i can connect to MDB Access database protected by password?by using SQLite.au3ThanksHi,I think you could connect using syntax as in my "Accesscom.au3" udf, found via the link in my signature.There are some examples of usage of SQL commands there.Not Sqlite.au3, as that is to use Sqlite as the database, not access mdb file?..Best, Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
cxlaterr Posted November 22, 2006 Share Posted November 22, 2006 where can i find the file "Accesscom.au3" ? Link to comment Share on other sites More sharing options...
not-me Posted November 22, 2006 Author Share Posted November 22, 2006 (edited) vollyman: yes i know tha password randallc: i found the following $newMdb = ObjCreate("ADOX.Catalog") $newMdb.Create ("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & $s_dbname & ';') ;$newMdb.Create ("Driver={Microsoft Access Driver (*.mdb)};Dbq="&$s_dbname&';UID=' & $USRName & ';PWD=' & $PWD) i can use it without password but i dont know how to use the syntex when there is a password! i hope u can give me an example not a syntex. Thanks Edited November 22, 2006 by not-me Link to comment Share on other sites More sharing options...
randallc Posted November 23, 2006 Share Posted November 23, 2006 vollyman: yes i know tha password randallc: i found the following $newMdb = ObjCreate("ADOX.Catalog") $newMdb.Create ("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & $s_dbname & ';') ;$newMdb.Create ("Driver={Microsoft Access Driver (*.mdb)};Dbq="&$s_dbname&';UID=' & $USRName & ';PWD=' & $PWD) i can use it without password but i dont know how to use the syntex when there is a password! i hope u can give me an example not a syntex. Thanks$USRName ="Usernamehere" $PWD="passwordHere" _AccessConnectConn ($s_dbname, $o_Con, 0,"UserNameHere","PasswordHere")oÝ÷ Ù«¢+Ù%ÀÌØí¥}½5Q¡¸ÀÌØí½}½ ½¸¹=Á¸ ÅÕ½ÐíÉ¥ÙÈõí5¥É½Í½ÐÍÌÉ¥ÙÈ ¨¹µ¥ôíÄôÅÕ½ÐìµÀìÀÌØíÍ}¹µµÀìÌäìíU%ôÌäìµÀìÀÌØíUMI9µµÀìÌäìíA]ôÌäìµÀìÀÌØíA]oÝ÷ Ù«¢+ØÀÌØí¹Ý5¹ ÉÑ ÅÕ½ÐíÉ¥ÙÈõí5¥É½Í½ÐÍÌÉ¥ÙÈ ¨¹µ¥ôíÄôÅÕ½ÐìµÀìÀÌØíÍ}¹µµÀìÌäìíU%ôÌäìµÀìÀÌØíUMI9µµÀìÌäìíA]ôÌäìµÀìÀÌØíA]¤Is this what you need? ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
not-me Posted November 23, 2006 Author Share Posted November 23, 2006 Dear randallc thank you for helping me , i know i tired you but i still have a problem. i hope that u can give an example with the following parameter: database location: c:\test.mdb user: admin password: notme how to connect to this database and insert a record($var1,$var2) into the table (products) in the fields (productid,productname) where $var1= anything , $var2=anything i hope that u give a full example include any #include thank you alot Link to comment Share on other sites More sharing options...
not-me Posted November 24, 2006 Author Share Posted November 24, 2006 i knew how to insert a record ($var1,$var2) into the table. but i dont know how to connect to databse with password any help plz Link to comment Share on other sites More sharing options...
not-me Posted November 25, 2006 Author Share Posted November 25, 2006 any answer plz Link to comment Share on other sites More sharing options...
randallc Posted November 26, 2006 Share Posted November 26, 2006 (edited) Hi, Sorry; I was away; and I mis-led you; I have only been able to use the passwords here for reading pre-existing Access mdb files which have passwords; I have never tried to get the creating and writing working; the microsoft site suggests it is possible with ADOX, but I am not sure how; maybe pm Zedna or Stumpii or LOULOU?.. Best, Randall Edited November 26, 2006 by randallc ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
not-me Posted November 26, 2006 Author Share Posted November 26, 2006 I have only been able to use the passwords here for reading pre-existing Access mdb files which have passwordsBest, RandallHi, randallc thank you for ur answer. That is what i want, access pre-existing access mdb file with password.assume that the file already exist (c:\test.mdb) and have a password: notme Link to comment Share on other sites More sharing options...
randallc Posted November 26, 2006 Share Posted November 26, 2006 (edited) Hi, randallc thank you for ur answer. That is what i want, access pre-existing access mdb file with password. assume that the file already exist (c:\test.mdb) and have a password: notmeOK; seriously, I don't believe you will be able to change any data; though! Here is example script, and mdb with password attached as example; please destroy after use! change your poassword names and user name and database name; ;AccessExamplePassword2.au3 0_28 #include"AccessCOM.au3" Local $o_Con, $o_Con2, $o_Rs #include "_ArrayView2D1D.au3" global $s_Tablename = "tblDailyLog",$s_dbname=FileGetShortName(@ScriptDir&"\HistoryLogDB.mdb") ;CONNECT======================================================== $o_Con = ObjCreate("ADODB.Connection") $o_Con.Open("Driver={Microsoft Access Driver (*.mdb)};Dbq="&$s_dbname&';UID=admin;PWD=deltec') ;;DISPLAY1======================================================== $query = "SELECT * FROM " & $s_Tablename & " IN '" & $s_dbname & "'"; &" IN "&$s_dbname; & " WHERE " & $Fieldname0 & " = 'OPEN'" $ar_Rows = _RecordSearch ($s_dbname, $query, $o_Con) ;~ _ArrayViewQueryTable($ar_Rows,$query) _ArrayView2D1D ($ar_Rows, $query & "$s_Tablename Array", 1) ;~ _ArrayViewText($ar_Rows,$query,1,1,1,0,800,600,-1,-1);,$Displayindex=1, $ZeroRowAsHeader=0);COPY to different table, same DB======================================================== _AccessCloseConn ($o_Con) Randall EDIT - example zip removed; please PM me if needed; running out of attachment space (again!) Edited November 26, 2006 by randallc ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
not-me Posted November 26, 2006 Author Share Posted November 26, 2006 Thank you Randall,it works now with me after i saw ur example. 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