+ Reply to Thread
Results 1 to 7 of 7

Thread: Access Database

  1. #1
    Senior Member
    Using
    not specified
    Join Date
    Aug 2006
    Location
    walnut California
    Posts
    108

    Default Access Database

    Registered forum members do not see this ad.

    Hello every one!! I have a project for the company that I am working for, and I don't even know if it this is possible. A little info:

    We are using a Database from our customers in excell format wich we can use as master database and most of our work is getting information from this file. such as nametag, register, desc1, desc2, desc3...etc. so here is my goal.

    We are using Autocad Electric 2006, which can be link to ACCES, I dont how but it does, I can import/export information from attributes from several block in a drawing or a whole project from excel files, and other goodies...anyways! my goal is to link drawings (maybe projects) to this master database, so if there is any changes i can do it in the acces file and be able update drawings or other files linked to this master database. Is this possible?

    I know is to much to ask but if someone can help me, it will be greatly appreciate.

    p.s.
    nametags are unique.
    Hello I am new at this, but I have been using
    autocad for along time. arquitectural desktop 2005, electrical 2006, and 3d studio.

  2. #2
    Super Member ASMI's Avatar
    Using
    AutoCAD 2008
    Join Date
    Nov 2005
    Location
    Oceanus Procellarum, Moon
    Posts
    1,427

    Default

    Is this possible?
    Yes of course.

  3. #3
    Banned Alan Cullen's Avatar
    Using
    Map 3D 2009
    Join Date
    Jun 2006
    Location
    Cairns, Queensland, Australia
    Posts
    4,181

    Default

    And ASMI is just the bloke to show you how to do it.....

  4. #4
    Super Member ASMI's Avatar
    Using
    AutoCAD 2008
    Join Date
    Nov 2005
    Location
    Oceanus Procellarum, Moon
    Posts
    1,427

    Default

    And ASMI is just the bloke to show you how to do it...
    Of course not...

  5. #5
    Banned Alan Cullen's Avatar
    Using
    Map 3D 2009
    Join Date
    Jun 2006
    Location
    Cairns, Queensland, Australia
    Posts
    4,181

    Default

    You'll get used to ASMI's sense of humour after a little while.....

    ASMI.....nice play on words, there, mate......

  6. #6
    Senior Member borgunit's Avatar
    Using
    Mechanical 2006
    Join Date
    May 2007
    Location
    Ohio USA
    Posts
    287

    Default

    Here is an example connection to a db, extract the info, and close it back up:

    Private Const cnMatlDataSrc As String = "M:\Library\Data\MATERIAL_TRANSLATION.mdb"
    Private Const cnString As String = "Microsoft.Jet.OLEDB.4.0"

    Public Sub GetMatlDb()
    '------------------------------------------------------------------------------
    '
    '
    '------------------------------------------------------------------------------
    Dim AdoConn As ADODB.Connection
    Dim AdoRecSet As ADODB.Recordset
    '''''''''''''''''''''''''''''''''''''''
    On Error GoTo ErrHandler

    'Set connection to to a new Connection object
    Set AdoConn = New ADODB.Connection
    'Set the provider of the connection to Jet
    AdoConn.Provider = cnString

    'Open a connection to the database
    AdoConn.Open cnMatlDataSrc

    'Initiate a new recordset object
    Set AdoRecSet = New ADODB.Recordset

    'Open table USING SQL TO QUERY DATABASE
    AdoRecSet.Open "SELECT * FROM MATL_CROSSREF", AdoConn
    gvMatlArray = AdoRecSet.GetRows '<< FILLING UP GLOBAL VARIANT VARIABLE WITH INFO

    ExitHere:
    AdoRecSet.Close
    Set AdoRecSet = Nothing
    AdoConn.Close
    Set AdoConn = Nothing
    Exit Sub

    ErrHandler:
    MsgBox "An error occurred. The error number is " & Err.Number & _
    " and the description is " & Err.Description
    Err.Clear
    GoTo ExitHere
    End Sub
    AutoCAD Mechanical 2006
    XP PRO SP3
    http://mechcad-insider.blogspot.com/

  7. #7
    Senior Member
    Using
    not specified
    Join Date
    Aug 2006
    Location
    walnut California
    Posts
    108

    Default

    Registered forum members do not see this ad.

    hello everyone!! thanks for all the input!!

    ASMI can you tell how it would be done?


    thanksfor the info!!
    Hello I am new at this, but I have been using
    autocad for along time. arquitectural desktop 2005, electrical 2006, and 3d studio.

Similar Threads

  1. Autocad and Access
    By AKing in forum AutoLISP, Visual LISP & DCL
    Replies: 9
    Last Post: 22nd Jun 2012, 04:39 pm
  2. access 'qselect' transparently?
    By Hickoz_bro in forum AutoLISP, Visual LISP & DCL
    Replies: 3
    Last Post: 7th Jun 2007, 02:45 pm
  3. Access Denied
    By Brunello19 in forum AutoLISP, Visual LISP & DCL
    Replies: 4
    Last Post: 13th Feb 2007, 09:43 pm
  4. Unhandled Access Violation
    By nigelj in forum AutoCAD Drawing Management & Output
    Replies: 1
    Last Post: 18th Jan 2007, 09:31 am
  5. VBA access to Object Data
    By mike creamer in forum AutoCAD Drawing Management & Output
    Replies: 1
    Last Post: 27th Dec 2005, 08:12 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts