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

Re: What can cause this error by Paul

Paul
Tue Apr 29 15:28:27 CDT 2008

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

"Paul M" <paul@newsgroup.co.uk> wrote in message
news:ucvRxViqIHA.2292@TK2MSFTNGP03.phx.gbl...
>
> 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
>
>



Re: What can cause this error by Stefan

Stefan
Wed Apr 30 03:24:40 CDT 2008

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!" (-;
_____________________________________________


"Paul M" <paul@newsgroup.co.uk> wrote in message news:%23gRTWejqIHA.4492@TK2MSFTNGP02.phx.gbl...
| 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
|
| "Paul M" <paul@newsgroup.co.uk> wrote in message
| news:ucvRxViqIHA.2292@TK2MSFTNGP03.phx.gbl...
| >
| > 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
| >
| >
|
|



Re: What can cause this error by Stefan

Stefan
Wed Apr 30 03:30:42 CDT 2008

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!" (-;
_____________________________________________


"Stefan B Rusynko" <sbr_enjoy@hotmail.com> wrote in message news:uig2jupqIHA.4848@TK2MSFTNGP05.phx.gbl...
| 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!" (-;
| _____________________________________________
|
|
| "Paul M" <paul@newsgroup.co.uk> wrote in message news:%23gRTWejqIHA.4492@TK2MSFTNGP02.phx.gbl...
|| 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
||
|| "Paul M" <paul@newsgroup.co.uk> wrote in message
|| news:ucvRxViqIHA.2292@TK2MSFTNGP03.phx.gbl...
|| >
|| > 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
|| >
|| >
||
||
|
|



Re: What can cause this error by Paul

Paul
Wed Apr 30 06:29:29 CDT 2008

Thanks Stefan

Paul M

"Stefan B Rusynko" <sbr_enjoy@hotmail.com> wrote in message
news:emPJ8xpqIHA.5096@TK2MSFTNGP02.phx.gbl...
> 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!" (-;
> _____________________________________________
>
>
> "Stefan B Rusynko" <sbr_enjoy@hotmail.com> wrote in message
> news:uig2jupqIHA.4848@TK2MSFTNGP05.phx.gbl...
> | 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!" (-;
> | _____________________________________________
> |
> |
> | "Paul M" <paul@newsgroup.co.uk> wrote in message
> news:%23gRTWejqIHA.4492@TK2MSFTNGP02.phx.gbl...
> || 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
> ||
> || "Paul M" <paul@newsgroup.co.uk> wrote in message
> || news:ucvRxViqIHA.2292@TK2MSFTNGP03.phx.gbl...
> || >
> || > 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
> || >
> || >
> ||
> ||
> |
> |
>
>