Re: Database Stuff



Hi Mike,

You don't have to have Access installed to use it's file format.

You can easily use the ADO tools to read/write/modify Access files.

Set your reference to the latest version of the Microsoft ActiveX Data
Objects 2.x library.

The file is C:\Program Files\Common Files\System\ado\msado2x.dll.

You should be able to download at least v2.7 from Microsoft.

I define a number of Public variables and use the following code:

Public ogAccess As New ADODB.Connection
Public ogRS As New ADODB.Recordset
Public Const scMsgHeader = "Landscape"
Public Const sgDatabase =
"C:\Documents\Development\Landscape\Data\StructuredPlants.mdb"
Public ogCmmnd As New Command
Dim sQry As String


''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function CloseDataBase()
Set ogCmmnd = Nothing
Set ogAccess = Nothing
End Function ' OpenDataBase

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function OpenDataBase()
Debug.Print sgDatabase
Set ogAccess = Nothing
If FileExists(sgDatabase) Then
ogAccess.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" &
sgDatabase & ";"
ogCmmnd.ActiveConnection = ogAccess
ogCmmnd.CommandType = adCmdText
End If
End Function ' OpenDataBase

The only other item you need is a book on SQL (unless you already understand
it).

--


Regards

Laurie Comerford

"Mike Williams" <mikea@xxxxxxxxxxxxxxxxx> wrote in message
news:Ou8c4scqIHA.3616@xxxxxxxxxxxxxxxxxxxxxxx
Being a hobbyist and writing mostly stand alone utilities for myself and
friends I have always "rolled my own" database structures (using various
methods including fixed size records and / or various linking arrangements
for variable sized records) and they have always previously suited my
purposes, being just about as fast as anything you can get but, of course,
being specific to my own particular stand alone application and being
unsuitable for read and write access by more than one person at a time.

Now my daughter has asked if I can write something for her which performs
the sort of tasks and creates the sort of displays that I've always done
before, but which can be used by a number of separate people on a number
of separate machines such that each person is accessing the same database
at the same time for both read and write operations and, if necessary, for
the creation of new records. I'm fairly sure that given enough time I
could come up with my own "home brewed" data structure and controlling
code which would allow such a thing, but even after just a very short
consideration I can already see lots and lots of hurdles that I would be
required to jump and, of course, I don't want to reinvent the wheel.

Also, it would be nice if the main database was in a standard format so
that it could, if necessary, also be read by other applications (although
that is not an essential requirement). I don't want to use Access or
anything similar because I want my application to run on machines where
Access will probably not be installed. I have never actually dipped my
toes into this client / server corporate database water before (if that's
what it's called) and I would really appreciate it if anyone could give me
any tips / pointers and any general "outline explanations" or perhaps even
provide some links to any suitable tutorials which are VB6 specific?

Mike




.



Relevant Pages

  • Re: Btrieve legacy migration
    ... The first question is to figur eout your file format and database ... and get the white paper on "Finding Your Database Engine Version". ... do a STAT of one of your data files to determine ... or a description of the file format. ...
    (comp.databases.btrieve)
  • Re: Two questions about moving data between a SQL DB and XML
    ... better method of exporting data to a file format for later reimport be? ... Is there a better option than XML? ... dozen tables from one database and importing them into another database ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Working with fixed format text dbs
    ... file format for a commercial database application. ... And also, as you say, if the spec ever does change, the ... You could presumably define a list (of some sort, ...
    (comp.lang.python)
  • Re: ACCESS 2007 Missing User Level Securitty - ARRRGGGGHHHH What were they thinking?
    ... line-of-business database application development platform. ... sticking with Access 2003 or earlier file format) or are we stuck ... Access ULS security was never very secure and the prevailing theory is that since a file based system can never be made secure that there was no point continuing the charade. ...
    (microsoft.public.access.security)
  • Re: MDE not possible ?
    ... If your database is in Access 2000 file format (it should say on ... the database window), Access 2003 cannot convert it to an MDE: ... I know little about a MDE but I think its a database that has ...
    (microsoft.public.access.formscoding)