thanks to all the wonderful people of this forum.
I have a database in access, I would like to know how I can interact with it and perform the 3 main functions
select, update, delete
is there some working library or someone could give an example
Thanks in advance
work with database access
-
- Posts: 23
- Joined: 11 Jan 2019, 18:42
Re: work with database access
discussions here:
https://www.autohotkey.com/boards/viewtopic.php?f=76&t=58899
Class_SQLiteDB is a AHK SQLite API Wrapper:
https://www.autohotkey.com/boards/viewtopic.php?p=7639
https://github.com/AHK-just-me/Class_SQLiteDB
SQLite_L.ahk is a Wrapper functions for the SQLite.dll to work with SQLite DBs.
https://www.autohotkey.com/boards/viewtopic.php?f=76&t=58899
Class_SQLiteDB is a AHK SQLite API Wrapper:
https://www.autohotkey.com/boards/viewtopic.php?p=7639
https://github.com/AHK-just-me/Class_SQLiteDB
SQLite_L.ahk is a Wrapper functions for the SQLite.dll to work with SQLite DBs.
github>g_IntelliSense + next improvements + forum
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: work with database access
Do you mean MS Access ?
Re: work with database access
The first one was really good. I have made several codes using it. But, that was long time ago. I do not know current status.
DBA 1.6 (OOP-SQL DataBase {SQLite, MySQL, ADO})
https://autohotkey.com/board/topic/71179-ahk-l-dba-16-oop-sql-database-sqlite-mysql-ado/
https://autohotkey.com/board/topic/90862-acclib-access-database/
https://autohotkey.com/board/topic/15204-ado-com-database-query/
https://autohotkey.com/board/topic/63604-need-help-with-ms-access-database-connection/
https://www.autohotkey.com/boards/viewtopic.php?t=38707
DBA 1.6 (OOP-SQL DataBase {SQLite, MySQL, ADO})
https://autohotkey.com/board/topic/71179-ahk-l-dba-16-oop-sql-database-sqlite-mysql-ado/
https://autohotkey.com/board/topic/90862-acclib-access-database/
https://autohotkey.com/board/topic/15204-ado-com-database-query/
https://autohotkey.com/board/topic/63604-need-help-with-ms-access-database-connection/
https://www.autohotkey.com/boards/viewtopic.php?t=38707
Re: work with database access
and
As far as I know
ADODB style is a history now
Works only with 32bit AHK (workaround, when exe file, it works with 64bit though).
Sad news.
As far as I know
ADODB style is a history now
Works only with 32bit AHK (workaround, when exe file, it works with 64bit though).
Sad news.
Re: work with database access
one brief (old) code
Code: Select all
#Include <DBA>
myFile := "E:\myMSAccessFile.mdb"
myConnection := "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" myFile
myDB := DBA.DataBaseFactory.OpenDataBase("ADO", myConnection)
myTBL := myDB.Query("SELECT * FROM myTBLName")
myCCount := myTBL.Columns.Count()
For Each, Row In myTBL.Rows
Loop, % myCCount
myResult .= Row[A_index] "`n"
MsgBox % myResult
Return
Re: work with database access
or this style (as I wrote earlier, it is quite old..)
Code: Select all
myConn := ComObjCreate("ADODB.Connection")
myConn.Open("Driver={Microsoft Access Driver (*.mdb)}; DBQ=" myMSAccessPath ";")
myRS := myConn.Execute(myQuery)
While ! myRS.EOF
{
myResult .= myRS["myColumn"] "`r`n"
myRS.MoveNext()
}
myRS.Close()
myRS := ""
myConn.Close()
myConn := ""
MsgBox % myResult