vb5 versus vb2008



Hi,

was using this piece of source since long in VB5. Now we have to transfer it into VB2008 and getting a lot of compiler errors. I got mentioned, that DAO don't work in VB2008. Is there somebody out there who can assist me??


-----------------------------------------------------------------
sub test()


Dim dwBereich As dao.Workspace
Dim dwDatenbank As dao.Database
Dim dwTabelle As dao.Recordset
Dim ws As dao.Workspace

Set dwDatenbank = ws.OpenDatabase(DB_Path & DB_name)
dwTabelle = dwDatenbank.OpenRecordset("austria")
dwBereich.BeginTrans()

For I = 1 To 100
dwTabelle.AddNew()

dwTabelle![au_Datum] = Big_au_Datum(I)
dwTabelle![au_Mobile] = Big_au_Mobile(I)
dwTabelle![au_client] = Big_au_Kundennummer(I)

dwTabelle.Update()
Next I

dwBereich.CommitTrans()
dwTabelle.Close()
end sub
-----------------------------------------------------------

.



Relevant Pages


Loading