like statement

Discussion in 'ASP General' started by Savas Ates, Feb 21, 2004.

  1. Savas Ates

    Savas Ates Guest

    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%>
     
    Savas Ates, Feb 21, 2004
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:#VWvLPI#...
    > 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%>
    >
    >
     
    Aaron Bertrand [MVP], Feb 21, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    807
  2. Jay McGavren
    Replies:
    11
    Views:
    1,140
    Alan Krueger
    Jan 16, 2006
  3. tedsuzman
    Replies:
    2
    Views:
    7,092
    Michel Claveau, résurectionné d'outre-bombe inform
    Jul 21, 2004
  4. Ted
    Replies:
    1
    Views:
    468
    Duncan Booth
    Jul 22, 2004
  5. Patrick Kowalzick
    Replies:
    5
    Views:
    477
    Patrick Kowalzick
    Mar 14, 2006
Loading...

Share This Page