asp search script (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


erinatkins -> asp search script (5/5/2003 10:49:18)

Hi all,

I have been told that I will be able to get my site to dynamically optimize my site is if I can make the correct changes to this script on incproddetailconn.asp.

Note I was given says that " NOTE: incproddetailconn.asp is a page I created which is half of the incproddetail.asp page that has the SQL statements."

The script that I am adding at the top of the pages -
<!--#include file=" vsadmin/db_conn_open.asp" -->
<!--#include file=" vsadmin/inc/incproddetailconn.asp" -->
<html><head><META NAME=" Keywords" CONTENT=" <%=rs(" pName" )%>,<%=sectionName%>,then the rest of my keywords.
<TITLE><%=rs(" pName" )%> - Site Name</TITLE>


So I am trying to figure what I need to get rid of on this page. I think this concept is really good if I can get it going. Obviously I need it to look at product names.


<deleted code since it did not work>



Thanks
Erin




Spooky -> RE: asp search script (5/5/2003 19:41:43)

Ok - Im confused :)
What was the script supposed to do for you?




erinatkins -> RE: asp search script (5/6/2003 7:35:41)

Spooky,

This was posted in another forum & it said if I took half of the information on this page that has the SQL statements & named it a different name (incproddetailconn.asp) & added that & the db_conn_open.asp at top of page - it would dynamically add metas to the pages based on products information.

Looking at this code I could not figure out which half of the detail I needed to get rid of.

So I came here :-)

Hope this helps.

Erin




erinatkins -> RE: asp search script (5/6/2003 13:57:45)

I have emailed person who gave me info on how to do this & he has not responded to question. If anyone has any clue on how to fix this or write a script that will load product names into meta info I would appreciate it.

Thanks
Erin




Spooky -> RE: asp search script (5/6/2003 16:54:08)

So, what youre basically after is adding Meta tags / title to the page?
If so, what would a FINISHED meta example look like.

Do these fields exist in your database? What are the column names of this stored information?




erinatkins -> RE: asp search script (5/6/2003 20:37:49)

Spooky,

Yes I am basically after adding Meta tags / title to the page. Sustomer has store front with 100' s of items & she would like items to try to get added to search engines.

My understanding is that this will list list product names in metas.

<head><META NAME=" Keywords" CONTENT=" <%=rs(" pName" )%>,<%=sectionName%>,then the rest of my keywords.
<TITLE><%=rs(" pName" )%> - Site Name</TITLE>

This is for a store front & pName is in database. I think this only field we would need to reference.

Is there an easier way to do this?

Thanks
Erin





Spooky -> RE: asp search script (5/6/2003 21:16:08)

I think Id use something a lot simpler than that :


sSQL=" select pName from table where ID=xxxx" 
sDSN= " Your connection" 
		set objConn = Server.CreateObject(" ADODB.Connection" ):objConn.Open sDSN
		Set objRS = objConn.Execute(sSQL)
			If objRS.eof OR objRS.bof Then
				'  Use default text
			Else
				' Use database text
				MetaTag=objRS(0)
			End if
		objRS.Close : set objRS = Nothing
		objConn.close : set objConn = Nothing
%>
<html>
<head>
<head><META NAME=" Keywords"  CONTENT=" <%=MetaTag%>,<%=sectionName%>,then the rest of my keywords. 
<TITLE><%=MetaTag)%> - Site Name</TITLE> 




Storefront doesnt do that already?





erinatkins -> RE: asp search script (5/7/2003 7:39:55)

Spooky,

I will try that. If I run into any problems I will let you know. [:)] ( I know where to find you)[;)]

Will I need to add a new field in DB for meta?

