You are right about "DLookup is not used in VBScript/
ASP"!
But there is a
VBScript Function that you could use, It imitates the functionality of the MS Access function of the same name which is like the one that you are using ^
- Code: Select all
strvalue = dlookup("PicInsert") FROM tblCon WHERE "Name" = Request.Form("contributor")
I am not sure that you use the correct syntax for your code above ^ but from what I understand when I see your code is that you are trying to retrieve the
PicInsert field from the
tblCon table where the
Name is from your contributor input field. This is the same as the following
SQL statement in more organize and fast way:
- HTML: Select all
<%
Dim strvalue, name
name = Request.Form("contributor")
strvalue = ("SELECT PicInsrt FROM tblConn WHERE Name= '"& name &"'")
%>
Note: when retrieving a string value, you must put ' around them. " is for numbers. Assign any value that you would like to search into a variable for fast script execution (Like what I have done with your Request.Form)