I am trying to convert an old VB4.0 application to VB.net and I am
pulling my hair out over understanding changes in database connections,
etc. I am using a ACCESS database.
In the old code, if I wanted to write to the database, I'd simply put
something like:
myDB = Workspaces(0).OpenDatabase("C:\productAPP\QuoteDB. mdb")
myTABLE = myDB.OpenRecordset("Quote Details", dbOpenTable)
myTABLE.LockEdits = False
myTABLE.AddNew() ' Create new record.
If modIDhold <> "" Then myTABLE("ModelID") = modIDhold ' Set record
key.
myTABLE("Qty") = itemQTY
myTABLE("PN") = itemPN
myTABLE("Description") = itemDESC
myTABLE("Price") = itemPRICE
myTABLE.Update() ' Save changes.
myTABLE.Close() ' Close Table.
Simple and straightforward, right? I have spent hours reading books
and websites trying to find a clear concise way of doing the same thing
in VB.net. Can someone out there please post code for doing the same
thing in VB.net. Please make the assumption that I (or someone else
who later reads this) knows nothing about VB.net. Looking for someone
who can explain this in easy-to-understand, common terms. Everything
I come across related to this topic makes me feel pretty inept...
Thanks in advance,
jmar