Immediate Help Needed Please {ASP/Access Database(s)}

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Immediate Help Needed Please {ASP/Access Database(s)}

    Hello All;

    I have designed a Database driven Search Site for Programmers.
    And within the last 12 hours have been requested by over 100 developers
    wanting to know if I can add in several different types of Categories for
    the Site.
    Instead of having just "1" single database, but several.

    This is the problem that I am having at the moment. That has got me at a
    stand still.

    On the default.asp page. In the Site Navigation Search Engine I have a
    ComboBox.
    In the ComboBox there will be about "10" different Categories to search
    from.
    What I need is to know how to connect onto the "10 different" database's
    from the default.asp page?

    Sample of the ComboBox and TextField and Submit Button
    ===========
    <form method="POST" action="default2.asp">
    <font face="Arial" size="2">Search
    <select size="1" name="u_where"
    style="background-color:#05B7FA;color:#ffffff;">
    <option value="Graph_Pro/default2.asp">Graphics/Games</option>
    <option value="Web_Prog/default2.asp">Web/Internet</option>
    <option value="Data_Prog/default2.asp">Database</option>
    <option value="Reg_Prog/default2.asp">Registry</option>
    </select>
    for
    <input type="text" name="u_search" size="20" value="<%= u_search %>"
    style="background-color:#05B7FA;color:#ffffff;">
    <input type="submit" value="Submit"
    style="background-color:#05B7FA;color:#ffffff;">
    </font>
    </form>
    ===========

    here is the code for the connection to the database (Main Database)
    ===========
    <%
    u_search=request.form("u_search")
    u_where=request.form("u_where")
    if u_search = "" or u_where= "" then
    response.redirect "default2.asp"


    end if
    accessdb="/database/db1.mdb"
    cn="DRIVER={Microsoft Access Driver (*.mdb)};"
    cn=cn & "DBQ=" & server.mappath(accessdb)
    Set rs = Server.CreateObject("ADODB.Recordset")

    sql = "select * from UserArticles where " & u_where &" like '%%"& u_search &
    "%%'"


    rs.Open sql, cn
    If rs.eof then
    search="nothing"
    end if
    %>
    ===========

    How would I connect to each of the Database's when the search query is made?
    And show the results to the page. i.e.: Reg_Prog/default2.asp And it's
    Database?

    Thank you for any information that you all can assist me with.

    Wayne


    Wayne & Carr Guest

  2. Similar Questions and Discussions

    1. MS Access Query Help Needed
      I am trying to run the following query on an Access Database. It returns the data however the it is still selecting based on the times that are...
    2. Help Needed : Flash/ASP database works in Firefox butnot IE!
      Hi fellow flash wielders, I am currently building this guestbook in Flash 2004, and using ASP to talk to an Access database. Everything works...
    3. Help needed connecting to an Access DB
      Hi I have made a succesful connection to an Access database, however when i try to view the tables the result is none. The database shows up in...
    4. Help needed with ASP form browse for file, create link to file and insert in access database
      I have a form where a user enters their name, date etc. i also want them to be able to click on a browse button and select a file which will then...
    5. PHP/Database assistance needed
      I've been reading about database design (relational databases) for the web and recognize the importance of database optimization and normalization....
  3. #2

    Default Re: Immediate Help Needed Please {ASP/Access Database(s)}


    Hello "Tim Williams" ;
    > You don't want 10 different databases, you want 1 database and 10(+/-)
    > categories within that database.
    > Multiple databases are just asking for horrible maintenance issues.
    >
    > Just add an article_category to your UserArticles table and then do
    > something like:
    >
    > sql = "select * from UserArticles where article_category='" & u_where &
    "'"
    > and article_title like '%" & u_search & "%'"
    >
    > Change your select values accordingly.
    > tim
    >
    Thank for the Information.
    I need to understand better what you have done here. As I am not the best
    ASP/Database programmer
    in the world. The script that I am using is from someone else (Freeware
    w/source)

    In my database I need to create another "Record" And name is "
    article_category" ? Correct

    Now what is the "article_title" ? Is this another Record to add to the
    Database?
    Would "article_title" be something like "article_data" & "article_web" &
    "article_graph" And so on.......

    Lets say the Following:
    > > <option value="Graph_Pro/default2.asp">Graphics/Games</option>
    > > <option value="Web_Prog/default2.asp">Web/Internet</option>
    > > <option value="Data_Prog/default2.asp">Database</option>
    > > <option value="Reg_Prog/default2.asp">Registry</option>
    And then how would I call them from the ComboBox?
    And when the search is done and it shows the results?
    I am going to have a place at the bottom of the page in each "Folder" for
    Submit Code
    Would it go in the right Database?



    Could you explain a little more information, as I am not quite sure that
    I understand really
    Sorry for this :-(

    Or if you know of a link that has the information on it for doing
    something like this, than
    You can send that on over.

    Also. How big can an "Access" Database be?
    As this site will be growing dramatically fast.
    And the database could reach to be within the next few months, up to about
    100+ MB
    And then within the year, you are looking at a HUGE Database.
    This is the biggest reason why I was going to have a "Database" in each
    folder.
    This way, they would not grow as fast.
    See in the Database's it holds HTML coding, that could be up to 200-lines
    long.
    So you are looking at some fast growing Database's once the Members/Users
    start adding in
    more and more samples and codes and do forth.

    Wayne


    Wayne & Carr Guest

  4. #3

    Default Re: Immediate Help Needed Please {ASP/Access Database(s)}

    First, if you think that you will very quickly reach the limit of Access
    then you shouldn't even be starting with it.
    Are you really going to get >100MB of plain text? (HTML or no HTML)

    You would be adding a new *field* to your table called "article_category",
    not a new record.

    I have no idea what the other fields in your table(s?) are called, so I made
    a guess at "article_title": you can substitute the appropriate field name.

    If you want more help, try showing the layout of your database (table names,
    field names, types) - it is difficult to be any more spcific without that
    information.

    Tim.


    "Wayne & Carr" <spam@spam.net> wrote in message
    news:uIkg8j0QDHA.3144@tk2msftngp13.phx.gbl...
    >
    > Hello "Tim Williams" ;
    > > You don't want 10 different databases, you want 1 database and 10(+/-)
    > > categories within that database.
    > > Multiple databases are just asking for horrible maintenance issues.
    > >
    > > Just add an article_category to your UserArticles table and then do
    > > something like:
    > >
    > > sql = "select * from UserArticles where article_category='" & u_where &
    > "'"
    > > and article_title like '%" & u_search & "%'"
    > >
    > > Change your select values accordingly.
    > > tim
    > >
    >
    > Thank for the Information.
    > I need to understand better what you have done here. As I am not the best
    > ASP/Database programmer
    > in the world. The script that I am using is from someone else (Freeware
    > w/source)
    >
    > In my database I need to create another "Record" And name is "
    > article_category" ? Correct
    >
    > Now what is the "article_title" ? Is this another Record to add to the
    > Database?
    > Would "article_title" be something like "article_data" & "article_web" &
    > "article_graph" And so on.......
    >
    > Lets say the Following:
    > > > <option
    value="Graph_Pro/default2.asp">Graphics/Games</option>
    > > > <option value="Web_Prog/default2.asp">Web/Internet</option>
    > > > <option value="Data_Prog/default2.asp">Database</option>
    > > > <option value="Reg_Prog/default2.asp">Registry</option>
    >
    > And then how would I call them from the ComboBox?
    > And when the search is done and it shows the results?
    > I am going to have a place at the bottom of the page in each "Folder" for
    > Submit Code
    > Would it go in the right Database?
    >
    >
    >
    > Could you explain a little more information, as I am not quite sure
    that
    > I understand really
    > Sorry for this :-(
    >
    > Or if you know of a link that has the information on it for doing
    > something like this, than
    > You can send that on over.
    >
    > Also. How big can an "Access" Database be?
    > As this site will be growing dramatically fast.
    > And the database could reach to be within the next few months, up to about
    > 100+ MB
    > And then within the year, you are looking at a HUGE Database.
    > This is the biggest reason why I was going to have a "Database" in each
    > folder.
    > This way, they would not grow as fast.
    > See in the Database's it holds HTML coding, that could be up to 200-lines
    > long.
    > So you are looking at some fast growing Database's once the Members/Users
    > start adding in
    > more and more samples and codes and do forth.
    >
    > Wayne
    >
    >

    Tim Williams Guest

  5. #4

    Default Re: Immediate Help Needed Please {ASP/Access Database(s)}

    > Wayne
    >
    > I don't wish to be harsh, but the fact that you ask this sort of question
    > doesn't do much to establish the credibility of your site. You need to do
    > some basic research into the design of a relational database before you
    try
    > creating a site to help database programmers.
    >
    > Does no-one read books on programming anymore?
    >
    > --
    > John Blessing
    >
    None taking John;

    This is not a "Database Programming" Site for ASP and so forth.
    It is a Database Programming site for Software Development.

    I will do some more research and see what I can come up with.

    Thanks anyway.

    Wayne


    Wayne & Carr Guest

  6. #5

    Default Re: Immediate Help Needed Please {ASP/Access Database(s)}

    Hello "Tim Williams" ;

    This is what I am trying, could you please let me know if this is correct?

    I have created a New Table in the Database called [ Data ]
    In the [ Data ] table, it is basically the same as the [ UserArticle ]
    Table.

    And this is the code that I am using.

    sql = "select * from Data where art_id='" & u_where &"'" and maintext like
    "'%" & u_search & "%'"

    [ Data = Table Name ]
    [ art_id = Primary key - AutoNumber ] <-- not sure if this is suppose to be
    here or not
    [ maintext - Memo Field --> Contains the HTML Code from the Page layout
    The Search will be done in this
    "Row" to return the results
    Into
    Cat9/Data_Prog/default2.asp ]

    But this is giving me the following Error Message


    Microsoft VBScript runtime error '800a0023'

    Sub or Function not defined

    /Cat9/Data_Prog/Search/AS-TOP.asp, line 15


    Here is the code for the "AS-TOP.asp"
    ===================
    <%
    u_search=request.form("u_search")
    u_where=request.form("u_where")
    if u_search = "" or u_where= "" then
    response.redirect "../default2.asp"


    end if
    accessdb="/Cat9/Data_Prog/data/db1.mdb"
    cn="DRIVER={Microsoft Access Driver (*.mdb)};"
    cn=cn & "DBQ=" & server.mappath(accessdb)
    Set rs = Server.CreateObject("ADODB.Recordset")


    sql = "select * from Data where art_id='" & u_where &"'" and maintext like
    "'%%" & u_search & "%%'"

    rs.Open sql, cn
    If rs.eof then
    search="nothing"
    end if
    %>
    ===================

    Thanks for all the help that you have given so far.
    I am trying to get everything in the same database. And am learning a lot as
    I go.
    But this trying to search from "1" page to another "Table" which is located
    in the same Database.
    That will then open the Results in another SubFolder/page.asp is proven to
    be "1-heck" of a task.

    Thank you, I will keep you informed, on what I come up with.
    Wayne


    Wayne & Carr Guest

  7. #6

    Default Re: Immediate Help Needed Please {ASP/Access Database(s)}

    "Tim Williams"
    > Try:
    > sql = "select * from Data where art_id=" & u_where & " and maintext like
    '%"
    > & u_search & "%'"
    >
    > art_id is numeric so does not need quotes
    > why do you use double % (page code listing) instead of just one ?
    >
    > tim
    Thank you "Tim"
    To answer your question, about the double "%" The tutorial that I used the
    other day used it.
    I take it, it was an incorrect way of use ?

    I am trying to code, and am getting a Syntax Error.


    ========

    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

    [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in
    query expression 'art_id=Cat9/Data_Prog/ and maintext like '%database%''.

    /Cat9/Data_Prog/Search/AS-TOP.asp, line 25

    ========
    But
    I will not bother the group anymore on this one. I am searching for
    information on this one right now.
    And so far everything I find for the "Error '80040e14' is coming up with
    stuff that eralavent to the issue
    that I am having.

    And to answer the question as to hiring someone? I try to do everything
    myself.
    I have tried to get a friend of mine that is rather smart in certain things,
    to learn it.
    But he is to dag-on busy learning how to stay up all night and Chat with
    everyone .
    So back to me. So...

    I have been messing with ASP/Database programming. But have never really
    been able to
    spend allot of time on it. But I will learn. I am also a Software
    Programmer. And that takes up
    The bulk of my time, And that is what the site is basically going to be for.
    For the Developer that use the same IDE Compiler Language as I do.

    Take Care "Tim" I am off to find either a better call, or a fix for this
    problem.

    Thank you for all your help.
    Wayne


    Wayne & Carr Guest

  8. #7

    Default Re: Immediate Help Needed Please {ASP/Access Database(s)}

    Hi Wayne,

    When designing a database there are a couple of things you need to be aware
    of:

    a) entity-relationship (ER) modelling. Here you draw a diagram showing all
    the entities (object) that you have, the attributes that each one has, and
    the relationship between them. The entities (usually) become tables in your
    database. The attributes become the fields, and the relationships your
    constraints

    b) normalistion. This technique, combined with ER modelling, helps sort out
    some of the thornier modelling issues.

    You can do a search via [url]www.google.com[/url] for webpages on these two topics, or
    any decent database design book will cover them. Personally, I'd recommend
    "Database Systems: A practical approach to design, implementation and
    management" by Connolly and Begg. Don't read it from cover to cover as it is
    not a beginners book, but it will be useful in future as well, as some
    topics are relatively advanced.

    As John said, it's a bit odd if you're developing a site related to
    databases but don't have a good grasp of these basic methodologies.

    Cheers
    Ken


    "Wayne & Carr" <spam@spam.net> wrote in message
    news:u5hH579QDHA.1024@TK2MSFTNGP12.phx.gbl...
    : > Wayne
    : >
    : > I don't wish to be harsh, but the fact that you ask this sort of
    question
    : > doesn't do much to establish the credibility of your site. You need to
    do
    : > some basic research into the design of a relational database before you
    : try
    : > creating a site to help database programmers.
    : >
    : > Does no-one read books on programming anymore?
    : >
    : > --
    : > John Blessing
    : >
    :
    : None taking John;
    :
    : This is not a "Database Programming" Site for ASP and so forth.
    : It is a Database Programming site for Software Development.
    :
    : I will do some more research and see what I can come up with.
    :
    : Thanks anyway.
    :
    : Wayne
    :
    :


    Ken Schaefer Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139