Results 1 to 25 of 25
  1. #1
    Full Member
    Join Date
    January 18th, 2005
    Posts
    462
    Hi All!

    I am writing because I could use some MS Access 97 and database help. I am totally stupid when it comes to this stuff but I am trying to learn.
    My goal is to create a ms access database for my website. I want to have it so people will be able to search by company, product model, or part number.
    I have created a MS Access database with a table called "stuff." The table has fields for: company, product model, part number, other, other, and other. I have also entered the desired information into the table.
    Here is my problem. I need to save it as a ms access file with a dsn name. I don't know what the hell I am doing here. Can anyone point me in the right direction?

    Thanks in advance,

    Core

  2. #2
    Newbie
    Join Date
    January 18th, 2005
    Posts
    223
    hey!

    you totally need some web scripting business, dude. like, hows about you run access on a server, and like, query it with asp or php or some other snatches like dis???

    to be honest, access is a pile of pants, man. you should be checking out some unix/mysql/php style solution. visit http://www.freshmeat.net/ for some open-source (and usually free) solutions.

    w-w-w-wicked.

    [written by Unix Trev using Icicle's old account - (with permission)]

  3. #3
    Full Member
    Join Date
    January 18th, 2005
    Posts
    462
    * bump *

    Thanks Francis but I would rather have my question answered rather than switch hosting services and learn a whole bunch of new stuff.

  4. #4
    Full Member
    Join Date
    January 18th, 2005
    Posts
    347
    You could use Dreamweaver Ultradev, which is ok for this. DU has lots of components for browsing and editing the database. With DSN or DNS-less connection to the MsAccess file.
    It will take some time before you get it working, but it isn't that hard. Note that MsAccess is no good if you have high traffic. MYSQL is a free and much more powerful alternative. (If your host allows it)

    There's lots of into out there on the subject. Try a Google search:

    asp dsn-less connection access

  5. #5
    Full Member
    Join Date
    January 18th, 2005
    Posts
    462
    OveB,

    Thanks for the reply. I currently use Dreamweaver for my web development needs, however I don't have ultradev. I almost splurged but I didn't know if I would use it. (Dreamweaver took a little getting used to since I was Frontpage before.)
    As far as MYSQL... I had them on my old host that sucked and I couldn't get a database up there for some reason. I have 100mb of MS SQL server space with this host but they told me to learn the access database method first because MS SQL would be more complicated. So that gets me to where I am today... Trying to save and upload an MS Access database.
    I really don't want to switch hosting services. These guys have been great to me.

    Core

  6. #6
    Full Member
    Join Date
    January 18th, 2005
    Posts
    347
    They are right, sort of..

    If you get it working with a MS Access connection first, it's easy to get it working on MS SQL at a later point. All you have to do is change the connection string in your script. If your connection string is in an include file, you can change it on all pages by just editing that one file.

    Download the 30 day trial of Ultradev, and if you do a little reading I'm sure you can get it working in a day or two.
    If you decide not to buy it, you can still read the code and see how it's done after the trial runs out.

  7. #7
    Newbie
    Join Date
    January 18th, 2005
    Posts
    1,336
    >Thanks Francis but I would rather have my question answered rather than switch hosting services and learn a whole bunch of new stuff.

    I know. I did mention that.

    I was showing 'Trev' abestweb as I reckon he'd be good in the What To Do about Evil Scumware department and he knows lots of useful stuff. He just doesn't understand when people don't want to spend their entire careers learning unix etc.

    He laughs because I use Frontpage Express and think Windows is a Good Thing.


    I

  8. #8
    Full Member
    Join Date
    January 18th, 2005
    Posts
    249
    Here is the code to reference (in your .asp file):

    Dim myRecordSet
    Dim strSQL

    Set myRecordSet = Server.CreateObject("ADODB.Recordset")
    strSQL = "SELECT myFieldname FROM myTableName"

    myRecordSet.Open strSQL, "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("myAccessDB.mdb") & ";", adOpenKeyset, adLockPessimistic, adCmdText

    ****************************
    The above code is easier since you don't need to setup the DSN in the server. You just assign it in the code and point it to the MS Access DB that you are working on.

    If not then, you have to setup the ODBC in the Web Server (If you host your site, contact your host provider about how to setup DSN in their server; if you host it yourself, go to Control Panel, ODBC Data Source, System DSN, Add, Microsoft Access Driver, Give your Data Source a name, Select, Point it to the right Access DB, click OK)

    If you don't know what you are doing, get a book about ASP programming.

    Hope this help.

  9. #9
    Full Member
    Join Date
    January 18th, 2005
    Posts
    462
    This is my life...

    I am going to need beer by the end of this weekend. My goal is to have this stupid thing up and running by monday morning. You guys would be proud of me! I went and purchased Sams "Teach Yourself Active Server Pages in 24 hours." It looks like a good read!

    On another note... I went and downloaded the trial version of Dreamweaver Ultra Dev, all 28mb of it. I went to install it and it said the file was corrupt, (damn dial-up connection.)

    Anyway, I emailed my host to try to see if they could lead me in the right direction.

    I hope everyone else is having better luck with their programming endeavors!

    Core

    P.S. - I know this isn't rocket science but it is making me feel like a moron... :confused:

  10. #10
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    2,402
    Core, I find those Sams books to be pretty helpful, especially as a means of getting started. I have many of them on various subjects...of course you won't learn everything from them, but it show you the basics and get you started.


    Tom Pyles

  11. #11
    Full Member
    Join Date
    January 18th, 2005
    Posts
    462
    I did it! Sort of!

    I accessed my database and got output for the first time ever! (granted the output wasn't in an overly attractive form.) Now I just need to figure out how to create a search form and have it search a few specific fields in my database!

    I may actually have this done by monday morning after all!

    If anyone can direct me to some good sample sites that have examples of my search form delima described above feel free to post the url!

    Core

  12. #12
    Master of Design AlexBet's Avatar
    Join Date
    January 18th, 2005
    Location
    Toronto, Canada
    Posts
    1,364
    Hey Core,

    You are talking about DSN connection to the database. I use Access on my website too with a DSN connection. As someone mentioned here before, there are two types connection to the database, DSN and DSN-less. I have investigated this matter a lot, and everywhere I went they said that the DSN-less connection is better.

    I also saw someone said Access doesn't support too much traffic. Well, let me tell you. With DSN-less connection Access supports 256 simultaneous connections. Is this enough for you? Does anyone have more than 256 queries at his database at the same moment? Don't think so. If you do, then you shouldn't be here, but in a nice resort enjoying your million$. Just remember to close the connection after every request.

    Here is the SIMPLEST DSN-less connection of all (in ASP).

    <pre class="ip-ubbcode-code-pre">
    Set Conn = Server.CreateObject("ADODB.Connection")
    MdbFilePath=Server.MapPath("enter the virtual path to the database here")
    Conn.Open = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & MdbFilePath & ";"
    </pre>

    That's it! Then you continue with you code. [img]/infopop/emoticons/icon_wink.gif[/img]

    Remember to put "Conn.Close" at the end of your code to close the connection to the database (256 simultaneous ones, remeber [img]/infopop/emoticons/icon_wink.gif[/img] ).

  13. #13
    Full Member
    Join Date
    January 18th, 2005
    Posts
    462
    AlexBet,

    Thanks for the code! My database currently uses DSN, my host set it up. I will have to remember to close my connection everytime.
    I will be glad when I figure all of this out. ASP isn't overly difficult, it's just currently overwhelming trying to learn it all quickly. All of the terms and how to use them...

    Core

  14. #14
    Full Member
    Join Date
    January 18th, 2005
    Posts
    462
    I have a working database up and running. (I can connect to it but am still working out how it appears on a page and stuff.)

    I downloaded the trial version of Dreamweaver Ultra Dev and have started playing with it. My problem is that I don't know how to set it up to work with the database I have online. I set it up to work with a copy of the access database I have on my hard drive and have set up but it won't work when I get it uploaded. It gives me the error 500 page.

    Can I configure Dreamweaver to use my ONLINE DATABASE so that when I save pages and upload them it will work. Dreamweaver Ultra Dev is going to be a really helpful tool though. I love the drag and drop stuff.

    Thanks for any input!

    Core

  15. #15
    Master of Design AlexBet's Avatar
    Join Date
    January 18th, 2005
    Location
    Toronto, Canada
    Posts
    1,364
    Hey Core,

    Dreamweaver Ultra Dev is probably a great tool if you don't know anything about ASP.

    Now.... I don't know your knowledge of ASP, but you said that it is easy to learn. Well, I beleive you, but this only works if you DO want to learn. One other thing....

    Ultra Dev is NOT going to help you much to do the page look like you want it to look. You have to do the code manually so it works EXACTLY how you want it to look like. It is the same with HTML. Dreamweaver helps a lot to do the job quicker, but all those final touch-ups I have to do by hand. Don't get me wrong, I LOVE Macromedia products, but you still have to do something manually.

    I am 100% ASP developer and I'm glad when I see other people interested in it. If you have a question, please don't hesitate to ask me. I have this advice for you....

    Just like CGI, you need other language to know other than ASP. ASP is the server side code, and the other language (usually VBScript or JScript) is the client side script. I work in VBScript but you can choose any language you feel is most suitable for you. Hey, you can even choose Perl.

    If you have the WIN2000 installation CD, you can find the references to JScript and VBScript here:
    D:\VALUEADD\MSFT\XTRADOCS\SCRIPT
    (drive letter depends on your configuration)

    A VERY GOOD place to start learning ASP is http://www.asp101.com . Go to RESOURCES/TUTORIALS and you will find a lot of useful tutorials to work with. Also, ASP101 has a lot of links to other sites that are very good. Good luck!

  16. #16
    Full Member
    Join Date
    January 18th, 2005
    Posts
    352
    Microsoft products suck! Opensource is the way of the new world.

    Dance Monkey Boy Video

    Mechanical Media

  17. #17
    Newbie
    Join Date
    January 18th, 2005
    Posts
    24
    Personally, I think MS SQL is a lot easier to use than Access -- altough you can't actually 'see' the tables if you don't have the enterprise manager, it seems to be a lot less finicky about the types of input it receives. Access will conk out at the slightest misplaced quote mark... MS SQL is a lot more forgiving.

    By the way, you can hit either Access or MS SQL dbs using PHP's ODBC option...

  18. #18
    Master of Design AlexBet's Avatar
    Join Date
    January 18th, 2005
    Location
    Toronto, Canada
    Posts
    1,364
    Johnny,

    The ASP code for MS SQL and for Access is basically the same code. [img]tongue.gif[/img]

  19. #19
    Newbie
    Join Date
    January 18th, 2005
    Posts
    17
    Guys please check a good example of a website running ASP with an Access Database using DSN-Less connection.
    www.dealcut.com

    Basically, if you have the time to really normalize your tables, and not getting to crazy creating indexes, you could have an Access Database running faster than MySQL (Shared Database) or any other inexpensive database.

    Believe me I've tried all the databases out there, and Microsoft Access is the best choice if you have a database less than 100MB, and it is so portable that you could always have a copy in your own harddrive without having to depend on your host.

    I could give you some ideas on creating a SuperFast! search engine using Access.

  20. #20
    Full Member
    Join Date
    January 18th, 2005
    Posts
    462
    DealCut.com,

    Your website is exactly what I am trying to do with mine! Did you code it or did you hire it out?

    Core

  21. #21
    Newbie
    Join Date
    January 18th, 2005
    Posts
    17
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Core:
    DealCut.com,

    Your website is exactly what I am trying to do with mine! Did you code it or did you hire it out?

    Core
    <HR></BLOCKQUOTE>


    Core, I designed and developed the look and feel, the database (MS Access) and the ASP. There is also an Content Administration section on the site that I use to make on-the-fly changes to almost everything.

    -Manny

  22. #22
    Full Member
    Join Date
    January 18th, 2005
    Posts
    462
    Dealcut.com,

    You are my new best friend! [img]/infopop/emoticons/icon_wink.gif[/img]

    How long did it take you to code all of that?

  23. #23
    Newbie
    Join Date
    January 18th, 2005
    Posts
    17
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Core:
    Dealcut.com,

    You are my new best friend! [img]/infopop/emoticons/icon_wink.gif[/img]

    How long did it take you to code all of that?
    <HR></BLOCKQUOTE>

    It took me about a week to create and optimize the database, about another week to create the ASP with the SQL, and about two weeks to create the look and feel (GUI). I spent one month debugging, optimizing and Stress Testing the site.

    After a while I created the Content Management GUI because I started experimenting with MySQL, And MS SQL Server.

    It took me about three months to develop the entire site. The hardest part is getting the traffic and setting up the affiliates! [img]/infopop/emoticons/icon_wink.gif[/img]

    -Manny
    -Manny

  24. #24
    Full Member
    Join Date
    January 18th, 2005
    Posts
    462
    DealCut.com,

    You probably don't have the time to answer all of my questions but any input you could give would be appreciated.

    There are two things on your site that I am the most envious of:

    A. Search from a form.
    B. Database driven menu on the left side. (when a person clicks on a link it will pull the data from a menu using the "catid" field.

    I am wondering how you pulled that stuff off?

    Core

  25. #25
    Full Member
    Join Date
    January 18th, 2005
    Posts
    352
    Core,

    Are you stuck with having to use Microsoft products are do you just like them? The two main things you ask for are standard in PHP-Nuke. I too needed a search function for www.chicagoplumbingcode.com and PHP was the answer for me. I even hear it works with MS operating systems and databases too. Check it out at www.phpnuke.org

  26. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Where, oh where did my databases go......
    By bettylou in forum Midnight Cafe'
    Replies: 16
    Last Post: October 7th, 2008, 08:32 PM
  2. 50% off in all databases
    By pachecus in forum Midnight Cafe'
    Replies: 1
    Last Post: June 12th, 2006, 10:54 AM
  3. 2 databases on one page
    By Gordon in forum Programming / Datafeeds / Tools
    Replies: 6
    Last Post: July 25th, 2005, 09:15 PM
  4. Using ASP, but need help with databases
    By bcorso in forum Programming / Datafeeds / Tools
    Replies: 1
    Last Post: August 19th, 2003, 03:30 AM

Posting Permissions

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