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
 
discusmania,
Add the following at the start of the file:
Code:
<% @LANGUAGE = VBSCRIPT %>
And if it still doesn't work, your cs variable may need changing:
Code:
cs="Driver={Microsoft Access Driver (*.mdb)}; DBQ=d:\inetpub\[URL unfurl="true"]wwwroot\dept\amt\software\fms\myown\plant_listing.mdb;User[/URL] ID=admin;Password="
See if that works.
 
thanks, i've done as suggested but i still get this message:

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

this is the actual code, just now i mistakenly put the working one..:)

<% @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>

regards,
Ron
 
discusmania,
If id is not a String then you don't need the single quotes.
Cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top