Hello
I am trying to display dynamic meta tags throughout my website using dreamweaver to help write the code, but I am unable to get the data to display anything. Can someone take a look at my ASP statement?
##########################################################
<%
Dim rsMetaKeywords__varCatCode
rsMetaKeywords__varCatCode = ""
If (sCc <> "") Then
rsMetaKeywords__varCatCode = sCc
End If
%>
<%
Dim rsMetaKeywords
Dim rsMetaKeywords_numRows
Set rsMetaKeywords = Server.CreateObject("ADODB.Recordset")
rsMetaKeywords.ActiveConnection = MM_dtor_data_STRING
rsMetaKeywords.Source = "SELECT CATEGORY, CUSTMEMO1 FROM dbo.CATEGORY WHERE CATEGORY = '" + Replace(rsMetaKeywords__varCatCode, "'", "''") + "' ORDER BY CATEGORY"
rsMetaKeywords.CursorType = 0
rsMetaKeywords.CursorLocation = 2
rsMetaKeywords.LockType = 1
rsMetaKeywords.Open()
rsMetaKeywords_numRows = 0
%>
<meta name="keywords" content="<%=(rsMetaKeywords.Fields.Item("CUSTMEMO1").Value)%>">
<meta name="description" content="<%=rsMetaKeywords__varCatCode%>">
<%
rsMetaKeywords.Close()
Set rsMetaKeywords = Nothing
%>
##########################################################
When the script runs the variable rsMetaKeywords__varCatCode is assigned a value of the category code but I think the problem lies with the rsMetaKeywords.Source part of the script. when i view the source the meta tag is blank but when i run a test conection in dreamweaver using the category code to find the data it displays. do you think it is an IIS6 setup issue or the code itselfe?
Regards
I am trying to display dynamic meta tags throughout my website using dreamweaver to help write the code, but I am unable to get the data to display anything. Can someone take a look at my ASP statement?
##########################################################
<%
Dim rsMetaKeywords__varCatCode
rsMetaKeywords__varCatCode = ""
If (sCc <> "") Then
rsMetaKeywords__varCatCode = sCc
End If
%>
<%
Dim rsMetaKeywords
Dim rsMetaKeywords_numRows
Set rsMetaKeywords = Server.CreateObject("ADODB.Recordset")
rsMetaKeywords.ActiveConnection = MM_dtor_data_STRING
rsMetaKeywords.Source = "SELECT CATEGORY, CUSTMEMO1 FROM dbo.CATEGORY WHERE CATEGORY = '" + Replace(rsMetaKeywords__varCatCode, "'", "''") + "' ORDER BY CATEGORY"
rsMetaKeywords.CursorType = 0
rsMetaKeywords.CursorLocation = 2
rsMetaKeywords.LockType = 1
rsMetaKeywords.Open()
rsMetaKeywords_numRows = 0
%>
<meta name="keywords" content="<%=(rsMetaKeywords.Fields.Item("CUSTMEMO1").Value)%>">
<meta name="description" content="<%=rsMetaKeywords__varCatCode%>">
<%
rsMetaKeywords.Close()
Set rsMetaKeywords = Nothing
%>
##########################################################
When the script runs the variable rsMetaKeywords__varCatCode is assigned a value of the category code but I think the problem lies with the rsMetaKeywords.Source part of the script. when i view the source the meta tag is blank but when i run a test conection in dreamweaver using the category code to find the data it displays. do you think it is an IIS6 setup issue or the code itselfe?
Regards