473,326 Members | 2,110 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

like statement

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%>
Jul 19 '05 #1
1 1488
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"...

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Savas Ates" <sa***@indexinteractive.com> wrote in message
news:#V**************@TK2MSFTNGP12.phx.gbl...
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%>

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: David Lozzi | last post by:
OK, I know how to use to pull up all records that contains the keyword, but what about not containing the keyword? I've tried NOT LIKE but i get Arguments are of the wrong type, are out of...
1
by: ITHELP | last post by:
I am using a form to find some data from a table. In the table are fields such as Client name, job number, and job description. I built a query using a SQL statement through the 'Record source' for...
4
by: Tom Walker | last post by:
I cannot get the WHERE statement to work correctly unless I use a literal with the LIKE. I want to use a working storage data name so that I can vary the WHERE statement. Example that works: ...
18
by: Bill Smith | last post by:
The initial row is inserted with the colPartNum column containing a valid LIKE pattern, such as (without the single quotes) 'AB%DE'. I want to update the column value with the results of a query...
9
by: Peter | last post by:
My problem is the last bit of coding below, the like statement does not work. what I have is a product options field and in it is stored characters i.e. "avcy" etc what the query does is...
5
by: Andreas Müller | last post by:
Hi, I was wondering, if there is something similar in VB.NET like the using statement in C#. What it does is to automatically call Dispose on the object decrared with in the statement when the...
26
by: brenocon | last post by:
Hi all -- Compared to the Python I know and love, Ruby isn't quite the same. However, it has at least one terrific feature: "blocks". Whereas in Python a "block" is just several lines of...
3
by: Clearview | last post by:
This is my first post to the forum and hoping I can get help as I have spent a way too much time on this problem, and thinking it is probably something really simple to resolve. I am using Access...
6
by: vasudevram | last post by:
Hi group, Question: Do eval() and exec not accept a function definition? (like 'def foo: pass) ? I wrote a function to generate other functions using something like eval("def foo: ....") but...
2
sharijl
by: sharijl | last post by:
Can someone explain the correct way to query SQL with a like or statement. so I want to SELECT * from table where column like 'Something%' or like 'somethingelse%' I tried it and get syntax...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.