views:

96

answers:

5

By quote, what is the appropiate language to manipulate an Access database?

A Windows user interface to manipulate an existing Access Database.

... and why?

A: 

You can access Access databases from your favorite scripting languages such as VBScript:

Set MyConn = CreateObject ("ADODB.Connection")
MyConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=MyDb.mdb;"

Set RSet = MyConn.Execute ("select * from MyTable")

While not RSet.EOF
   Wscript.echo "MyColumn = " & RSet("MyColumn")
   RSet.MoveNext
Wend

RSet.Close
Set RSet = nothing  

MyConn.close
Set MyConn = nothing
paxdiablo
+2  A: 

The easiest (and usual) way is to use Visual Basic for Applications, which is built into Access.

Martin B
A: 

I guess any language that has a library to talk to an OLE DB or ODBC database is suitable, but why not use Access itself? It's possible to create forms and program inside MS Access!

fretje
That assumes you _have_ Access. I prefer to just use the (freely redistributable) drivers and VBScript myself, since I'm a tightwad at heart :-)
paxdiablo
@pax: If you have an mdb-file, but you don't have Access, then I'd recommend installing SQL Express and importing the mdb there. Why would you use an mdb without Access?
fretje
Because maybe it came with an application and you want to interface directly with the DB for middleware purposes (such as exporting the data to another app). I've been in that situation before.
paxdiablo
If you're running Windows 2000 or later, you have all the tools you need to read and manipulate data in a Jet 4 database. If you install the Jet/ACE data interface libraries, you can also work with ACE data (A2007 and later ACCDB format).
David-W-Fenton
A: 

try VBA, it has built-in interpreter so you don't have to import special libraries. If satisfied with what you have done, and want more speed, perhaps translate the VBA program into C++ if you like it. I picked C++ because you have tagged this question C++

vpit3833
A: 

Visual Basic .NET or C# would be my choice as there are enough objects and classes built-in to support create medium size database driven applications without writing much code :) objects in the OleDb namespace can be used to connect and insert/retrieve/update data in the database

Here is a C# tutorial http://msdn.microsoft.com/en-us/library/aa288452(VS.71).aspx

Ranhiru Cooray