Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unspecified error message

Status
Not open for further replies.

discusmania

IS-IT--Management
Oct 24, 2000
158
AP
hi guys,

i've run this code:

<%
dim cs
cs="Provider=Microsoft.Jet.OLEDB.4.0;" &_
"DataSource=d:\inetpub\ ID=admin;Password="

Set cn = server.createobject("ADODB.Connection")
cn.open cs
strlocal_name="select distinct id,local_name from plant_listing order by local_name asc"
set rslocal=cn.Execute(strlocal_name)
%>

<html>
<head><title>
</title></head>
<body>
<% if not rslocal.eof then%>
<Table>
<tr><td>Senarai Tumbuhan</td></tr>
<%do until rslocal.eof%>
<tr>
<td><a href="plant_detail.asp?plant_id=<%=rslocal("id")%>" target=_top><%=rslocal("local_name")%></a></td>
</tr>
<%rslocal.movenext
loop
cn.Close%>
</table>
<%end if %>
</body>
</html>

and get the message:

Unspecified error

/dept/amt/software/fms/myown/plant_detail.asp, line 14


what's wrong with this?

this is my first attempt to use access db, prev i use oracle 8i

please help.

Regards, Ron
 
my guess is that line 14 is the one with the connection to the DB.

Ensure that your database folder (not just the database file) has write permissions for the IUSR account. You may need to restart your browser to notice the change.

Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
what do you mean by :
has write permissions for the IUSR account
by the way, i've mistakenly paste the wrong code,

the actual code is :

<% @LANGUAGE = VBSCRIPT %>
<%
dim cs
plant_id=request("plant_id")
' cs="Provider=Microsoft.Jet.OLEDB.4.0;" &_
'"Data Source=d:\inetpub\ ID=admin;Password="
cs="Driver={Microsoft Access Driver (*.mdb)};"&_
" DBQ=d:\inetpub\ ID=admin;Password="

Set cn = server.createobject("ADODB.Connection")
cn.open cs

strdetail="select local_name,latin_name,other_name,location,desc,usage,pict from plant_listing where id='"&plant_id&"'"
response.Write strdetail
set rsdetail=cn.Execute(strdetail)
%>

<html>
<head><title>
</title></head>
<body>
<% if not rsdetail.eof then%>
<Table>
<tr><td><h3></h3><%=rsdetail("local_name")%></h3></td></tr>
<tr>
<td>Nama Saintifik:</td>
<td><%=rsdetail("latin_name")%></td>
</tr>

<tr>
<td>Nama Biasa:</td>
<td><%=rsdetail("local_name")%></td>
</tr>

<tr>
<td>Nama lain:</td>
<td><%=rsdetail("other_name")%></td>
</tr>

<tr>
<td>Lokasi dijumpai:</td>
<td><%=rsdetail("location")%></td>
</tr>

<tr>
<td colspan=2>Keterangan</td>
</tr>

<tr>
<td colspan=2><%=rsdetail("desc")%></td>
</tr>

<tr>
<td colspan=2>Kegunaan</td>
</tr>

<tr>
<td colspan=2><%=rsdetail("usage")%></td>
</tr>
<%rsdetail.movenext
cn.Close%>
</table>
<%end if %>
</body>
</html>

and the error message is :

select local_name,latin_name,other_name,location,desc,usage,pict from plant_listing where id='1'
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.

/dept/amt/software/fms/myown/plant_detail.asp, line 15


i believe the error is something to do with the WHERE condition.


Thanks and regards,
Nor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top