mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2003
Posts: 3
A
Self-satisified door
OP Offline
Self-satisified door
A
Joined: Apr 2003
Posts: 3
I need to convert the following code from Visual Basic to mIRC:


Dim dbe As DAO.DBEngine
Dim db As DAO.Database
Dim tbl As DAO.Recordset
Dim fld As DAO.Field

Set dbe = New DAO.DBEngine
Set db = dbe.OpenDatabase("C:\Program Files\mIRC\buktopuha.mdb")
Set tbl = db.OpenRecordset("Ask")
Set fld = tbl.Fields(0)
Debug.Print fld.Value


I get 'failed' in the following script:


comopen dbe DAO.DBEngine

if ($comerr) {
echo comopen failed
halt
}

if ($com(dbe,OpenDatabase,3,bstr,C:\Program Files\mIRC\buktopuha.mdb) == 0) {
echo $com failed
goto finish
}


Please, help me!


Andrew Usachov
Joined: Apr 2003
Posts: 3
N
Self-satisified door
Offline
Self-satisified door
N
Joined: Apr 2003
Posts: 3
You should use
DAO.DbEngine.35 or DAO.DbEngine.36 depending of your DAO version.

Didn't find the way to get a DAO.Database object.

If u find just let me know please, would be interesting to know.


Link Copied to Clipboard