What can cause this error

P

Paul M

Hi
I am querying an access database and populating text boxes from the
database but I am getting this error

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'HTMLEncode'

/editDB/editdb.asp, line 168

There should be 8 fields ( text boxes) displaying but the error appears
after 4 and the 4th has <font in the text box instead of the data frpm the
recordset

What possible cause can this be



Thanks

Paul m
 
P

Paul M

Hi
I think it might be because the entry in the database is a null but I don't
know how to fix it.
here is the line

<input type="text" name="available" value="<%=
Server.HTMLEncode(rstDBEdit.Fields("available").Value) %>" /><br />
Any help would be much appreciated
Thanks
Paul M
 
S

Stefan B Rusynko

1) best to never use Nulls in any DB
2) or try
<%
IF Len(rstDBEdit.Fields("available"))>0 THEN
available = Server.HTMLEncode(rstDBEdit.Fields("available").Value)
ELSE
available =""
END IF
%>

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| Hi
| I think it might be because the entry in the database is a null but I don't
| know how to fix it.
| here is the line
|
| <input type="text" name="available" value="<%=
| Server.HTMLEncode(rstDBEdit.Fields("available").Value) %>" /><br />
| Any help would be much appreciated
| Thanks
| Paul M
|
| | >
| > Hi
| > I am querying an access database and populating text boxes from the
| > database but I am getting this error
| >
| > Microsoft VBScript runtime error '800a000d'
| >
| > Type mismatch: 'HTMLEncode'
| >
| > /editDB/editdb.asp, line 168
| >
| > There should be 8 fields ( text boxes) displaying but the error appears
| > after 4 and the 4th has <font in the text box instead of the data frpm
| > the recordset
| >
| > What possible cause can this be
| >
| >
| >
| > Thanks
| >
| > Paul m
| >
| >
|
|
 
S

Stefan B Rusynko

PS
Or to test for null use

<%
IF IsNull(rstDBEdit.Fields("available") OR Len(rstDBEdit.Fields("available"))<1 THEN
available =""
ELSE
available = Server.HTMLEncode(rstDBEdit.Fields("available").Value)
END IF
%>

<input type="text" name="available" value="<%= available %>" /><br />

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| 1) best to never use Nulls in any DB
| 2) or try
| <%
| IF Len(rstDBEdit.Fields("available"))>0 THEN
| available = Server.HTMLEncode(rstDBEdit.Fields("available").Value)
| ELSE
| available =""
| END IF
| %>
|
| --
|
| _____________________________________________
| SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| "Warning - Using the F1 Key will not break anything!" (-;
| _____________________________________________
|
|
|| Hi
|| I think it might be because the entry in the database is a null but I don't
|| know how to fix it.
|| here is the line
||
|| <input type="text" name="available" value="<%=
|| Server.HTMLEncode(rstDBEdit.Fields("available").Value) %>" /><br />
|| Any help would be much appreciated
|| Thanks
|| Paul M
||
|| || >
|| > Hi
|| > I am querying an access database and populating text boxes from the
|| > database but I am getting this error
|| >
|| > Microsoft VBScript runtime error '800a000d'
|| >
|| > Type mismatch: 'HTMLEncode'
|| >
|| > /editDB/editdb.asp, line 168
|| >
|| > There should be 8 fields ( text boxes) displaying but the error appears
|| > after 4 and the 4th has <font in the text box instead of the data frpm
|| > the recordset
|| >
|| > What possible cause can this be
|| >
|| >
|| >
|| > Thanks
|| >
|| > Paul m
|| >
|| >
||
||
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top