SQL website linking problem

  • I do not have much experience with sql, however i do use ms sql 2000 and have set up a product database to use for my website. I am having diffficulty with two things...

    1. I am finding difficulty in putting links into my DHTML menu that will return the correct product category from the database. I have set up a database called met_products and need to use this to access the information. Basically, I think that i need to include products.asp?series=.... but i dont know how to put this code in. I have a DHTML menu already setup and ready to link to, however i cannot seem to get my head around the type of code that is needed to do this.

     

    2. Also, I am looking at comprimising a search engine facility for the products only so that the customer can type a keyword in a search and it searches just the products on the sql database. Can you help me with any code ideas on this? I know that i will need to use the WHERE function, but I am unsure as to how to put this in and link it to my search.

    Any help would be very much appreciated...

    Thank you in advance...

    Dominic

  • Just my penny.

    Are you familiar with MS VB? It is pretty much similar to VBScript. If so, you can write code to link SQL Server, retrieve data from there, and then populate data to your webpage.

  • Dominic:

    It appears that you are not familiar with some of the basics in web development.  From you reference to "products.asp", I assume you will developing "classic ASP" website, not .Net (which would be .aspx), not Java server pages (which would be .jsp), not PHP (.php) or a whole host of other options.  Allow me to throw out a few keywords which you can research on how to use them, and where to find some basic information.

    ASP pages will have server-side code and client-side code.  You client-side code will be HTML (and DHTML if you wish) and likely Javascript (for cross-browser compatibility).  Your server-side code will be VBScript.  You need to be aware of the difference what code on an ASP page will run on server-side and client-side.

    Your database access will be on server-side code only; you do not want your client-side code (at the users' machines) trying to access your database.  Being server-side code, it will be in VBScript, and you will use ADO objects to connect and query SQL Server.  You will create ADO Recordsets, which your VBscript code will then be able to process to write out an HTML page.

    Some references you may be able to use:

    http://www.asp101.com and http://www.15seconds.com are good code resources, and have tutorials for beginners.  http://www.devguru.com is a good pure reference site for ASP objects, ADO objects, and VBScript/Javascript languages.  And of course, http://www.sqlservercentral.com for help on the SQL end.

    Hope this helps.  And good luck



    Mark

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply