D
d_c
Guest
Hi All,
This may seem a simple question to some but what is the best way to input an image into a table and the best way to pull it back out??
My table was working fine. I was pulling pices of text out of the table and displaying them on a web page using asp. However when I changed the data type for the column 'cat_name' in the table from 'text' to 'ole object' I got the following error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Cannot sort on Memo, OLE, or Hyperlink Object (cat_name).
/techvault/include/layer_sx.asp, line 155
any ideas??
-----------------------------------
this is the code I am using to call the datat from the table:
<tr>
<td>
<%
Set rs_cat = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT category.cat_id,cat_name,cat_parent,cat_des,COUNT(blog.blog_id) "_
& "AS cat_count FROM category LEFT JOIN (blog2cat LEFT JOIN blog ON blog.blog_id = blog2cat.blog_id) "_
& "ON category.cat_id = blog2cat.cat_id WHERE cat_parent = 0 " _
& "GROUP BY category.cat_id,cat_name,cat_parent,cat_des ORDER BY cat_name;"
rs_cat.Open strSQL, strCon, 1, 3
While Not rs_cat.Eof
%>
<table width="90%" border="0" cellspacing="0" cellpadding="1" align="center">
<tr>
<td align="left">
<% If ci = rs_cat("cat_id") And rs_cat("cat_count") <> 0 Then %>
<font class="green"><b>
<% = ValidateHTML(rs_cat("cat_name")) %></b></font> [ <b><% = rs_cat("cat_count") %>
</b> ]
<% ElseIf rs_cat("cat_count") = 0 Then %>
<% = ValidateHTML(rs_cat("cat_name")) %> [ <% = rs_cat("cat_count") %>
]
<% Else
Response.Write "<a href=""index.asp?ci=" & rs_cat("cat_id") &"&s=category"""
Response.Write " title="""
If rs_cat("cat_des") <> "" Then
Response.Write ValidateHTML(rs_cat("cat_des"))
Else
Response.Write strLangALTCategoryListView & ValidateHTML(rs_cat("cat_name"))
End If
Response.Write """>" & ValidateHTML(rs_cat("cat_name")) & "</a> [ <b>" & rs_cat("cat_count") & "</b> ] "
End If
%><br><br>
</td>
</tr>
</table>
<% = rs_cat("cat_icon") %>
<%
ListCat rs_cat("cat_id"), 0, "CategoryViewList"
rs_cat.movenext
Wend
rs_cat.Close
Set rs_cat = Nothing
%>
This may seem a simple question to some but what is the best way to input an image into a table and the best way to pull it back out??
My table was working fine. I was pulling pices of text out of the table and displaying them on a web page using asp. However when I changed the data type for the column 'cat_name' in the table from 'text' to 'ole object' I got the following error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Cannot sort on Memo, OLE, or Hyperlink Object (cat_name).
/techvault/include/layer_sx.asp, line 155
any ideas??
-----------------------------------
this is the code I am using to call the datat from the table:
<tr>
<td>
<%
Set rs_cat = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT category.cat_id,cat_name,cat_parent,cat_des,COUNT(blog.blog_id) "_
& "AS cat_count FROM category LEFT JOIN (blog2cat LEFT JOIN blog ON blog.blog_id = blog2cat.blog_id) "_
& "ON category.cat_id = blog2cat.cat_id WHERE cat_parent = 0 " _
& "GROUP BY category.cat_id,cat_name,cat_parent,cat_des ORDER BY cat_name;"
rs_cat.Open strSQL, strCon, 1, 3
While Not rs_cat.Eof
%>
<table width="90%" border="0" cellspacing="0" cellpadding="1" align="center">
<tr>
<td align="left">
<% If ci = rs_cat("cat_id") And rs_cat("cat_count") <> 0 Then %>
<font class="green"><b>
<% = ValidateHTML(rs_cat("cat_name")) %></b></font> [ <b><% = rs_cat("cat_count") %>
</b> ]
<% ElseIf rs_cat("cat_count") = 0 Then %>
<% = ValidateHTML(rs_cat("cat_name")) %> [ <% = rs_cat("cat_count") %>
]
<% Else
Response.Write "<a href=""index.asp?ci=" & rs_cat("cat_id") &"&s=category"""
Response.Write " title="""
If rs_cat("cat_des") <> "" Then
Response.Write ValidateHTML(rs_cat("cat_des"))
Else
Response.Write strLangALTCategoryListView & ValidateHTML(rs_cat("cat_name"))
End If
Response.Write """>" & ValidateHTML(rs_cat("cat_name")) & "</a> [ <b>" & rs_cat("cat_count") & "</b> ] "
End If
%><br><br>
</td>
</tr>
</table>
<% = rs_cat("cat_icon") %>
<%
ListCat rs_cat("cat_id"), 0, "CategoryViewList"
rs_cat.movenext
Wend
rs_cat.Close
Set rs_cat = Nothing
%>