I have a dbtest asp page that looks like so:
I am getting the following error:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'LBound'
dbtest.asp, line 17
Line 17 is:
Is this happening because the images themselves are not in the database but rather only the URL to the image? I know that the LBound refers to arrays and the smallest subscript of that array, but that does not put it context for. This test page was supplied in a folder of examples for the photo upload I am building.
~E
Code:
<% @Language="VBScript" %>
<html>
<body>
<%
Dim oConn, Rec, sConn, sFilePath
Set oConn = Server.CreateObject("ADODB.Connection")
sFilePath = Server.MapPath("db/logins.mdb")
sConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & sFilePath & ";"
oConn.Open sConn
Set Rec = oConn.Execute("SELECT * FROM inventory")
Do While Not Rec.EOF
Response.Write "Image<br>"
Response.Write "LBound = " & LBound(Rec("PIC")) & "<br>"
Response.Write "UBound = " & UBound(Rec("PIC")) & "<br>"
Rec.MoveNext
Loop
Rec.Close
oConn.Close
%>
</body>
</html>
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'LBound'
dbtest.asp, line 17
Line 17 is:
Code:
Response.Write "LBound = " & LBound(Rec("PIC")) & "<br>"
Is this happening because the images themselves are not in the database but rather only the URL to the image? I know that the LBound refers to arrays and the smallest subscript of that array, but that does not put it context for. This test page was supplied in a folder of examples for the photo upload I am building.
~E