Author Topic: Setting Up An Internet Database  (Read 7088 times)

0 Members and 1 Guest are viewing this topic.

deegeecees

  • Guest
Setting Up An Internet Database
« on: October 18, 2007, 12:53:43 PM »
This thread will track the progress of a portion of an EDMS. In this segment, I'll create a database from Access, and link AutoCad attributes to it. Basically, an AutoCad drawing will drive the project to fruition. The database will be shared by other off-site employees who will be able to create and print out invoices / reports / drawings (pdf) / materials / quotes (for proposals), and other project related information.

Note: This will be a sloooow process, and please point out if there are better ways of doing this as I only know enough about this stuff to make me a little dangerous.

hendie

  • Guest
Re: Setting Up An Internet Database
« Reply #1 on: October 18, 2007, 01:47:50 PM »
Access is one option but there are many people out there that don't have access to Access ( :evil:)
So you may want to consider something like MySQL for the back end (or similar) to make it more accessible for all

deegeecees

  • Guest
Re: Setting Up An Internet Database
« Reply #2 on: October 18, 2007, 02:03:08 PM »
I had considered this, but I never used MySQL. I do have a DL of it somewhere. I'm just familiar with Access, and the handful of people that will be using the DB have Access. I won't rule it out right off the bat, as I may discover I like it better. I'm a real big fan of the "Free" stuff. So, I'll load it up and see if I can find some intuitiveness to it for myself.


hendie

  • Guest
Re: Setting Up An Internet Database
« Reply #3 on: October 18, 2007, 02:06:52 PM »
there are plenty of resources and there's a few here that use it too.
I'm sure we could find a way around any challenges  :evil:

deegeecees

  • Guest
Re: Setting Up An Internet Database
« Reply #4 on: October 18, 2007, 02:08:32 PM »
Oh yeah, the reason for this topic being located in the VB(A) forum, is that this will be (mostly) done in VBA from AutoCad using DAO.

deegeecees

  • Guest
Re: Setting Up An Internet Database
« Reply #5 on: October 18, 2007, 02:12:20 PM »
there are plenty of resources and there's a few here that use it too.
I'm sure we could find a way around any challenges  :evil:

Does MySQL use the same sytntax as Access? IOW will AutoCad and MySQL play nice together?

Tuoni

  • Gator
  • Posts: 3032
  • I do stuff, and things!
Re: Setting Up An Internet Database
« Reply #6 on: October 18, 2007, 04:44:05 PM »
If you're using DAO, it shouldn't matter what backend you're using as a database - access, excel, *SQL should all play very nicely with AutoCAD.

A good website that came in handy for me was www.connectionstrings.com

deegeecees

  • Guest
Re: Setting Up An Internet Database
« Reply #7 on: October 18, 2007, 04:45:11 PM »
Cha-Ching!

Thanks Tuoni!

Tuoni

  • Gator
  • Posts: 3032
  • I do stuff, and things!
Re: Setting Up An Internet Database
« Reply #8 on: October 18, 2007, 04:47:52 PM »
Not a problem - I have used ADO to connect to an excel spreadsheet which I used as a database for a VB(A) AutoCAD project I was writing last/beginning of this year.  Gave me no problems at all :)  Plus, doing it in a proper SQL database will allow concurrent connections - something a file cannot do.

Edit:

AFAIK (excel certainly did, and I know MySQL will) they all use proper SQL syntax (SELECT * FROM <table> WHERE <condition>) so it doesn't matter from the programmers point of view
« Last Edit: October 18, 2007, 04:50:08 PM by Tuoni »

deegeecees

  • Guest
Re: Setting Up An Internet Database
« Reply #9 on: October 18, 2007, 05:02:02 PM »
I remember when creating a GPS mapping project for an unmentionable cell phone co. the lead programmer was trying to get me to use a different syntax for Sequel (SQL) and I wasn't familiar with it. The project was already behind so I ended up doing the Cad portion of it and let him handle the database end. That's the reason for the questioning of the syntax. I'm trying to do this from memory and without having to learn anything too engrossing. So, as far as syntax goes, this should work for now:

Code Snippet:
Code: [Select]
    Set db = DAO.OpenDatabase(DATABASE_DIR & "drafting_db_oldver.mdb", False, False)
    Dim rs As DAO.Recordset
        Set rs = db.OpenRecordset( _
        "SELECT * FROM DRAWINGS WHERE Proj_Dia = '" _
        & Projdia & "' AND FileName = '" & Filenm & "'")
    If (rs.RecordCount > 0) Then

numa

  • Guest

deegeecees

  • Guest
Re: Setting Up An Internet Database
« Reply #11 on: October 19, 2007, 12:53:00 PM »
Due to the fact that I'm overloaded here at work, I'm gonna have to keep this project as simple as possible. So, I'm going with what I currently know, which is Access, and DAO. I'll possibly update the code for SQL at a later date. Thanks for that tips though, kind people.

 :-)

Atook

  • Swamp Rat
  • Posts: 942
Re: Setting Up An Internet Database
« Reply #12 on: October 19, 2007, 02:11:44 PM »
How are you going to share and connect to an Access DB over the internet?

I switched to ADO after using DAO for a while, it was actually pretty intuitive. DAO works just fine though, and I like the name better..that which can be named is not eternal ;)

Ragarding switching the backend DB to MySQL or any other: once you figure out the connection string to a MySQL Database if the tables are structured the same, the rest of the code will remain unchanged. If you like,  I may be able to set up a MySQL DB for you to play around with on one of my domains.

deegeecees

  • Guest
Re: Setting Up An Internet Database
« Reply #13 on: October 19, 2007, 02:20:18 PM »
How are you going to share and connect to an Access DB over the internet?

That is the aspect of this I'm needing help/resources for.

I may be able to set up a MySQL DB for you to play around with on one of my domains.

That would be extremely helpful!

deegeecees

  • Guest
Re: Setting Up An Internet Database
« Reply #14 on: October 31, 2007, 10:35:44 AM »
Thanks Tuoni for the set-up. It is very much appreciated. I'm going through a tutorial from here:

http://dev.mysql.com/doc/refman/5.0/en/database-use.html

... and will follow up with what I have accomplished. Things are starting to make sense.