On the ID=xxxx is this the code or would I put in pID (since this is id#? )
(I am still new to all this ASP stuff you are so good at.) [:D]

This is not Storefront. It is a nice asp template that was made for ecommerce. I am using 4 different templates created by same company. This is just a feature that was requested & I think could help others in SEO.

Thanks again,

Erin




erinatkins -> RE: asp search script (5/7/2003 10:24:32)

Spooky or any of the asp helpers,

Set up code on :
<sSQL=" select pName from table where ID=xxxx"  
sDSN= " Provider=Microsoft.Jet.OLEDB.4.0;Data Source="  & Server.MapPath(" /fpdb/vsproducts.mdb" )

set objConn = Server.CreateObject(" ADODB.Connection" ):objConn.Open sDSN 
Set objRS = objConn.Execute(sSQL) 
If objRS.eof OR objRS.bof Then 
'  Use default text 
Else 
' Use database text 
MetaTag=objRS(0) 
End if 
objRS.Close : set objRS = Nothing 
objConn.close : set objConn = Nothing 
%> 
<html> 
<head> 
<META NAME=" Keywords"  CONTENT=" <%=MetaTag%>,<%=sectionName%>,plate racks, curio cabinets, plate rack, plate hangers, plate stands, frames, domes, glass domes, ornament stands, ornament hangers, ornament trees, doll cases, doll cabinets, doll, case, ornament hanger, ornament display tree, ornament stand, ornament, glass showcases, cup and saucer racks, cup and saucer stands, plate display stands, plate rails, plate stand, easels, plate easels,  platter stands, platter racks, platter hangers, spoon racks, spoon cabinets, plate frames, floor easels, glass display cases, glass display cabinets, spoon displays, acrylic display cases and cabinets, antique display accessories, collectible display accessories, plate displays, turntables, fine home displays, christmas ornament hangers, mirrored place mats, mirror display accessories, glass display cases, ornament domes, watch domes, display domes, thimble domes, platform domes, acrylic domes, curio racks, sports display cases, sports collector' s cases, glass cabinets, plate rack, glass display cases, figurine display cases, glass doll cases, risers, tiered plate stands, dinner plate stands, dinner plate racks, pie racks, pie stands, picture easels, book easels, tile easels, egg stands, display egg holders, tea cup and saucer stands, cup and saucer hangers, picture display easels, tile racks, tile displays, photo holders, picture holders, note card holders, picture racks, wreath hangers, picture frames, picture stands, mirrored placemats, mirrored tablemats, mirror placemats, mirror displays, mirror backdrops, mirrored risers, mirror riser sets, lighted turntables, turntable displays, light bases, racks for plates, sports display showcases, custom glass display cases, ornament display trees, ornament tree stands, christmas ornament trees, mirrored displays, shelved glass collector' s cases, ornament display boxes, shelf racks, display shelves, display racks, christmas stocking hangers, stocking hangers, christmas stocking hooks, bakers racks, wine racks, wine holders, pot racks, pot hangers, wreath hooks, door hangers, door hooks, quilt racks, plate hanger " >

<TITLE><%=MetaTag%>- Fine Home </TITLE>
</head>
</html>


Code is not generating any error message after I removed the ) from <TITLE><%=MetaTag%>

How will I be able to test that this working? I think we would want to write a text file that will show what product names are being called by the SQL statement.

IS there a easy way to do this?

Thanks
Erin




Spooky -> RE: asp search script (5/7/2003 17:15:01)

The first line
<sSQL=" select pName from table where ID=xxxx"
Should be :

<%sSQL=" select pName from YOURTABLE where SOMETHING"

You need your tablename.
You also need the " ID" of the record you are displaying. Typically, the user is being sent here by a URL. eg display.asp?ID=1234
" 1234" is the record number of the product you wish to display.

Assuming that " ID" is the name of the database column as below, this is how it should look :
<%sSQL=" select pName from table where ID=" & cInt(Request.Querystring(" ID" )




erinatkins -> RE: asp search script (5/7/2003 21:00:36)

Spooky,

This may be a stupid question but since I am still new to this - won' t each product have its own id?

So how will script know to look at all id' s?

Thanks
Erin




Spooky -> RE: asp search script (5/7/2003 21:35:12)

Going back to the start - what was the specific use for this page?
I understood it was for an individual product that was dynamically generated ?




erinatkins -> RE: asp search script (5/8/2003 7:39:10)

Specific purpose was to dynamically generate the product names into meta tags.

The other script (that did not work) was suppose to add the product names to the meta tags so search engines would pick up the products. Site has over 200 products

I think we are getting close. ( I hope) [:)]




erinatkins -> RE: asp search script (5/9/2003 10:26:59)

bump.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.1103516