Professional Web Applications Themes

Problems width IF.... - ASP

SORRY wrong code.. old version :) change If rsMeny("ID") <> ID Then to If rsMeny("ID") = ID Then sorry :) "Christopher Brandsdal" <christopherwbc2i.net> skrev i melding news:u9VKRDMTDHA.2148TK2MSFTNGP11.phx.gbl... > I have a problem. I'm making a expanding menu, but I'm having problems with > my code.. > Here's the code: > > <html> > <head> > <title>default.asp</title> > </head> > > <body> > > <% > ' Connection to the database / Datenbankverbindung > Dim ConnectString, conn > ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & > Server.MapPath("../../Doents and Settings/All > Users/Dokumenter/portal.mdb") > Set conn = Server.CreateObject("ADODB.Connection") > conn.open ConnectString > %> > > ...

  1. #1

    Default Re: Problems width IF....

    SORRY wrong code.. old version :)

    change
    If rsMeny("ID") <> ID Then
    to
    If rsMeny("ID") = ID Then

    sorry :)

    "Christopher Brandsdal" <christopherwbc2i.net> skrev i melding
    news:u9VKRDMTDHA.2148TK2MSFTNGP11.phx.gbl...
    > I have a problem. I'm making a expanding menu, but I'm having problems
    with
    > my code..
    > Here's the code:
    >
    > <html>
    > <head>
    > <title>default.asp</title>
    > </head>
    >
    > <body>
    >
    > <%
    > ' Connection to the database / Datenbankverbindung
    > Dim ConnectString, conn
    > ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
    > Server.MapPath("../../Doents and Settings/All
    > Users/Dokumenter/portal.mdb")
    > Set conn = Server.CreateObject("ADODB.Connection")
    > conn.open ConnectString
    > %>
    >
    > <%DIm ID
    > ID = Request.Querystring("id") %>
    > <%
    > 'Henter kategorier
    > Dim sqlMeny, rsMeny
    > sqlMeny = "SELECT * FROM Meny WHERE Parent = 0 ORDER BY ID ASC"
    > Set rsMeny = Server.CreateObject("ADODB.Recordset")
    > rsMeny.Open sqlMeny, conn, 3, 3
    > do until rsMeny.Eof
    > %>
    > <%= rsMeny("Navn") %><br>
    > <%
    >
    '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''
    >
    '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''
    > '''''
    >
    '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''
    >
    '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''
    > '''''
    > 'The next line has the problem.. If I change ID to for example 4 the code
    > runs fine.... Why will the If line not take the ID variabel?????
    > If rsMeny("ID") <> ID Then
    > Else
    > 'Henter kategorier
    > Dim sqlUnder, rsUnder
    > sqlUnder = "SELECT * FROM Meny WHERE Parent = "& rsMeny("id") &" ORDER BY
    ID
    > ASC"
    > Set rsUnder = Server.CreateObject("ADODB.Recordset")
    > rsUnder.Open sqlUnder, conn, 3, 3
    > do until rsUnder.Eof
    > %>
    >
    > --<%= rsUnder("Navn") %><br>
    >
    > <%
    > rsUnder.MoveNext
    > Loop
    >
    > End If
    > %>
    > <%
    > rsMeny.MoveNext
    > Loop
    > 'disconnect
    > conn.close
    > Set conn = Nothing
    > %>
    >
    > </body>
    > </html>
    >
    >
    >

    Christopher Brandsdal Guest

  2. #2

    Default Re: Problems width IF....

    Uh, want to tell us what the problem is?

    Ray at home

    "Christopher Brandsdal" <christopherwbc2i.net> wrote in message
    news:u9VKRDMTDHA.2148TK2MSFTNGP11.phx.gbl...
    > I have a problem. I'm making a expanding menu, but I'm having problems
    with
    > my code..
    > Here's the code:
    > If rsMeny("ID") = ID Then

    Ray at Guest

  3. #3

    Default Re: Problems width IF....

    If you see in the code you'll find this :

    'The next line has the problem.. If I change ID to for example 4 the code
    runs fine.... Why will the If line not take the ID variabel?????
    If rsMeny("ID") = ID Then

    Sorry! it was maby hard to find :) little tired over here.. 02:40 am over
    here :)

    "Ray at <%=sLocation%>" <rayajf8jalskdfna.sefrhja7yasdf.com> skrev i
    melding news:ua2s5RMTDHA.3500tk2msftngp13.phx.gbl...
    > Uh, want to tell us what the problem is?
    >
    > Ray at home
    >
    > "Christopher Brandsdal" <christopherwbc2i.net> wrote in message
    > news:u9VKRDMTDHA.2148TK2MSFTNGP11.phx.gbl...
    > > I have a problem. I'm making a expanding menu, but I'm having problems
    > with
    > > my code..
    > > Here's the code:
    > > If rsMeny("ID") = ID Then
    >
    >

    Christopher Brandsdal Guest

  4. #4

    Default Re: Problems width IF....

    Try CInt'ing or CLng'ing your recordset value.

    If CInt(rsMeny.Fields("ID").Value) = CInt(ID) Then

    Ray at home


    "Christopher Brandsdal" <christopherwbc2i.net> wrote in message
    news:OgU53UMTDHA.940TK2MSFTNGP11.phx.gbl...
    > If you see in the code you'll find this :
    >
    > 'The next line has the problem.. If I change ID to for example 4 the code
    > runs fine.... Why will the If line not take the ID variabel?????
    > If rsMeny("ID") = ID Then
    >
    > Sorry! it was maby hard to find :) little tired over here.. 02:40 am over
    > here :)
    >
    > "Ray at <%=sLocation%>" <rayajf8jalskdfna.sefrhja7yasdf.com> skrev i
    > melding news:ua2s5RMTDHA.3500tk2msftngp13.phx.gbl...
    > > Uh, want to tell us what the problem is?
    > >
    > > Ray at home
    > >
    > > "Christopher Brandsdal" <christopherwbc2i.net> wrote in message
    > > news:u9VKRDMTDHA.2148TK2MSFTNGP11.phx.gbl...
    > > > I have a problem. I'm making a expanding menu, but I'm having problems
    > > with
    > > > my code..
    > > > Here's the code:
    > > > If rsMeny("ID") = ID Then
    > >
    > >
    >
    >

    Ray at Guest

  5. #5

    Default Re: Problems width IF....

    What would I do widthout you???

    THANK YOU RAY!

    As you see, it worked :)

    I'm really thankfull!


    "Ray at <%=sLocation%>" <rayajf8jalskdfna.sefrhja7yasdf.com> skrev i
    melding news:uUJ$EaMTDHA.3192tk2msftngp13.phx.gbl...
    > Try CInt'ing or CLng'ing your recordset value.
    >
    > If CInt(rsMeny.Fields("ID").Value) = CInt(ID) Then
    >
    > Ray at home
    >
    >
    > "Christopher Brandsdal" <christopherwbc2i.net> wrote in message
    > news:OgU53UMTDHA.940TK2MSFTNGP11.phx.gbl...
    > > If you see in the code you'll find this :
    > >
    > > 'The next line has the problem.. If I change ID to for example 4 the
    code
    > > runs fine.... Why will the If line not take the ID variabel?????
    > > If rsMeny("ID") = ID Then
    > >
    > > Sorry! it was maby hard to find :) little tired over here.. 02:40 am
    over
    > > here :)
    > >
    > > "Ray at <%=sLocation%>" <rayajf8jalskdfna.sefrhja7yasdf.com> skrev i
    > > melding news:ua2s5RMTDHA.3500tk2msftngp13.phx.gbl...
    > > > Uh, want to tell us what the problem is?
    > > >
    > > > Ray at home
    > > >
    > > > "Christopher Brandsdal" <christopherwbc2i.net> wrote in message
    > > > news:u9VKRDMTDHA.2148TK2MSFTNGP11.phx.gbl...
    > > > > I have a problem. I'm making a expanding menu, but I'm having
    problems
    > > > with
    > > > > my code..
    > > > > Here's the code:
    > > > > If rsMeny("ID") = ID Then
    > > >
    > > >
    > >
    > >
    >
    >

    Christopher Brandsdal Guest

  6. #6

    Default Re: Problems width IF....

    1 beer please. [;

    Ray at home

    "Christopher Brandsdal" <christopherwbc2i.net> wrote in message
    news:OHxVoeMTDHA.2768tk2msftngp13.phx.gbl...
    > What would I do widthout you???
    >
    > THANK YOU RAY!
    >
    > As you see, it worked :)
    >
    > I'm really thankfull!
    >
    >

    Ray at Guest

  7. #7

    Default Re: Problems width IF....

    heheheh Mixers man....Mixers


    --
    ----------------------------------------------------------
    Curt Christianson (Software_AT_Darkfalz.Com)
    Owner/Lead Designer, DF-Software
    [url]http://www.Darkfalz.com[/url]
    ---------------------------------------------------------
    ...Offering free scripts & code snippits for everyone...
    ---------------------------------------------------------

    "Ray at <%=sLocation%>" <rayajf8jalskdfna.sefrhja7yasdf.com> wrote in
    message news:OMFMYxMTDHA.940TK2MSFTNGP11.phx.gbl...
    > 1 beer please. [;
    >
    > Ray at home
    >
    > "Christopher Brandsdal" <christopherwbc2i.net> wrote in message
    > news:OHxVoeMTDHA.2768tk2msftngp13.phx.gbl...
    > > What would I do widthout you???
    > >
    > > THANK YOU RAY!
    > >
    > > As you see, it worked :)
    > >
    > > I'm really thankfull!
    > >
    > >
    >
    >

    Curt_C [MVP] Guest

Similar Threads

  1. jump menu + cfgrid image width height problems
    By cesarmejia in forum Coldfusion Flash Integration
    Replies: 0
    Last Post: February 4th, 01:55 PM
  2. IE window width problems
    By Jim Shepherd in forum Web Design
    Replies: 1
    Last Post: February 28th, 10:01 PM
  3. DRKv5 3D Line Chart line width, rendering problems
    By dbarker webforumsuser@macromedia.com in forum Macromedia Flash Actionscript
    Replies: 0
    Last Post: January 26th, 04:48 PM
  4. Box width problems using DHTML - only on MacIE
    By google@ptaff.ca in forum Mac Programming
    Replies: 0
    Last Post: September 16th, 03:43 PM
  5. problems width select line
    By Christopher Brandsdal in forum ASP
    Replies: 3
    Last Post: July 21st, 06:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139