Click here to Skip to main content
15,903,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Good day all.

In the early to mid-90's I wrote many programs for local businesses using BTRIEVE (anyone remember that?) and Microsoft Quick Basic. Then I moved my environment to Visual Basic using Access as my preferred method of database storage. As it turned out, the primitives used in BTRIEVE to create a database, access records, update records, etc. were extremely similar to those I needed to use in the VB/Access environment.

I am aware of the "accepted" methods for database usage with VB.net programs. However, I've never seen any references or documentation for doing it using my "old fashioned" methods. As an example of what I'm referring to, I have included some sample statements below that are from a VB6 program that manages data in an Access database.

I'm not trying to initiate a debate regarding the merits of different databases, languages, etc. Just asking a simple question, which is: Does VB.net support these "old fashioned" database manipulation methods, specifically as it pertains to ACCESS as the database?

Thank you in advance for your thoughtful and informative considerations.


(Sample code from VB/Access program)

VB
'CREATE A DATABASE OBJECT
Global DatabaseDB As Database

'CREATE A WORKSPACE OBJECT
Global DatabaseWS As Workspace

'CREATE A RECORD SET FOR A TABLE IN THE DATABASE
Global DatabaseTable As Recordset

'OPEN THE DATABASE
Set DatabaseWS = DBEngine.Workspaces(0)
Set DatabaseDB = DatabaseWS.OpenDatabase(NameOfDatabase)

'OPEN A DATABASE TABLE
Set DatabaseTable = DatabaseDB.OpenRecordset("DatabaseTableName", dbOpenTable)

'SELECTING AN INDEX TO USE WHEN ACCESSING A DATABASE TABLE
DatabaseTable.Index = "SomeIndexDefinedInAccess"

'NAVIGATING THROUGH A DATABASE TABLE
DatabaseTable.MoveFirst   'positions at first record in table based on current index
DatabaseTable.MoveNext   'moves pointer to next record in table based on current index

'ADDING A NEW RECORD TO THE DATABASE TABLE
DatabaseTable.AddNew
DatabaseTable("LastName") = "Smith"
DatabaseTable.Update

etc. etc. etc.
Posted
Updated 1-Sep-13 8:00am
v2

1 solution

Your question actually has nothing to do with VB.NET as everything you're talking about is done by external libraries, even back in the VB6 days.

What you're asking about is ADO.NET>[^] and yes, everything is supported.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 1-Sep-13 13:14pm    
Fair enough, a 5.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900