Asp CODEPAGE="1252" or CODEPAGE="65001"

Hi yea,
I see when |I creaet a new page using cs3 I get the head
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
where as when using dw8 I used to get
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
I am confused as I have set the preferences the same wht I
beleve I had dw8
set at.
my doc's are also set as
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN"
http://www.w3.org/TR/html4/loose.dtd">
why is the code page set different, and will it make a
different.
regards
Kenny

Dave
Thank you,
I was very confused now you made it all more clear.
regards
kenny
"David Powers" <[email protected]> wrote in message
news:f6l7at$51u$[email protected]..
> Twocans wrote:
>> When I used dw8 the default was 1252,
>
> In DW8, the default encoding was Western European
(iso-8859-1), which is
> the equivalent of ASP codepage 1252. In CS3, the default
encoding is
> UTF-8, which is the equivalent of ASP codepage 65001.
>
>> should I go back and change all my pages to 65001
now i am using cs3,
>> should it make a difference to what i have created
so far.
>
> The file format of a Web page must be the same as the
@CodePage used in
> the page.
>
>
http://www.asp-dev.com/main.asp?page=96
>
> If you are creating web pages that use the CS3 default
encoding UTF-8, you
> must use codepage 65001. If you switch back to the DW8
default encoding,
> both the web page encoding and the codepage must match.
>
> The choice is yours. UTF-8 supports most written
languages (including
> English), so is a good choice. However, it's not a good
idea to mix
> encodings on the same website, particularly if you're
working with a
> database. If you're working with an existing database
that was populated
> using codepage 1252, you should stick with that encoding
(and make sure
> that the web page encoding is iso-8859-1. If you're
working with a new
> site and new database, go with UTF-8 and 65001.
>
> --
> David Powers, Adobe Community Expert
> Author, "Foundation PHP for Dreamweaver 8" (friends of
ED)
> Author, "PHP Solutions" (friends of ED)
>
http://foundationphp.com/

Similar Messages

  • %@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%

    I can't figure out why <%@LANGUAGE="JAVASCRIPT"
    CODEPAGE="65001"%> is shown at the top of the page in Firefox.
    Safari works perfectly.
    The page is:
    http://www.boogieboarder.org/movies/
    Any tips would be a great help. Thanks.

    When you created this page in DW you specified that it would
    be an
    ASP/Javascript page.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "mtpeders" <[email protected]> wrote in
    message
    news:fpv6mn$mqc$[email protected]..
    >I can't figure out why <%@LANGUAGE="JAVASCRIPT"
    CODEPAGE="65001"%> is shown
    >at
    > the top of the page in Firefox. Safari works perfectly.
    >
    > The page is:
    http://www.boogieboarder.org/movies/
    >
    > Any tips would be a great help. Thanks.
    >

  • Language=Javascript" CODEPAGE

    The first line of code automatically generated for two
    templates is <%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
    This line of code appears at the top of a browser window in
    FF and ME7.
    One of the templates has a spry popup menu and the other has
    a PVII menu magic menu. If I delete the first line of code the page
    still works without it. What is this code and is it necessary?
    Thanks, Dave

    DSWalther wrote:
    > The first line of code automatically generated for two
    templates is
    > <%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
    I can't tell you *why* it's there, but it's the ASP way of
    saying "this
    page uses JavaScript and UTF-8 encoding.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • RFC function results with CodePage

    Hi everybody,
    I'm trying to call RFC SAP Z-function from ASP page:
    <%Response.Buffer = false
      Response.Expires = -1
      Response.CacheControl ="no-cache"
      Session.CodePage = "65001"
      Response.charset = "UTF-8"
    %>
    The result  string is '####' , the problem in codepage?...
    We works 640 Final Release - Unicode system.
    Have any idea to help me.
    Thanks, Natalia.

    Hi,
    <b>The way I connect to SAP:</b>
    (include file)
      Set SapLogon            = CreateObject("SAP.LogonControl.1")
      Set SapConn             = SapLogon.NewConnection
      SapConn.Client        = "<Client>"
      SapConn.Language    = "HE"
      SapConn.HostName   = "<HostName>"       
      SapConn.destination  = "<destination>"
      SapConn.user        = "<user>"
      SapConn.password    = "<password>"
      If SapConn.LogOn(0, True) <> True Then ' LogOn WithOut dialog
        Set SapConn = Nothing
        SAP_LogOn = false
      else     
       SAP_LogOn = true
    End If
    <b>The way I call RFC SAP Z-Function:</b>
    (ASP page)
    <!#include file="include/SAP_CONNECTION.INC">
    <%Response.Buffer = false
      Response.Expires = -1
      Response.CacheControl ="no-cache"
      Session.CodePage = "65001"
      Response.charset = "UTF-8"
    %>
    <%
    DIM         SEARCHCRITERIA
    DIM         SEARCHQUERY
    SEARCHCRITERIA = Request.QueryString("SEARCHCRITERIA")
    SEARCHQUERY = Request.QueryString("SEARCHQUERY")
    if SAP_LogOn then
      response.write Z_SAP_SEARCH
      SAP_LogOff
    else     
      response.write "error on Sap LogOn"
    end if
    Public Function Z_SAP_SEARCH()
    Z_SAP_SEARCH = False
    Dim dieFunc, strXmlGetData, oFunctionCtrl,TABR, i
    strXmlGetData = ""
    'Create Function Object
    Set oFunctionCtrl = CreateObject("SAP.Functions")
    Set oFunctionCtrl.Connection = SapConn
    Set dieFunc = oFunctionCtrl.Add("<RFC SAP Z-Function name>")      
    dieFunc.Exports("SEARCHCRITERIA") =      SEARCHCRITERIA
    dieFunc.Exports("SEARCHQUERY")     =      SEARCHQUERY
    If dieFunc.Call = True Then
        Set TABR = dieFunc.tables.Item("T_XML_STRING")
        If TABR.rows.Count > 0 Then
            For i = 1 To TABR.rows.Count
         strXmlGetData = strXmlGetData & TABR.Value(i, "XML_STRING")
         Next
        End If
    Else
         strXmlGetData = "<ERROR>Z_SAP_SEARCH connection error</ERROR>"
    End If
    Z_SAP_SEARCH = strXmlGetData
    End Function
    %>
    As you seen I receive from SAP RFC Z-Function table of strings .
    I receive right result strings, but Instead of Hebrew letters I see  #:
    When I run the function in SAP I don't see #.
    Thanks, Natalia.

  • Help with multiple recordsets and pulling an ID value (ASP)

    I started this discussion when first developing my project and posted on the General Tab.  I have figured out that issue (trying to get my Insert to work in ASP) but now am having trouble retrieving an ID value.  It should be simple.  I want to insert a new record into a single table and want to create a unique ID field.  I am using SQL Server and tried the Identity setting but won't be able to have admin privileges which are required to set the ID.  So, I'd like to just take the ID value from the last record and just add '1' to it to get a new unique ID manually. My INSERT portion was working, so I just decided to query the records to retrieve the last CatalogID and add '1' to get my new ID.  But it's not working!  I tried opening both a command and a recordset, but get various errors on invalid command use. 
    Any help would be great!  I'm new to all of this!
    I've posted a code snippet of what I thought I should do:
    <%LANGUAGE = “VBSCRIPT” CODEPAGE=”65001”%)
    <!--#include file=”Connections/CapConnect.asp”” -->
    <%
    If (Cstr(Request(“MM_insert”)) = “form1”) Then
                    Dim MM_editCmd
                    Dim MM_Lookup
                    Dim NextCatalogID
                    Set MM_Lookup = Server.CreateObject (“ADOB.Recordset”)
                    MM_Lookup.ActiveConnection = MM_CapConnect_STRING
                    MM_Liikup.Source = “Select CatalogID From dbo.tblCatalogItems ORDERBY CatalogID Ascending”
                    MMLookup.Open
                    MM_Lookup.MoveLast
                    NextCatalogID = MM_Lookup.Fields(“CatalogID”) + 1   'this is supposed to be my new ID value
                    Set MM_Lookup = Nothing
                    Set MM_editCmd = Server.CreateObject(“ADOB.Command”)
                    MM_editCmd.ActiveConnection = MM_CapConnect_STRING
                    MM_editcmd.CommandText = “INSET INTO dbo.tblCatalogItems (CatalogID, ModelName, Description, POCName, [POCPhone]) VALUES (NextCatalogID, ?,?,?,?)
                    MM_editcmd.Prepared = True
                    MM_edit.Parameters.Append MM_editcmd.CreateParameter(“param2”, 202, 1, 100, Request.Form(“modelname”) )
                  MM_edit.Parameters.Append MM_editcmd.CreateParameter(“param3”, 202, 1, 300, Request.Form(“Description”) )
    [Subject line edited by moderator to add server model]

    Ok, you've got lots of problems. First, explain again why you are not able to modify the CatologID to be an identity column? What is the datatype of that column now?
    Next, you are going about selecting your recordset incorrectly. If you are just looking for the last value inserted, there is no need to return all values to the recordset. Just select the max value:
    MM_Liikup.Source = “Select MAX (CatalogID) From dbo.tblCatalogItems”
    Next, you have a typo in your insert statement "“INSET INTO" should be "INSERT INTO"
    Next, your CommandText is wrong. There is no ending quote, and NextCatalogID will be treated as a string literal, not a variable. Use a ? placeholder for it and use the CreateParameter method to populate it.
    Next, your command text includes 4 placeholder, but you are only populating 2.
    But even when you get this to work it will be problematic. What happens when 2 users execute this at the same time? They both read the same value for the max record and increment by one, but the first will succeed and the second will fail. That's why it is always better to use an auto increment (Identity) column.

  • Show region if empty not working (ASP)

    I have created an app in ASP (not .NET) to record some supplier stock info, with a summary page displaying a filtered recordset based upon the logged in user which is working fine and dandy... the problem lies when no records exist for the current user the summary page is coming back with the standard ASP, ADO error meaning no records exist: -
    ADODB.Field error '800a0bcd'
    Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
    So I have tried adding "show region" behaviors to show a "no records exist" message and hiding the table containing the summary info, but the above error is still showing when I would only expect the "no records exist" message to display... page code as follows, all help appreciated..!
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <%
    ' *** Logout the current user.
    MM_Logout = CStr(Request.ServerVariables("URL")) & "?MM_Logoutnow=1"
    If (CStr(Request("MM_Logoutnow")) = "1") Then
      Session.Contents.Remove("MM_Username")
      Session.Contents.Remove("MM_UserAuthorization")
      MM_logoutRedirectPage = "index.asp"
      ' redirect with URL parameters (remove the "MM_Logoutnow" query param).
      if (MM_logoutRedirectPage = "") Then MM_logoutRedirectPage = CStr(Request.ServerVariables("URL"))
      If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
        MM_newQS = "?"
        For Each Item In Request.QueryString
          If (Item <> "MM_Logoutnow") Then
            If (Len(MM_newQS) > 1) Then MM_newQS = MM_newQS & "&"
            MM_newQS = MM_newQS & Item & "=" & Server.URLencode(Request.QueryString(Item))
          End If
        Next
        if (Len(MM_newQS) > 1) Then MM_logoutRedirectPage = MM_logoutRedirectPage & MM_newQS
      End If
      Response.Redirect(MM_logoutRedirectPage)
    End If
    %>
    <!--#include file="Connections/StockLevels.asp" -->
    <%
    ' *** Restrict Access To Page: Grant or deny access to this page
    MM_authorizedUsers=""
    MM_authFailedURL="index.asp"
    MM_grantAccess=false
    If Session("MM_Username") <> "" Then
      If (true Or CStr(Session("MM_UserAuthorization"))="") Or _
             (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
        MM_grantAccess = true
      End If
    End If
    If Not MM_grantAccess Then
      MM_qsChar = "?"
      If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
      MM_referrer = Request.ServerVariables("URL")
      if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
      MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
      Response.Redirect(MM_authFailedURL)
    End If
    %>
    <%
    if Session("MM_Username")="" then
    Response.Redirect("index.asp")
    end if
    %>
    <%
    Dim Recordset1__MMColParam
    Recordset1__MMColParam = "1"
    If (Session("MM_Username") <> "") Then
      Recordset1__MMColParam = Session("MM_Username")
    End If
    %>
    <%
    Dim Recordset1
    Dim Recordset1_cmd
    Dim Recordset1_numRows
    Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
    Recordset1_cmd.ActiveConnection = MM_StockLevels_STRING
    Recordset1_cmd.CommandText = "SELECT * FROM AULWEB.TESTP12 WHERE SNAM12 = ? ORDER BY VNDR12 ASC"
    Recordset1_cmd.Prepared = true
    Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 200, 1, 15, Recordset1__MMColParam) ' adVarChar
    Set Recordset1 = Recordset1_cmd.Execute
    Recordset1_numRows = 0
    %>
    <%
    Dim Repeat1__numRows
    Dim Repeat1__index
    Repeat1__numRows = 10
    Repeat1__index = 0
    Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
    %>
    <%
    '  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
    Dim Recordset1_total
    Dim Recordset1_first
    Dim Recordset1_last
    ' set the record count
    Recordset1_total = Recordset1.RecordCount
    ' set the number of rows displayed on this page
    If (Recordset1_numRows < 0) Then
      Recordset1_numRows = Recordset1_total
    Elseif (Recordset1_numRows = 0) Then
      Recordset1_numRows = 1
    End If
    ' set the first and last displayed record
    Recordset1_first = 1
    Recordset1_last  = Recordset1_first + Recordset1_numRows - 1
    ' if we have the correct record count, check the other stats
    If (Recordset1_total <> -1) Then
      If (Recordset1_first > Recordset1_total) Then
        Recordset1_first = Recordset1_total
      End If
      If (Recordset1_last > Recordset1_total) Then
        Recordset1_last = Recordset1_total
      End If
      If (Recordset1_numRows > Recordset1_total) Then
        Recordset1_numRows = Recordset1_total
      End If
    End If
    %>
    <%
    ' *** Recordset Stats: if we don't know the record count, manually count them
    If (Recordset1_total = -1) Then
      ' count the total records by iterating through the recordset
      Recordset1_total=0
      While (Not Recordset1.EOF)
        Recordset1_total = Recordset1_total + 1
        Recordset1.MoveNext
      Wend
      ' reset the cursor to the beginning
      If (Recordset1.CursorType > 0) Then
        Recordset1.MoveFirst
      Else
        Recordset1.Requery
      End If
      ' set the number of rows displayed on this page
      If (Recordset1_numRows < 0 Or Recordset1_numRows > Recordset1_total) Then
        Recordset1_numRows = Recordset1_total
      End If
      ' set the first and last displayed record
      Recordset1_first = 1
      Recordset1_last = Recordset1_first + Recordset1_numRows - 1
      If (Recordset1_first > Recordset1_total) Then
        Recordset1_first = Recordset1_total
      End If
      If (Recordset1_last > Recordset1_total) Then
        Recordset1_last = Recordset1_total
      End If
    End If
    %>
    <%
    Dim MM_paramName
    %>
    <%
    ' *** Move To Record and Go To Record: declare variables
    Dim MM_rs
    Dim MM_rsCount
    Dim MM_size
    Dim MM_uniqueCol
    Dim MM_offset
    Dim MM_atTotal
    Dim MM_paramIsDefined
    Dim MM_param
    Dim MM_index
    Set MM_rs    = Recordset1
    MM_rsCount   = Recordset1_total
    MM_size      = Recordset1_numRows
    MM_uniqueCol = ""
    MM_paramName = ""
    MM_offset = 0
    MM_atTotal = false
    MM_paramIsDefined = false
    If (MM_paramName <> "") Then
      MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")
    End If
    %>
    <%
    ' *** Move To Record: handle 'index' or 'offset' parameter
    if (Not MM_paramIsDefined And MM_rsCount <> 0) then
      ' use index parameter if defined, otherwise use offset parameter
      MM_param = Request.QueryString("index")
      If (MM_param = "") Then
        MM_param = Request.QueryString("offset")
      End If
      If (MM_param <> "") Then
        MM_offset = Int(MM_param)
      End If
      ' if we have a record count, check if we are past the end of the recordset
      If (MM_rsCount <> -1) Then
        If (MM_offset >= MM_rsCount Or MM_offset = -1) Then  ' past end or move last
          If ((MM_rsCount Mod MM_size) > 0) Then         ' last page not a full repeat region
            MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
          Else
            MM_offset = MM_rsCount - MM_size
          End If
        End If
      End If
      ' move the cursor to the selected record
      MM_index = 0
      While ((Not MM_rs.EOF) And (MM_index < MM_offset Or MM_offset = -1))
        MM_rs.MoveNext
        MM_index = MM_index + 1
      Wend
      If (MM_rs.EOF) Then
        MM_offset = MM_index  ' set MM_offset to the last possible record
      End If
    End If
    %>
    <%
    ' *** Move To Record: if we dont know the record count, check the display range
    If (MM_rsCount = -1) Then
      ' walk to the end of the display range for this page
      MM_index = MM_offset
      While (Not MM_rs.EOF And (MM_size < 0 Or MM_index < MM_offset + MM_size))
        MM_rs.MoveNext
        MM_index = MM_index + 1
      Wend
      ' if we walked off the end of the recordset, set MM_rsCount and MM_size
      If (MM_rs.EOF) Then
        MM_rsCount = MM_index
        If (MM_size < 0 Or MM_size > MM_rsCount) Then
          MM_size = MM_rsCount
        End If
      End If
      ' if we walked off the end, set the offset based on page size
      If (MM_rs.EOF And Not MM_paramIsDefined) Then
        If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
          If ((MM_rsCount Mod MM_size) > 0) Then
            MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
          Else
            MM_offset = MM_rsCount - MM_size
          End If
        End If
      End If
      ' reset the cursor to the beginning
      If (MM_rs.CursorType > 0) Then
        MM_rs.MoveFirst
      Else
        MM_rs.Requery
      End If
      ' move the cursor to the selected record
      MM_index = 0
      While (Not MM_rs.EOF And MM_index < MM_offset)
        MM_rs.MoveNext
        MM_index = MM_index + 1
      Wend
    End If
    %>
    <%
    ' *** Move To Record: update recordset stats
    ' set the first and last displayed record
    Recordset1_first = MM_offset + 1
    Recordset1_last  = MM_offset + MM_size
    If (MM_rsCount <> -1) Then
      If (Recordset1_first > MM_rsCount) Then
        Recordset1_first = MM_rsCount
      End If
      If (Recordset1_last > MM_rsCount) Then
        Recordset1_last = MM_rsCount
      End If
    End If
    ' set the boolean used by hide region to check if we are on the last record
    MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
    %>
    <%
    ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
    Dim MM_keepNone
    Dim MM_keepURL
    Dim MM_keepForm
    Dim MM_keepBoth
    Dim MM_removeList
    Dim MM_item
    Dim MM_nextItem
    ' create the list of parameters which should not be maintained
    MM_removeList = "&index="
    If (MM_paramName <> "") Then
      MM_removeList = MM_removeList & "&" & MM_paramName & "="
    End If
    MM_keepURL=""
    MM_keepForm=""
    MM_keepBoth=""
    MM_keepNone=""
    ' add the URL parameters to the MM_keepURL string
    For Each MM_item In Request.QueryString
      MM_nextItem = "&" & MM_item & "="
      If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
        MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
      End If
    Next
    ' add the Form variables to the MM_keepForm string
    For Each MM_item In Request.Form
      MM_nextItem = "&" & MM_item & "="
      If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
        MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
      End If
    Next
    ' create the Form + URL string and remove the intial '&' from each of the strings
    MM_keepBoth = MM_keepURL & MM_keepForm
    If (MM_keepBoth <> "") Then
      MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
    End If
    If (MM_keepURL <> "")  Then
      MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
    End If
    If (MM_keepForm <> "") Then
      MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
    End If
    ' a utility function used for adding additional parameters to these strings
    Function MM_joinChar(firstItem)
      If (firstItem <> "") Then
        MM_joinChar = "&"
      Else
        MM_joinChar = ""
      End If
    End Function
    %>
    <%
    ' *** Move To Record: set the strings for the first, last, next, and previous links
    Dim MM_keepMove
    Dim MM_moveParam
    Dim MM_moveFirst
    Dim MM_moveLast
    Dim MM_moveNext
    Dim MM_movePrev
    Dim MM_urlStr
    Dim MM_paramList
    Dim MM_paramIndex
    Dim MM_nextParam
    MM_keepMove = MM_keepBoth
    MM_moveParam = "index"
    ' if the page has a repeated region, remove 'offset' from the maintained parameters
    If (MM_size > 1) Then
      MM_moveParam = "offset"
      If (MM_keepMove <> "") Then
        MM_paramList = Split(MM_keepMove, "&")
        MM_keepMove = ""
        For MM_paramIndex = 0 To UBound(MM_paramList)
          MM_nextParam = Left(MM_paramList(MM_paramIndex), InStr(MM_paramList(MM_paramIndex),"=") - 1)
          If (StrComp(MM_nextParam,MM_moveParam,1) <> 0) Then
            MM_keepMove = MM_keepMove & "&" & MM_paramList(MM_paramIndex)
          End If
        Next
        If (MM_keepMove <> "") Then
          MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
        End If
      End If
    End If
    ' set the strings for the move to links
    If (MM_keepMove <> "") Then
      MM_keepMove = Server.HTMLEncode(MM_keepMove) & "&"
    End If
    MM_urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="
    MM_moveFirst = MM_urlStr & "0"
    MM_moveLast  = MM_urlStr & "-1"
    MM_moveNext  = MM_urlStr & CStr(MM_offset + MM_size)
    If (MM_offset - MM_size < 0) Then
      MM_movePrev = MM_urlStr & "0"
    Else
      MM_movePrev = MM_urlStr & CStr(MM_offset - MM_size)
    End If
    %>
    <% Session ("accountname") = Recordset1.Fields.Item("SNAM12").Value%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>S2N part stock summary</title>
    <link href="Style.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="352"><img src="Assets/invertednifco.jpg" alt="Nifco logo" width="199" height="55" longdesc="http://www.nifcoeu.com" /></td>
        <td width="34%"> </td>
        <td width="352" align="right" valign="top" class="style23"><p>Logged in as:
          <%Response.Write(Session("MM_Username"))%>
                <br />
            <a href="<%= MM_Logout %>">Logout</a></p></td>
      </tr>
      <tr>
        <td width="352" valign="bottom"><img src="Assets/horizontal_grey_line.jpg" alt="grey line" width="352" height="5" /></td>
        <td> </td>
        <td width="352"> </td>
      </tr>
      <tr>
        <td width="352" class="style4"><span class="nifco_banner_txt">NI</span><span class="style21"><span class="nifcoF">f</span></span><span class="nifco_banner_txt">CO UK LIMITED</span></td>
        <td> </td>
        <td width="352"> </td>
      </tr>
      <tr>
        <td width="352" height="52" class="style4"> </td>
        <td> </td>
        <td width="352"> </td>
      </tr>
      <tr>
        <td colspan="3" align="center" valign="middle"><table width="99%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000">
          <tr>
            <td><div align="center">
              <h5 align="center">Your part number</h5>
            </div></td>
            <td><div align="center">
              <h5 align="center">Nifco part number</h5>
            </div></td>
            <td><div align="center">
              <h5 align="center">Part description</h5>
            </div></td>
            <td><div align="center">
              <h5 align="center">Actual stock</h5>
            </div></td>
            <td><div align="center">
              <h5 align="center">Stock on Order</h5>
            </div></td>
            <td><div align="center">
              <h5 align="center">Stock in Transit</h5>
            </div></td>
            <td><div align="center">
              <h5 align="center">UOM</h5>
            </div></td>
            <td><div>
              <h5 align="center">Nifco specific part</h5>
            </div></td>
            <td><h5> </h5></td>
            <td> </td>
          </tr>
          <%
    Dim RecordCounter
    RecordCounter = 0
    %>
          <%
    While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
    %>
              <% If Not Recordset1.EOF Or Not Recordset1.BOF Then %>
                <tr bgcolor=
              "<%
        RecordCounter = RecordCounter + 1
        If RecordCounter Mod 2 = 1 Then
          Response.Write "#999999"
         End If
        %>"
            >
                  <td><div>
                      <p align="center"><%=(Recordset1.Fields.Item("VNDR12").Value)%> </p>
                  </div></td>
                  <td><div>
                      <p align="center"><%=(Recordset1.Fields.Item("PNUM12").Value)%> </p>
                  </div></td>
                  <td><div>
                      <p align="center"><%=(Recordset1.Fields.Item("PDES12").Value)%></p>
                  </div></td>
                  <td><div>
                      <p align="center"><%=(Recordset1.Fields.Item("ASTK12").Value)%> </p>
                  </div></td>
                  <td><div>
                      <p align="center"><%=(Recordset1.Fields.Item("OSTK12").Value)%></p>
                  </div></td>
                  <td><div>
                      <p align="center"><%=(Recordset1.Fields.Item("ISTK12").Value)%></p>
                  </div></td>
                  <td><div>
                      <p align="center"><%=(Recordset1.Fields.Item("UOFM12").Value)%></p>
                  </div></td>
                  <td width="26"><div align="center"><%=(Recordset1.Fields.Item("NIFC12").Value)%></div></td>
                  <td width="26"><p><a href="update.asp?<%= Server.HTMLEncode(MM_keepURL) & MM_joinChar(MM_keepURL) & "VNDR12=" & Recordset1.Fields.Item("VNDR12").Value %>">Edit</a></p></td>
                  <td width="45"><p align="center"><a href="delete.asp?VNDR12=<%=(Recordset1.Fields.Item("VNDR12").Value)%>">Delete</a></p></td>
                </tr>
                <% End If ' end Not Recordset1.EOF Or NOT Recordset1.BOF %>
              <%
      Repeat1__index=Repeat1__index+1
      Repeat1__numRows=Repeat1__numRows-1
      Recordset1.MoveNext()
    Wend
    %>
        </table>
            <p> </p></td>
      </tr>
      <tr>
        <td width="352"> </td>
        <td><div align="center">
          <table border="0">
              <tr>
                <td><% If MM_offset <> 0 Then %>
                    <a href="<%=MM_moveFirst%>">First</a>
                    <% End If ' end MM_offset <> 0 %>            </td>
                <td><% If MM_offset <> 0 Then %>
                    <a href="<%=MM_movePrev%>">Previous</a>
                    <% End If ' end MM_offset <> 0 %>            </td>
                <td><% If Not MM_atTotal Then %>
                    <a href="<%=MM_moveNext%>">Next</a>
                    <% End If ' end Not MM_atTotal %>            </td>
                <td><% If Not MM_atTotal Then %>
                    <a href="<%=MM_moveLast%>">Last</a>
                    <% End If ' end Not MM_atTotal %>            </td>
              </tr>
              </table>
        </div>      <p align="center">      Records <%=(Recordset1_first)%> to <%=(Recordset1_last)%> of <%=(Recordset1_total)%></p></td>
        <td width="352" height="52" align="right" valign="bottom"> </td>
      </tr>
      <tr>
        <td width="352" align="center"><a href="newpart.asp">Register a new part</a></td>
        <td><% If Recordset1.EOF And Recordset1.BOF Then %>
            <div align="center">
              <h5>I'm sorry, no records found.<br />
                <input type="button" name="btnCancel" value="Go back!" onclick="history.back()"/>
                    </h5>
            </div>
            <% End If ' end Recordset1.EOF And Recordset1.BOF %></td>
        <td width="352" align="right" valign="bottom"><img src="Assets/horizontal_grey_line.jpg" alt="grey line" width="353" height="5" /></td>
      </tr>
      <tr>
        <td width="352"> </td>
        <td> </td>
        <td width="352"><div align="left"><span class="nifco_banner_txt">NI</span><span class="nifcoF">f</span><span class="style21"><span class="nifco_banner_txt">CO UK LIMITED</span></span></div></td>
      </tr>
      <tr>
        <td colspan="3"><div align="center" class="p_text">Nifco Supplier Stock Management System</div></td>
      </tr>
    </table>
    </body>
    </html>
    <%
    Recordset1.Close()
    Set Recordset1 = Nothing
    %>

    It depends on the markup situation, for example if your
    images are *not* wrapped in a container element that contains just
    the image, then I would do something like this:
    <img spry:if="'{boximage}' != '' &amp;&amp;
    '{boximage}' != 'undefined'" src="{boximage}" />
    <img spry:if="'{boximage}' == '' || '{boximage}' ==
    'undefined'" src="MissingImage.jpg" />
    Or in the case of the products demo where we have an image in
    a <p> I would use a spry:choose:
    <p spry:choose="choose">
    <img spry:when="'{boximage}' != '' &amp;&amp;
    '{boximage}' != 'undefined'" src="{boximage}" />
    <img spry:default="default" src="MissingImage.jpg" />
    </p>
    Using spry:choose where you can is better because it means
    the region processing code has one less conditional expression to
    evaluate since the default case has no expression associated with
    it.
    --== Kin ==--

  • ASP VBScript and ADDT Dynamic List Wizard HELP

    Using ADDT I've created a dynamic list in a membership area. How do I get that dynamic list to populate only the data for that particular member that is logged in. Any help would be so much appreciated as I have been trying to figure this out for days now.
    <br />
    <br /><%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <br />
    <!--#include file="../Connections/rentalpaypro.asp" -->
    <br />
    <!--#include file="../includes/common/KT_common.asp" -->
    <br />
    <!--#include file="../includes/tNG/tNG.inc.asp" -->
    <br /><%<br />'Start log out user<br />  Set logout = new tNG_Logout<br />  logout.setLogoutType "link"<br />  logout.setPageRedirect "../index.html"<br />  logout.Execute<br />'End log out user<br />%>
    <br />
    <!--#include file="../includes/tfi/TFI.asp" -->
    <br />
    <!--#include file="../includes/tso/TSO.asp" -->
    <br />
    <!--#include file="../includes/nav/NAV.asp" -->
    <br /><%<br />'Start Restrict Access to Page<br />  Dim restrict: Set restrict  = new tNG_RestrictAccess<br />  restrict.Init MM_rentalpaypro_STRING, "../"<br />'Grand Levels: Any<br />  restrict.Execute<br />'End Restrict Access to Page<br />%>
    <br /><%<br />' Filter<br />  Dim tfi_listLandlord_Property1: Set tfi_listLandlord_Property1 = new TFI_TableFilter<br />  tfi_listLandlord_Property1.Init MM_rentalpaypro_STRING, "tfi_listLandlord_Property1"<br />  tfi_listLandlord_Property1.addColumn "Landlord_Property.ContactInfoID", "NUMERIC_TYPE", "ContactInfoID", "="<br />  tfi_listLandlord_Property1.addColumn "Landlord_Property.RegistrationID", "NUMERIC_TYPE", "RegistrationID", "="<br />  tfi_listLandlord_Property1.addColumn "Landlord_Property.StreetNumber", "NUMERIC_TYPE", "StreetNumber", "="<br />  tfi_listLandlord_Property1.addColumn "Landlord_Property.StreetName", "STRING_TYPE", "StreetName", "%"<br />  tfi_listLandlord_Property1.addColumn "Landlord_Property.AptNumber", "NUMERIC_TYPE", "AptNumber", "="<br />  tfi_listLandlord_Property1.addColumn "Landlord_Property.City", "STRING_TYPE", "City", "%"<br />  tfi_listLandlord_Property1.addColumn "Landlord_Property.State", "STRING_TYPE", "State", "%"<br />  tfi_listLandlord_Property1.addColumn "Landlord_Property.ZipCode", "NUMERIC_TYPE", "ZipCode", "="<br />  tfi_listLandlord_Property1.addColumn "Landlord_Property.MonthlyRent", "NUMERIC_TYPE", "MonthlyRent", "="<br />  tfi_listLandlord_Property1.Execute()<br /><br />' Sorter<br />  Dim tso_listLandlord_Property1: Set tso_listLandlord_Property1 = new TSO_TableSorter<br />  tso_listLandlord_Property1.Init "rslistLandlord_Property1", "tso_listLandlord_Property1"<br />  tso_listLandlord_Property1.addColumn "Landlord_Property.ContactInfoID"<br />  tso_listLandlord_Property1.addColumn "Landlord_Property.RegistrationID"<br />  tso_listLandlord_Property1.addColumn "Landlord_Property.StreetNumber"<br />  tso_listLandlord_Property1.addColumn "Landlord_Property.StreetName"<br />  tso_listLandlord_Property1.addColumn "Landlord_Property.AptNumber"<br />  tso_listLandlord_Property1.addColumn "Landlord_Property.City"<br />  tso_listLandlord_Property1.addColumn "Landlord_Property.State"<br />  tso_listLandlord_Property1.addColumn "Landlord_Property.ZipCode"<br />  tso_listLandlord_Property1.addColumn "Landlord_Property.MonthlyRent"<br />  tso_listLandlord_Property1.setDefault "Landlord_Property.ContactInfoID"<br />  tso_listLandlord_Property1.Execute()<br /><br />' Navigation<br />  Dim nav_listLandlord_Property1: Set nav_listLandlord_Property1 = new NAV_Regular<br />  nav_listLandlord_Property1.Init "nav_listLandlord_Property1", "rsLandlord_Property1", "../", Request.ServerVariables("URL"), 10<br />%>
    <br /><%<br />Dim qry_contactinfo__MMColParam<br />qry_contactinfo__MMColParam = "1"<br />If (Session("kt_login_id") <> "") Then <br />  qry_contactinfo__MMColParam = Session("kt_login_id")<br />End If<br />%>
    <br />

    Use the session variable from the log in method (MM_Username as I recall) to create a recordset that you then use in the dynamic list versus using the whole table.

  • Error when accessing Access database in ASP?

    for some reason when I try to open my Access database it constantly and consistenly gives me an error message that claim the table or the query is not valid or the table cannot be found. Both the database and the table exist and are accessible with the files and all directories having a rwxr--r-- protection and the code below is extraordinarily simple. Can anybody tell me what's going on? I'm sure it's just a simple mistake, but it's driving me nuts!
    Thanks
    Ross
    ========================================================================================== =============================
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <!-- #include virtual="/includes/adovbs.inc" -->
    <!--#include virtual="/Connections/nextdns.asp" -->
    <%
    Dim rs1
    Dim rs1_cmd
    Dim rs1_numRows
    %>
    <%
    MM_nextdns_STRING ="PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("Database\ids2.mdb")
    %>
    <%=MM_NEXTDNS_STRING%>
    <%
    Set rs1_cmd = Server.CreateObject ("ADODB.Command")
    rs1_cmd.ActiveConnection = MM_nextdns_STRING
    rs1_cmd.CommandText = "SELECT * FROM [Customer]"
    rs1_cmd.Prepared = true
    Set rs1 = rs1_cmd.Execute
    rs1_numRows = 0
    %>
    <%
    Dim Repeat1__numRows
    Dim Repeat1__index
    Repeat1__numRows = 10
    Repeat1__index = 0
    rs1_numRows = rs1_numRows + Repeat1__numRows
    %>
    <%
    '  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
    Dim rs1_total
    Dim rs1_first
    Dim rs1_last
    ' set the record count
    rs1_total = rs1.RecordCount
    ' set the number of rows displayed on this page
    If (rs1_numRows < 0) Then
      rs1_numRows = rs1_total
    Elseif (rs1_numRows = 0) Then
      rs1_numRows = 1
    End If
    ' set the first and last displayed record
    rs1_first = 1
    rs1_last  = rs1_first + rs1_numRows - 1
    ' if we have the correct record count, check the other stats
    If (rs1_total <> -1) Then
      If (rs1_first > rs1_total) Then
        rs1_first = rs1_total
      End If
      If (rs1_last > rs1_total) Then
        rs1_last = rs1_total
      End If
      If (rs1_numRows > rs1_total) Then
        rs1_numRows = rs1_total
      End If
    End If
    %>
    <%
    ' *** Recordset Stats: if we don't know the record count, manually count them
    If (rs1_total = -1) Then
      ' count the total records by iterating through the recordset
      rs1_total=0
      While (Not rs1.EOF)
        rs1_total = rs1_total + 1
        rs1.MoveNext
      Wend
      ' reset the cursor to the beginning
      If (rs1.CursorType > 0) Then
        rs1.MoveFirst
      Else
        rs1.Requery
      End If
      ' set the number of rows displayed on this page
      If (rs1_numRows < 0 Or rs1_numRows > rs1_total) Then
        rs1_numRows = rs1_total
      End If
      ' set the first and last displayed record
      rs1_first = 1
      rs1_last = rs1_first + rs1_numRows - 1
      If (rs1_first > rs1_total) Then
        rs1_first = rs1_total
      End If
      If (rs1_last > rs1_total) Then
        rs1_last = rs1_total
      End If
    End If
    %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <p>wwwwwwwwwwwwwwwwwwwwwww</p>
    <%
    While ((Repeat1__numRows <> 0) AND (NOT rs1.EOF))
    %>
      <p><%=(rs1.Fields.Item("ID").Value)%>/ <%=(rs1.Fields.Item("FullName").Value)%> /<%=(rs1.Fields.Item("Email").Value)%></p>
      <%
      Repeat1__index=Repeat1__index+1
      Repeat1__numRows=Repeat1__numRows-1
      rs1.MoveNext()
    Wend
    %>
    <%=(rs1_first)%> /
    <%=(rs1_last)%> /
    <%=(rs1_total)%>
    </body>
    </html>
    <%
    rs1.Close()
    Set rs1 = Nothing
    %>

    You may also search for Access help at http://search.microsoft.com/search.aspx?mkt=en-US&setlang=en-US

  • Why ASP pages on desktop open in DW CS3

    Hello,
    I just completed the installation of CS3 on Win XP SP2
    machine. Everything seems to work fine, except that when I click on
    an ASP file, with the windows explorer, located anywhere on my pc
    the file opens in Dreamweaver CS3 instead of in Internet Explorer.
    Why is this? What's wrong?
    Just in case, Internet Explorer opens ASP files on the
    Internet.
    Any help would be greatly appreciated.
    Thank you,
    AP

    Not only is that page invalid HTML (the text needs to be in a
    container),
    but it also contains no ASP/VBScript, or any connection to a
    database.
    Notwithstanding that, however, merely opening this page in DW
    should not
    also fire up IE. And you sure shouldn't get any error on it -
    since there
    is really nothing there.
    Finally, you cannot just OPEN an ASP page from your computer
    in IE, you
    would have to SERVE it by browsing to -
    http://localhost/pathtothefile/filename.asp
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "bombolbi" <[email protected]> wrote in
    message
    news:[email protected]...
    > Wow, I neglected to mention. I do have XP Professional
    SP2 with IIS 5.1
    > running
    > on it.
    > I also checked the File Associations in windows
    explorere and is showing
    > that
    > ASP files open with Internet Explorer.
    >
    > BUT also, I jut noticed am getting the following: If I
    open an ASP file
    > from
    > within Dreamweaver CS3 on my PC, Internet Explorer opens
    but almost
    > immediately and say say:
    >
    > Active Server Pages error 'ASP 0201'
    >
    > Invalid Default Script Language
    >
    > The default script language specified for this
    application
    > is
    > invalid.
    >
    >
    > The ASP files am trying to open are not linked to an
    Access database,
    > they're
    > simply text files, here is the code of one just in case:
    >
    > <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    > Transitional//EN"
    > "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="
    http://www.w3.org/1999/xhtml">
    > <head>
    > <meta http-equiv="Content-Type" content="text/html; "
    />
    > <title>Untitled Document</title>
    > </head>
    >
    > <body>
    >
    > THIS IS MY TEST
    >
    > </body>
    > </html>.
    >
    >
    > But both IIS 5 and my asp page indicate that the script
    language is
    > VBScript.
    >
    > Any additional thoughts?
    > Thanks,
    > AP
    >
    >

  • Send.Asp File error does not send html form

    Hi,
    on my site I have a "contact us" page that contains an html form which I would like to be sent to a specific email once the user clicks on "send".
    I'm trying to do so with POST action connected to send.ASP file. but I keep getting this erro:
    CDO.Message.1 error '800401e4'
    Invalid syntax
    /send.asp, line 15
    Here is the Send.ASP code:
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <%
    Set myMail=CreateObject("CDO.Message")
    myMail.Subject="Message from site"
    myMail.From="[email protected]"
    myMail.To="[email protected]"
    myMail.CreateMHTMLBody "Name: " + Request.Form("Name") + "<br/>tel no: " + Request.Form("Tel_code") + Request.Form("Tel") + "<br/>Cell no: " + Request.Form("Cell_code") + Request.Form("Cell") + "<br/>Email: " + Request.Form("Email") + "<br/>Subject: " + Request.Form("Subject") + "<br/>message: " + Request.Form("Substence")
    myMail.Send
    set myMail=nothing
    %>
    </body>
    </html>
    here is my html form code:
    שם פרטי ומשפחה
    דואר אלקטרוני
    טלפון
    02
    03
    04
    08
    073
    077
    נייד
    052
    054
    057
    נושא
    תוכן ההודעה

    Hi,
    on my site I have a "contact us" page that contains an html form which I would like to be sent to a specific email once the user clicks on "send".
    I'm trying to do so with POST action connected to send.ASP file. but I keep getting this erro:
    CDO.Message.1 error '800401e4'
    Invalid syntax
    /send.asp, line 15
    Here is the Send.ASP code:
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <%
    Set myMail=CreateObject("CDO.Message")
    myMail.Subject="Message from site"
    myMail.From="[email protected]"
    myMail.To="[email protected]"
    myMail.CreateMHTMLBody "Name: " + Request.Form("Name") + "<br/>tel no: " + Request.Form("Tel_code") + Request.Form("Tel") + "<br/>Cell no: " + Request.Form("Cell_code") + Request.Form("Cell") + "<br/>Email: " + Request.Form("Email") + "<br/>Subject: " + Request.Form("Subject") + "<br/>message: " + Request.Form("Substence")
    myMail.Send
    set myMail=nothing
    %>
    </body>
    </html>
    here is my html form code:
    שם פרטי ומשפחה
    דואר אלקטרוני
    טלפון
    02
    03
    04
    08
    073
    077
    נייד
    052
    054
    057
    נושא
    תוכן ההודעה

  • ASP VBScript to XML RSS question

    I'm just not getting this to work in ASP VBScript.  I just want to loop the recordset so I have all the rows be translated into a xml based rss feed.  What I have makes sense to me, but I only get the first record no matter what I try.
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <!--#include file="Connections/cnConn.asp" -->
    <%
    set rsJobs = Server.CreateObject("ADODB.Recordset")
    rsJobs.ActiveConnection = MM_cnConn_STRING
    rsJobs.Source = "SELECT id, city, [state], jobtype, datePosted FROM DatabaseTable"
    rsJobs.CursorType = 0
    rsJobs.CursorLocation = 2
    rsJobs.LockType = 3
    rsJobs.Open()
    rsJobs_numRows = 0
    %>
    <%
    Dim Repeat1__numRows
    Dim Repeat1__index
    Repeat1__numRows = -1
    Repeat1__index = 0
    rsJobs_numRows = rsJobs_numRows + Repeat1__numRows
    %>
    <%
    response.write "<?xml version=""1.0"" encoding=""utf-8""?>"
    response.write "<rss version=""2.0"">"
    response.write "<channel>"
    response.write "<title></title>"
    response.write "<link>/</link>"
    response.write "<description></description>"
    %>
    <%
    While ((Repeat1__numRows <> 0) AND (NOT rsJobs.EOF))
    %>
    <%
      response.write "<item>"
      response.write "<title>" & (rsJobs.Fields.Item("jobtype").Value) & "</title>"
      response.write "<description>" & (rsJobs.Fields.Item("city").Value) & ", " & (rsJobs.Fields.Item("state").Value) & "</description>"
      response.write "<link>domain</link>"
      response.write "<pubDate>" & (rsJobs.Fields.Item("dateposted").Value) & "</pubDate>"
      response.write "</item>"
    %>
    <%
      Repeat1__index=Repeat1__index+1
      Repeat1__numRows=Repeat1__numRows-1
      rsJobs.MoveNext()
    Wend
    %>
    <%
    response.write "</channel>"
    response.write "</rss>"
    %>
    <%
    rsJobs.Close()
    Set rsJobs = Nothing
    %>

    Just giving it a casual look I don't see why it is not working. But why are you declaring all of those counters and then not using them? Seems to overly complicate things. I would get rid of all references to:
    rsJobs_numRows
    Dim Repeat1__numRows
    Dim Repeat1__index
    and then change the while loop test to:
    While (NOT rsJobs.EOF)
    It shouldn't really matter, since your counter used in the while test starts at -1 and is decremented so it should never = 0, but still, it's confusing to read.
    And of course, verify that the select statement actually returns more than one row. Use the recordcount property of the recordset.

  • ASP login success by authorization

    I am trying to create a login page in ASP where, on login
    success, the the user is directed to one of three separate pages.
    The SQL Table is LogIn
    The user name column is "email"
    The Password column is "password"
    The Access column is "permission"
    (If I create a simpler page where access is restricted by
    permission, then that works. So it would seem that the recordset is
    correctly set)
    Here is the code that I cannot get to work:
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <!--#include file="Connections/Fetchit.asp" -->
    <%
    Dim logIn
    Dim logIn_cmd
    Dim logIn_numRows
    Set logIn_cmd = Server.CreateObject ("ADODB.Command")
    logIn_cmd.ActiveConnection = MM_Fetchit_STRING
    logIn_cmd.CommandText = "SELECT * FROM fetchit_admin.LogIn"
    logIn_cmd.Prepared = true
    Set logIn = logIn_cmd.Execute
    logIn_numRows = 0
    %>
    <%
    ' *** Validate request to log in to this site.
    MM_LoginAction = Request.ServerVariables("URL")
    If Request.QueryString <> "" Then MM_LoginAction =
    MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
    MM_valUsername = CStr(Request.Form("email"))
    If MM_valUsername <> "" Then
    Dim MM_fldUserAuthorization
    Dim MM_redirectLoginSuccess
    Dim MM_redirectLoginFailed
    Dim MM_loginSQL
    Dim MM_rsUser
    Dim MM_rsUser_cmd
    MM_fldUserAuthorization = "Permission"
    MM_redirectLoginSuccess = "ALoginSuccess.asp"
    MM_redirectLoginFailed = "ALoginFail.asp"
    MM_loginSQL = "SELECT email, Password"
    If MM_fldUserAuthorization <> "" Then MM_loginSQL =
    MM_loginSQL & "," & MM_fldUserAuthorization
    MM_loginSQL = MM_loginSQL & " FROM fetchit_admin.LogIn
    WHERE email = ? AND Password = ?"
    Set MM_rsUser_cmd = Server.CreateObject ("ADODB.Command")
    MM_rsUser_cmd.ActiveConnection = MM_Fetchit_STRING
    MM_rsUser_cmd.CommandText = MM_loginSQL
    MM_rsUser_cmd.Parameters.Append
    MM_rsUser_cmd.CreateParameter("param1", 200, 1, 50, MM_valUsername)
    ' adVarChar
    MM_rsUser_cmd.Parameters.Append
    MM_rsUser_cmd.CreateParameter("param2", 200, 1, 50,
    Request.Form("password")) ' adVarChar
    MM_rsUser_cmd.Prepared = true
    Set MM_rsUser = MM_rsUser_cmd.Execute
    If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
    ' username and password match - this is a valid user
    Session("MM_Username") = MM_valUsername
    If (MM_fldUserAuthorization <> "") Then
    Session("MM_UserAuthorization") =
    CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
    Else
    Session("MM_UserAuthorization") = ""
    End If
    ' redirect user based on Access level
    If Session("MM_UserAuthorization") = "Admin" Then
    MM_redirectLoginSuccess = "1index.asp"
    ElseIf Session("MM_UserAuthorization") = "Account" Then
    MM_redirectLoginSuccess = "2Index.asp"
    Else MM_redirectLoginSuccess = "3index.asp"
    End If
    if CStr(Request.QueryString("accessdenied")) <> "" And
    false Then
    MM_redirectLoginSuccess =
    Request.QueryString("accessdenied")
    End If
    MM_rsUser.Close
    Response.Redirect(MM_redirectLoginSuccess)
    End If
    MM_rsUser.Close
    Response.Redirect(MM_redirectLoginFailed)
    End If
    %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <form id="form1" name="form1" method="POST"
    action="<%=MM_LoginAction%>">
    <input type="text" name="email" id="email" />
    <input type="text" name="password" id="password" />
    <input type="submit" name="button" id="button"
    value="Submit" />
    </form>
    </body>
    </html>
    <%
    logIn.Close()
    Set logIn = Nothing
    %>

    Are you saying that the code below does not work?
    ' redirect user based on Access level
    If Session("MM_UserAuthorization") = "Admin" Then
    MM_redirectLoginSuccess = "1index.asp"
    Else
    If Session("MM_UserAuthorization") = "Account" Then
    MM_redirectLoginSuccess = "2Index.asp"
    Else MM_redirectLoginSuccess = "3index.asp"
    End If
    if CStr(Request.QueryString("accessdenied")) <> "" And
    false Then
    MM_redirectLoginSuccess =
    Request.QueryString("accessdenied")
    End If
    MM_rsUser.Close
    Response.Redirect(MM_redirectLoginSuccess)
    End If
    MM_rsUser.Close
    Response.Redirect(MM_redirectLoginFailed)
    End If
    %>

  • Advanced filter recordset asp

    Hi,
    I m trying to filter an asp recordset with % wildcart but impossible to do it.
    Have got a asp form with a dropdown list based on a recordset that stores value (numeric) in a variable (id).
    So this variable is used on my result asp page to filter a new recordset by this numeric value.
    Im using wild card in order to display all records like this SQL query:
    SELECT *
    FROM proprietes
    WHERE ville LIKE %MMColParam%           
    MMColParam defined like this :
    Numeric
    Request.Form("ville")
    default value %
    So when it generates sql query, it gives SELECT *FROM proprietes WHERE ville LIKE '%MMColParam%' and testing it, it works (testing recordset in dream) but saving it and reopens recordset the query becomes :   SELECT *FROM proprietes WHERE ville LIKE %MMColParam%   and testing recordset gives error !!
    Someone can help me?
    Thanks a lot.

    Hi thanks a lot
    Here my asp form :
    Request form "ville" value is coming from access database and is a numeric value (autoid) wich is used to filer recordset on results page.
    I done this type of fiter several times with other version of dreamweaver but with CS4 impossible to do it (or i missed something!!)
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <!--#include file="Connections/immo.asp" -->
    <%
    Dim local
    Dim local_cmd
    Dim local_numRows
    Set local_cmd = Server.CreateObject ("ADODB.Command")
    local_cmd.ActiveConnection = MM_immo_STRING
    local_cmd.CommandText = "SELECT * FROM villes"
    local_cmd.Prepared = true
    Set local = local_cmd.Execute
    local_numRows = 0
    %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Document sans titre</title>
    </head>
    <body>
    <p> </p>
    <p> </p>
    <form id="form1" name="form1" method="post" action="resultats3.asp">
      <p> </p>
      <p>
        <label>
          <select name="ville" id="ville">
            <option value="%" <%If (Not isNull((local.Fields.Item("idville").Value))) Then If ("%" = CStr((local.Fields.Item("idville").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%>>Indifférent</option>
            <%
    While (NOT local.EOF)
    %>
    <option value="<%=(local.Fields.Item("idville").Value)%>" <%If (Not isNull((local.Fields.Item("idville").Value))) Then If (CStr(local.Fields.Item("idville").Value) = CStr((local.Fields.Item("idville").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(local.Fields.Item("ville").Value)%></option>
            <%
      local.MoveNext()
    Wend
    If (local.CursorType > 0) Then
      local.MoveFirst
    Else
      local.Requery
    End If
    %>
          </select>
        </label>
      </p>
      <p> </p>
      <p> </p>
      <p>
        <label>
          <input type="submit" name="button" id="button" value="Envoyer" />
        </label>
      </p>
    </form>
    <p> </p>
    <p> </p>
    </body>
    </html>
    <%
    local.Close()
    Set local = Nothing
    %>
    Here my asp results page:
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <!--#include file="Connections/immo.asp" -->
    <%
    Dim Recordset1__MMColParam
    Recordset1__MMColParam = "%"
    If (Request.Form("ville") <> "") Then
      Recordset1__MMColParam = Request.Form("ville")
    End If
    %>
    <%
    Dim Recordset1
    Dim Recordset1_cmd
    Dim Recordset1_numRows
    Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
    Recordset1_cmd.ActiveConnection = MM_immo_STRING
    Recordset1_cmd.CommandText = "SELECT * FROM proprietes WHERE ville Like ?"
    Recordset1_cmd.Prepared = true
    Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 5, 1, -1, "%" + Recordset1__MMColParam + "%") ' adDouble
    Set Recordset1 = Recordset1_cmd.Execute
    Recordset1_numRows = 0
    %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Document sans titre</title>
    </head>
    <body>
    <p><br />
      <%
    response.write(request.form("ville"))%>
      <br />
      <br />
      SELECT * <br />
      FROM proprietes<br />
      WHERE ville LIKE '%vil%'
    </p>
    <p> </p>
    <p><br />
      <br />
    </p>
    </body>
    </html>
    <%
    Recordset1.Close()
    Set Recordset1 = Nothing
    %>

  • ASP to XML and Spry not working

    I'm using ASP to create the XML, when I look at it in the
    browser it's well formed XML. But spry doesn't seem to see it that
    way or I'm missing something in my code. I saw someone ran into
    this same problem but the fix wasn't mentioned or maybe just not
    found. Can someone help out? Thanks
    My code looks like:
    quote:
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <%
    Dim MM_conn_STRING
    MM_conn_STRING =
    "Provider=SQLOLEDB;Server=*****;Database=*****;UID=*****;PWD=*****"
    %>
    <%
    Dim rsProject
    Dim rsProject_cmd
    Dim rsProject_numRows
    ' Query the database and get all the records from the Images
    table
    Set rsProject_cmd = Server.CreateObject ("ADODB.Command")
    rsProject_cmd.ActiveConnection = MM_conn_STRING
    rsProject_cmd.CommandText = "SELECT * FROM projects WHERE
    archive = 0 ORDER BY pName ASC"
    rsProject_cmd.Prepared = true
    Set rsProject = rsProject_cmd.Execute
    ' Send the headers
    Response.ContentType = "text/xml"
    Response.AddHeader "Pragma", "public"
    Response.AddHeader "Cache-control", "private"
    Response.AddHeader "Expires", "-1"
    %>
    <?xml version="1.0" encoding="utf-8"?>
    <data>
    <projects>
    <% While (NOT rsProject.EOF) %>
    <project>
    <ID><![CDATA[<%=(rsProject.Fields.Item("projectID").Value)%>]]></ID>
    <startDate><![CDATA[<%=(rsProject.Fields.Item("startDate").Value)%>]]></startDate>
    <endDate><![CDATA[<%=(rsProject.Fields.Item("endDate").Value)%>]]></endDate>
    <creationDate><![CDATA[<%=(rsProject.Fields.Item("creationDate").Value)%>]]></creationDat e>
    <issues><![CDATA[<%=(rsProject.Fields.Item("issues").Value)%>]]></issues>
    <customerName><![CDATA[<%=(rsProject.Fields.Item("customerName").Value)%>]]></customerNam e>
    <objective><![CDATA[<%=(rsProject.Fields.Item("objective").Value)%>]]></objective>
    <deliverables><![CDATA[<%=(rsProject.Fields.Item("deliverables").Value)%>]]></deliverable s>
    <audience><![CDATA[<%=(rsProject.Fields.Item("audience").Value)%>]]></audience>
    <forAndy><![CDATA[<%=(rsProject.Fields.Item("forAndy").Value)%>]]></forAndy>
    </project>
    <%
    rsProject.MoveNext()
    Wend
    %>
    </projects>
    </data>
    <%
    rsProject.Close()
    Set rsProject = Nothing
    %>
    And here's my html page:
    quote:
    <script src="SpryAssets/xpath.js"
    type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js"
    type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var ds1 = new Spry.Data.XMLDataSet("data/getProjectXML.asp",
    "data/projects/project",{distinctOnLoad:true,useCache:false});
    //-->
    </script>
    </head>
    <body>
    <div spry:region="ds1">
    <table>
    <tr>
    <th spry:sort="ID">ID</th>
    <th>StartDate</th>
    <th>EndDate</th>
    <th>CreationDate</th>
    <th>Issues</th>
    <th>CustomerName</th>
    </tr>
    <tr spry:repeat="ds1">
    <td>{ID}</td>
    <td>{startDate}</td>
    <td>{endDate}</td>
    <td>{creationDate}</td>
    <td>{issues}</td>
    <td>{customerName}</td>
    </tr>
    </table>
    </div>

    Looks to me as if you have two root nodes. Both data and
    projects appear to
    do the same thing. Why is that?
    Nancy
    "Mark.P." <[email protected]> wrote in message
    news:[email protected]...
    > I'm using ASP to create the XML, when I look at it in
    the browser it's
    > well
    > formed XML. But spry doesn't seem to see it that way or
    I'm missing
    > something
    > in my code. I saw someone ran into this same problem but
    the fix wasn't
    > mentioned or maybe just not found. Can someone help out?
    Thanks
    >
    > My code looks like:
    >
    quote:
    > <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    > <%
    > Dim MM_conn_STRING
    > MM_conn_STRING =
    >
    "Provider=SQLOLEDB;Server=*****;Database=*****;UID=*****;PWD=*****"
    > %>
    >
    > <%
    > Dim rsProject
    > Dim rsProject_cmd
    > Dim rsProject_numRows
    >
    > ' Query the database and get all the records from the
    Images table
    > Set rsProject_cmd = Server.CreateObject
    ("ADODB.Command")
    > rsProject_cmd.ActiveConnection = MM_conn_STRING
    > rsProject_cmd.CommandText = "SELECT * FROM projects
    WHERE archive = 0
    > ORDER BY
    > pName ASC"
    > rsProject_cmd.Prepared = true
    >
    > Set rsProject = rsProject_cmd.Execute
    >
    > ' Send the headers
    > Response.ContentType = "text/xml"
    > Response.AddHeader "Pragma", "public"
    > Response.AddHeader "Cache-control", "private"
    > Response.AddHeader "Expires", "-1"
    > %>
    > <?xml version="1.0" encoding="utf-8"?>
    > <data>
    > <projects>
    > <% While (NOT rsProject.EOF) %>
    > <project>
    >
    <ID><![CDATA[<%=(rsProject.Fields.Item("projectID").Value)%>]]></ID>
    >
    >
    <startDate><![CDATA[<%=(rsProject.Fields.Item("startDate").Value)%>]]></startD
    > ate>
    >
    >
    <endDate><![CDATA[<%=(rsProject.Fields.Item("endDate").Value)%>]]></endDate>
    >
    >
    <creationDate><![CDATA[<%=(rsProject.Fields.Item("creationDate").Value)%>]]></cr
    > eationDate>
    >
    >
    <issues><![CDATA[<%=(rsProject.Fields.Item("issues").Value)%>]]></issues>
    >
    >
    <customerName><![CDATA[<%=(rsProject.Fields.Item("customerName").Value)%>]]></cu
    > stomerName>
    >
    >
    <objective><![CDATA[<%=(rsProject.Fields.Item("objective").Value)%>]]></objectiv
    > e>
    >
    >
    <deliverables><![CDATA[<%=(rsProject.Fields.Item("deliverables").Value)%>]]></de
    > liverables>
    >
    >
    <audience><![CDATA[<%=(rsProject.Fields.Item("audience").Value)%>]]></audience>
    >
    >
    <forAndy><![CDATA[<%=(rsProject.Fields.Item("forAndy").Value)%>]]></forAndy>
    > </project>
    > <%
    > rsProject.MoveNext()
    > Wend
    > %>
    > </projects>
    > </data>
    > <%
    > rsProject.Close()
    > Set rsProject = Nothing
    > %>
    >
    >
    > And here's my html page:
    >
    quote:
    > <script src="SpryAssets/xpath.js"
    type="text/javascript"></script>
    > <script src="SpryAssets/SpryData.js"
    type="text/javascript"></script>
    > <script type="text/javascript">
    > <!--
    > var ds1 = new
    Spry.Data.XMLDataSet("data/getProjectXML.asp",
    >
    "data/projects/project",{distinctOnLoad:true,useCache:false});
    > //-->
    > </script>
    > </head>
    >
    > <body>
    > <div spry:region="ds1">
    > <table>
    > <tr>
    > <th spry:sort="ID">ID</th>
    > <th>StartDate</th>
    > <th>EndDate</th>
    > <th>CreationDate</th>
    > <th>Issues</th>
    > <th>CustomerName</th>
    > </tr>
    > <tr spry:repeat="ds1">
    > <td>{ID}</td>
    > <td>{startDate}</td>
    > <td>{endDate}</td>
    > <td>{creationDate}</td>
    > <td>{issues}</td>
    > <td>{customerName}</td>
    > </tr>
    > </table>
    > </div>
    >
    >

  • RSS Feed from dynamic asp page...?

    I want to create an RSS feed from the dynamic database content on this page, as well as many others like it, so whenever a new database record is added to the sql server database, the rss feed is automatically updated as well with a new entry. I have wracked my brain on this for days but i believe it might be a pretty straightforward process.  Any ideas...??
    http://www.ocfs.state.ny.us/main/defaultdatabaserss.asp
    SMAN

    How come it's not showing any of the records in the database as items in the feed? Here is the feed and the .asp file code below...
    http://www.ocfs.state.ny.us/main/rssFeed2.asp
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <%
    Dim MM_conn_STRING
    MM_conn_STRING = "Provider='SQLOLEDB';Data Source='SQLCFS0A1AAV,1533';Initial Catalog=OCFSWeb;User Id=ohrd;Password=ohrd;"
    %>
    <%
    Dim rsAll
    Dim rsAll_cmd
    Dim rsAll_numRows
    ' Query the database and get all the records from the Images table
    Set rsAll_cmd = Server.CreateObject ("ADODB.Command")
    rsAll_cmd.ActiveConnection = MM_conn_STRING
    rsAll_cmd.CommandText = "SELECT * FROM Images"
    rsAll_cmd.Prepared = true
    Set rsAll = rsAll_cmd.Execute
    ' Send the headers
    Response.ContentType = "text/xml"
    Response.AddHeader "Pragma", "public"
    Response.AddHeader "Cache-control", "private"
    Response.AddHeader "Expires", "-1"
    %><?xml version="1.0" encoding="utf-8"?>
    <rss version="2.0">
    <channel>
    <title>NYS OCFS RSS Feed</title>
        <link>http://www.ocfs.state.ny.us</link>
    <description>The Office of Children and Family Services serves New York's public by promoting the safety, permanency and well-being of our children, families and communities. We will achieve results by setting and enforcing policies, building partnerships, and funding and providing quality services.</description>
      <root>
        <% While (NOT rsAll.EOF) %>
    <row>
       <%
       For each field in rsAll.Fields
       column = field.name
       %>
      <<%=column%>><![CDATA[<%=(rsAll.Fields.Item(column).Value)%>]]></<%=column%>>
      <%
       Next
      %>
    </row>
        <%
       rsAll.MoveNext()
    Wend
    %>
    </root>
    </channel>
    </rss>
    <%
    rsAll.Close()
    Set rsAll = Nothing
    %>
    Can anyone help??
    Thanks!

Maybe you are looking for

  • How to control one server with multiple clients via TCP/IP

    I am wanting to control a single server with multiple clients.  Only one client would be active at a time, so there would be no conflict.  I want to use TCP/IP.  So far, I have programmed a cluster that passes data back to the server with no problems

  • In return order price should copy from the invoice

    Dear All, Greetings for the day, We are facing with the below issue, please help to resolve the issue. We have one discount condition type; scales have been maintained for that condition type. The scales are like below Up to 10,000 liters - 0% Above

  • LiveDrvPack.exe (SBLW-XPWEB-W3-

    Hello: I've recently updated my computer's OS to Win 2000 Professional and need to update a variety of drivers for hardware and update software. I think that I need to add which was apparently on the Creative Labs site at one point (July of 2002?)--b

  • Workflow: Automated email when field(date) is updated

    Gentlemen, I am trying to implement a workflow were an automated email is send as soon as a specific date is updated. The update happens via webservice. While testing the following criteria: [<date>] <> PRE('<date>') I found that it only sends an ema

  • HT3529 I am having trouble with my siri

    I have been trying to record a voice message and it is not responding