like statement

S

Savas Ates

the error
unknown
line 31----------->rs55.movenext

what is the my fault?

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1254"%>
<%

Const adUseClient = 3

Set baglantimiz = CreateObject("ADODB.Connection")
'Set rs55 = CreateObject("ADODB.Recordset")
With baglantimiz
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "Data Source="&Server.Mappath( "db/casio.xls")&";
Extended Properties=Excel 8.0;"
.CursorLocation = adUseClient
.Open
End With%>
<%sql="select * from [sheet1$] where (1=1) and (ozellikleri like '%su%')"
set rs55=baglantimiz.execute(sql)

if rs55.eof=true then
response.write "Aradiginiz Kriterlere Uygun kayit bulunamadi"%>


<a href="index.asp">Geri Dön</a>
<%else
do while not rs55.eof

urunid=rs55("ID")
response.write urunid&"<br>"



rs55.movenext
loop

%>

<%end if%>
 
A

Aaron Bertrand [MVP]

I find your code difficult to follow. Why the multiple context breaks? Why
the confusing name for a connection object? What does where 1=1 add?

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1254"%>
<%
Set conn = CreateObject("ADODB.Connection")
connStr = "Provider=Microsoft.Jet.OLEDB.4.0" & _
";Data Source=" & server.mappath("db/casio.xls") & _
";Extended Properties=Excel 8.0;HDR=NO"
conn.open connStr

sql="SELECT ID FROM [sheet1$] WHERE (ozellikleri LIKE '%su%')"
set rs = baglantimiz.execute(sql)
if rs.eof then
response.write "Aradiginiz Kriterlere Uygun kayit bulunamadi"
response.write "<a href=index.asp>Geri Dön</a>"
else
do while not rs.eof
urunid = rs("ID")
response.write urunid & "<br>"
rs.movenext
loop
end if
rs.close: set rs = nothing
conn.close: set conn = nothing
%>

Now, if you're getting an error, please post the actual error message,
including the error number. We can't solve "the error unknown"...
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top