ASP VBScript

I created a simple update ASP VBscript form in Dreamweaver 8.
However the connection to my DB no longer works if someone enters
quotation marks. The quotation marks appear in my DB however the
connection is then broken, I think this is because quotation marks
and apostrophes are classed as special characters. Can anyone
advise me how I can modify my code to replace them with double
apostrophes?
Dim MM_editCmd
Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_connDB_STRING
MM_editCmd.CommandText = "UPDATE connDB SET title1 = ?,
body1 = ?, title2 = ?, body2 = ?, title3 = ?, body3 = ? WHERE body1
= ?"
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param1", 202, 1, 50,
Request.Form("textfield"))
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close

> Are developers "jumping ship" when it comes to ASP
VBScript development?
I love the VB.
Dan Smith > adobe community expert
http://www.dsmith.tv

Similar Messages

  • Need to update a record on page load. How? (ASP/VBScript)

    The standard Update Record behavior requires a form on the page, plus a recordset to identify the value to be updated. In my scenario, the value for the record to be updated is already in the URL as the ID. I just don't know how to write it myself and Dreamweaver won't do this.
    The page I want to do this on is a record detail page, so there is already a record ID already present in the querystring. The record is new until a user views it, and what I need is something that just writes a simple value to one field in the table for the record being viewed. This is it in a nutshell:
    Using the value from the ID in the URL querystring, update the "viewed" field in a specific table with the value of "y".
    This would be the first operation as the page loads and then the page would load and show the data that it already does.
    I'd be happy with raw code is someone is generous enough to provide that, or perhaps some instructional help on reverse engineering the standard update record code generated by Dreamweaver. Or, if you know of any extensions designed to do this - I'd be interested in that too!
    My app I'm working on is in ASP/vbscript.
    Subject line edited by moderator to indicate server model

    Good point! I wasn't thinking about how that would make the app vulnerable to sql injection.
    The function I want to perform is similar to how an email changes from unread to read when you view it. I simple want the records being viewed to take on the status of being read or "viewed". Perhaps I'm going about this in the wrong way, but I've been planning to use a database field as the indicator of whether a record has a viewed status or not. Null value is new, and a value of "y" (yes) meaning the value is viewed/read.
    If you have a better recommendation, I'm all ears.

  • Code Coloring, ASP/VBScript, & CS5

    My IT area has set up the web  server  to process all .HTM files as if they were .ASP. Subsequently, I  cannot  view my HTM files as they would appear if they were "true" ASP  files in  Dreamweaver CS5. I applied the changes described in TechNote  16410 to MMDocumentTypes.xml (removing the HTM extension from the winfileextension and macfileextension attirbutes of the HTML InternalType and adding the HTM extension to the winfileextension and macfileextension attirbutes of the ASP-VBScript InternalType). I moved HTM in Extensions.txt from the HTML Documents line to the Active Server Pages line and I removed the backup I had made of MMDocumentTypes.xml from the Adobe directory.
    Based on another posting in this forum regarding code coloring, I added <%@LANGUAGE="VBSCRIPT"%> to the first line of my HTM (ASP) file.
    No matter which file with the HTM extension I open in Dreamweaver, I get this message:
    When  this happens also I need to terminate Dreamweaver using Windows XP's  Task Manager.  File > Close, application "close" [X] button, Ctrl+Q  and Alt+F4 do not  work.

    As far as I know (could be wrong here), DW does not allow you to alter the behavior of htm(l) files. The technote is aimed at adding new file types that DW doesn't already recognize.

  • 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.

  • Simple call to stored function from asp (vbscript) adodb

    please let me know if this question would be better suited to another forum.
    i am simply attempting to call an oracle stored function that returns a varchar2 from an asp vbscript page using adodb. i have calling of stored procedures working fine.
    attempting to call the function with the following code:
    set sp_aprvd_cr = Server.CreateObject("ADODB.Command")
    sp_aprvd_cr.ActiveConnection = MM_MHR_CONN_STR_STRING
    sp_aprvd_cr.CommandType = 4
    sp_aprvd_cr.CommandTimeout = 0
    sp_aprvd_cr.Prepared = true
    sp_aprvd_cr.CommandText = "PMS.sp_hpmsq054_aprvd_cr"
    sp_aprvd_cr.Parameters.Append sp_aprvd_cr.CreateParameter("IP_PMSPT_ID", 200, 1,10,sp_aprvd_cr__P_PMSPT_ID)
    sp_aprvd_cr.Parameters.Append sp_aprvd_cr.CreateParameter("return_param", adVarchar, adParamOutput)
    set rst_aprvd_cr = sp_aprvd_cr.Execute
    suspect that preparing the return code is where i am having troubles.
    any examples or assistance would be greatly appreciated.
    thanks in advance.

    Return value from stored function must be the first parameter in the parameters collection.
    So, try this instead,
    sp_aprvd_cr.Parameters.Append sp_aprvd_cr.CreateParameter("return_param", adVarchar, adParamOutput)
    sp_aprvd_cr.Parameters.Append sp_aprvd_cr.CreateParameter("IP_PMSPT_ID", 200, 1,10,sp_aprvd_cr__P_PMSPT_ID)Cheers,
    NH

  • Update multiple records with Update Command Dreamweaver 8.0.2 - ASP VBScript

    Dreamweaver 8.0.2 - Language ASP – VBScript
    I’m trying to update more than one record at a time
    using checkboxes. I’ve successfully done this numerous times
    prior to Dreamweaver 8.0.2.
    Before Dreamweaver 8.0.2, I would create a page with a
    recordset, form, checkbox and repeat region and pass the ID to
    another page containing an ‘Update Command’. The code
    on the Update page looked similar to the following:
    <%
    if(Request.QueryString("MemberID") <> "") then
    spMemberApproving__MMColParam = Request.QueryString("MemberID")
    %>
    <%
    set spMemberApproving = Server.CreateObject("ADODB.Command")
    spMemberApproving.ActiveConnection =
    MM_connIssuesManager_STRING
    spMemberApproving.CommandText = "UPDATE tblMembers SET
    MemberApproved = 1 WHERE MemberID IN (" +
    Replace(spMemberApproving__MMColParam, "'", "''") + ")"
    spMemberApproving.CommandType = 1
    spMemberApproving.CommandTimeout = 0
    spMemberApproving.Prepared = true
    spMemberApproving.Execute()
    Response.Redirect("default.asp")
    %>
    However, in Dreamweaver 8.0.2 when you fill out the Update
    Command dialog box, Dreamweaver asks you to provide the
    ‘Type’ and ‘Size’ for the variables (see:
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=4e6b330a
    That being said and done, the code on the Update page looks
    like the following:
    <%
    ' IIf implementation
    Function MM_IIf(condition, ifTrue, ifFalse)
    If condition = "" Then
    MM_IIf = ifFalse
    Else
    MM_IIf = ifTrue
    End If
    End Function
    %>
    <%
    if(Request.QueryString("MemberID") <> "") then
    spMemberApproving__MMColParam = Request.QueryString("MemberID")
    %>
    <%
    Set spMemberApproving = Server.CreateObject ("ADODB.Command")
    spMemberApproving.ActiveConnection =
    MM_connIssuesManager_STRING
    spMemberApproving.CommandText = "UPDATE tblMembers SET
    MemberApproved = 1 WHERE MemberID IN (?) "
    spMemberApproving.Parameters.Append
    spMemberApproving.CreateParameter("MMColParam", 202, 1, 10,
    MM_IIF(Request.QueryString("MemberID"),
    Request.QueryString("MemberID"), spMemberApproving__MMColParam
    spMemberApproving.CommandType = 1
    spMemberApproving.CommandTimeout = 0
    spMemberApproving.Prepared = true
    spMemberApproving.Execute()
    Response.Redirect("default.asp")
    %>
    The Update Command works perfectly when only 1 record is
    being updated. However, when I try to update more than one record I
    get the following error:
    Error Type:
    ADODB.Command (0x800A0D5D)
    Application uses a value of the wrong type for the current
    operation.
    /issues_manager/admin/members_approving.asp, line 27
    Can anyone help me out?

    Yes, this is a bug in Dreamweaver 8.0.2. The only workaround
    is to stay with
    8.0.1 or to hand-code the query. Adobe removed most of the
    useful ways to
    use Commands and Recordsets in 8.0.2 and limited it to basic
    queries.
    Tom Muck
    co-author Dreamweaver MX 2004: The Complete Reference
    http://www.tom-muck.com/
    Cartweaver Development Team
    http://www.cartweaver.com
    Extending Knowledge Daily
    http://www.communitymx.com/
    "Button1" <[email protected]> wrote in message
    news:[email protected]...
    > Dreamweaver 8.0.2 - Language ASP ? VBScript
    >
    > I?m trying to update more than one record at a time
    using checkboxes.
    > I?ve
    > successfully done this numerous times prior to
    Dreamweaver 8.0.2.
    >
    > Before Dreamweaver 8.0.2, I would create a page with a
    recordset, form,
    > checkbox and repeat region and pass the ID to another
    page containing an
    > ?Update Command?. The code on the Update page looked
    similar to the
    > following:
    >
    > <%
    > if(Request.QueryString("MemberID") <> "") then
    > spMemberApproving__MMColParam =
    > Request.QueryString("MemberID")
    > %>
    >
    > <%
    >
    > set spMemberApproving =
    Server.CreateObject("ADODB.Command")
    > spMemberApproving.ActiveConnection =
    MM_connIssuesManager_STRING
    > spMemberApproving.CommandText = "UPDATE tblMembers SET
    MemberApproved = 1
    > WHERE MemberID IN (" +
    Replace(spMemberApproving__MMColParam, "'", "''") +
    > ")"
    > spMemberApproving.CommandType = 1
    > spMemberApproving.CommandTimeout = 0
    > spMemberApproving.Prepared = true
    > spMemberApproving.Execute()
    >
    > Response.Redirect("default.asp")
    > %>
    >
    > However, in Dreamweaver 8.0.2 when you fill out the
    Update Command dialog
    > box,
    > Dreamweaver asks you to provide the ?Type? and ?Size?
    for the variables
    > (see:
    >
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=4e6b330a
    >
    >
    >
    > That being said and done, the code on the Update page
    looks like the
    > following:
    >
    > <%
    > ' IIf implementation
    > Function MM_IIf(condition, ifTrue, ifFalse)
    > If condition = "" Then
    > MM_IIf = ifFalse
    > Else
    > MM_IIf = ifTrue
    > End If
    > End Function
    > %>
    >
    > <%
    > if(Request.QueryString("MemberID") <> "") then
    > spMemberApproving__MMColParam =
    > Request.QueryString("MemberID")
    > %>
    > <%
    >
    > Set spMemberApproving = Server.CreateObject
    ("ADODB.Command")
    > spMemberApproving.ActiveConnection =
    MM_connIssuesManager_STRING
    > spMemberApproving.CommandText = "UPDATE tblMembers SET
    MemberApproved = 1
    > WHERE MemberID IN (?) "
    > spMemberApproving.Parameters.Append
    > spMemberApproving.CreateParameter("MMColParam", 202, 1,
    10,
    > MM_IIF(Request.QueryString("MemberID"),
    Request.QueryString("MemberID"),
    > spMemberApproving__MMColParam & ""))
    > spMemberApproving.CommandType = 1
    > spMemberApproving.CommandTimeout = 0
    > spMemberApproving.Prepared = true
    > spMemberApproving.Execute()
    >
    > Response.Redirect("default.asp")
    > %>
    >
    >
    > The Update Command works perfectly when only 1 record is
    being updated.
    > However, when I try to update more than one record I get
    the following
    > error:
    >
    > Error Type:
    > ADODB.Command (0x800A0D5D)
    > Application uses a value of the wrong type for the
    current operation.
    > /issues_manager/admin/members_approving.asp, line 27
    >
    >
    > Can anyone help me out?
    >
    >

  • ASP VBScript producing Dreamweaver Javascript Error Messages

    Do almost anything in Dreamweaver CS4 with ASP VBScript seems to produce javascript error messages.  can be a blank page, and you try to create a recordset... error box, error box, and then the code gets inserted but is not in the server behaviors panel.  i'm usually working in php and have never had this problem, but it's quite annoying to work that way... being forced to hand code a lot simple because dreamweaver isn't working correctly.
    warning one:
    the following javascript error(s) occurred:
    warning two:
    while executing findServerbehaviors in Recordset.htm, a JavaScript error occurred
    deleted .dat file and restarted dreamweaver, per some discussions via google... did nothing.

    anyone know how to fix this issue with dreamweaver?

  • 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 '800a0411'  Name redefined (ASP VBScript)

    Hello, I am new in trying to program and I have this problem when I am trying to test my Login page built in Dreamweaver CS4 and my database is in Microsoft Access.
    The error message is the following:
    Microsoft VBScript compilation error '800a0411'
    Name redefined
    /Login.asp, line 10
    Dim MM_NBconnect1_STRING
    ----^
    I have checked the code view , its not repeated towice , so the problem should be something else.

    thank you

  • What's wrong with this IF / ELSE statement? ASP/VBScript

    Hi,
    I'm trying to display a section, within an ASP page, where
    the customer
    logged in is the same as the customer who placed the order,
    identified by
    their "customerID".
    <%IF (rsUser.Fields.Item("customerID").Value) =
    "(rsOrderDetails.Fields.Item("& customerID
    &").Value)" Then%>
    Text etc...
    <%Else%>
    Other text etc...
    <%End IF%>
    The customerID in both database tables is a "bigint" type,
    but when I try
    the above, I get: "Type Mismatch"?
    I've tried this:
    <%IF (rsUser.Fields.Item("customerID").Value) =
    (rsOrderDetails.Fields.Item("& customerID &").Value)
    Then%>
    Text etc...
    <%Else%>
    Other text etc...
    <%End IF%>
    But this also produces a Type Mismatch error.
    Anything glaringly obviously wrong with this? Much
    appreciated.
    Nath.

    Thanks Dooza, that's sorted it.
    Why does ASP not recognise that they are the same format?
    Appreciate the help.
    Regards
    Nath.
    "Dooza" <[email protected]> wrote in message
    news:[email protected]...
    > Ok, it looks like you will need to convert them to the
    same format, even
    > if ASP doesn't think they are the same.
    >
    > <%IF cstr(rsUser.Fields.Item("customerID").Value) =
    > cstr(rsOrderDetails.Fields.Item("customerID").Value)
    Then%>
    > Text etc...
    > <%Else%>
    > Other text etc...
    > <%End IF%>
    >
    > That converts both to a string, which should evaluate
    against each other.
    >
    > See if that helps.
    >
    > Steve
    >
    > tradmusic.com wrote:
    >> Sorry Steve,
    >>
    >> I forgot to remove those from the last example. It
    should have read:
    >>
    >> <%IF (rsUser.Fields.Item("customerID").Value) =
    >> (rsOrderDetails.Fields.Item("customerID").Value)
    Then%>
    >> Text etc...
    >> <%Else%>
    >> Other text etc...
    >> <%End IF%>
    >>
    >> ....which still doesn't work. :o)
    >>
    >> Type Mismatch, yet both fields are bigint.
    >>
    >> Any idea's where the problem is? Much appreciated.
    >> Nath.
    >>
    >>
    >> "Dooza" <[email protected]> wrote in
    message
    >> news:[email protected]...
    >>> tradmusic.com wrote:
    >>>> Hi,
    >>>>
    >>>> I'm trying to display a section, within an
    ASP page, where the customer
    >>>> logged in is the same as the customer who
    placed the order, identified
    >>>> by their "customerID".
    >>>>
    >>>> <%IF
    (rsUser.Fields.Item("customerID").Value) =
    >>>> "(rsOrderDetails.Fields.Item("&
    customerID &").Value)" Then%>
    >>>> Text etc...
    >>>> <%Else%>
    >>>> Other text etc...
    >>>> <%End IF%>
    >>>>
    >>>> The customerID in both database tables is a
    "bigint" type, but when I
    >>>> try the above, I get: "Type Mismatch"?
    >>>>
    >>>> I've tried this:
    >>>>
    >>>> <%IF
    (rsUser.Fields.Item("customerID").Value) =
    >>>> (rsOrderDetails.Fields.Item("&
    customerID &").Value) Then%>
    >>>> Text etc...
    >>>> <%Else%>
    >>>> Other text etc...
    >>>> <%End IF%>
    >>>>
    >>>> But this also produces a Type Mismatch
    error.
    >>>>
    >>>> Anything glaringly obviously wrong with
    this? Much appreciated.
    >>> Whats with this?
    (rsOrderDetails.Fields.Item("& customerID &").Value)
    >>> Why are there ampersands in there?
    >>>
    >>> It should be just this:
    (rsOrderDetails.Fields.Item("customerID").Value)
    >>>
    >>> Steve
    >>

  • How to see ASP/VBScript variable names inline

    When you use an ASP output in a form control (like <%=Submit_Button_Label%>), you can easily see on the page what you've done. This doesn't work for ASP outputs in the rest of the page--all you see are "ASP" graphics all over the place.
    I'm in the process of externalizing all of the text on our ASP pages to variables for translation, and my choices seem to be having a completely unreadable page (where there are just a bunch of ASP labels and not much else) or using a structure like
    <% If False Then 'so we can find it easily on the page, leave the original text
        %>
                        I accept and agree to abide by the Terms of Use
                        and Privacy Policy.
        <% Else %><%= TOS_Prompt %><% End If %>
    so I can at least find things.
    Is there a third option?
    Thanks in advance!
    Message was edited by: Amy Blankenship

    How bout those crickets?

  • MS db Connection String using ASP VBScript and DW8

    Hi
    My MS db has been working with DW8 followong my use of a connection string in connSci***.asp. My OS is Windows7. This has worked fine.
    <%
    ' FileName="Connection_ado_conn_string.htm"
    ' Type="ADO"
    ' DesigntimeType="ADO"
    ' HTTP="true"
    ' Catalog=""
    ' Schema=""
    Dim MM_connSciWeb_STRING
    MM_connSciWeb_STRING = "DSN=DSN_******"
    %>
    Now when I update the db and check that the new additional records have been added (and they have been) I can still only access the original records. When I retest the connection string I get the 404 error message.
    Can anyone help?
    Regards
    Kevin

    >This has worked fine.
    When did it stop working? What changes did you make?
    MM_connSciWeb_STRING = "DSN=DSN_******"
    Any particular reason you are using DSN rather than DSNless connections?
    >Now when I update the db and check that the new additional records  have
    >been added (and they have been) I can still only access the  original records.
    Can you explain? How do you know the new records where added if you can't access them?
    >When I retest the connection string I get the 404  error message.
    How are you testing the connection?

  • "An unidentified error has occurred" when testing a recordset, asp, vbscript, cs4, with dsn or custm

    Hi,
    I have created a dsn and a connection string that test fine on my web host (crystaltech), but I get an unidentified error when I test them on DW CS4. Any thoughts?
    This is my connection string:
    "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\inetpub\bnicrossroadsconnections\dbs\members.mdb;"
    which generates this code:
    <%
    ' FileName="Connection_ado_conn_string.htm"
    ' Type="ADO"
    ' DesigntimeType="ADO"
    ' HTTP="true"
    ' Catalog=""
    ' Schema=""
    Dim MM_testConn_STRING
    MM_testConn_STRING = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\inetpub\bnicrossroadsconnections\dbs\members.mdb;"
    %>
    The connection include code is here: http://bnicrossroadsconnections.com/connections/testconn.asp
    My dsn code is:
    <%
    ' FileName="Connection_odbc_conn_dsn.htm"
    ' Type="ADO"
    ' DesigntimeType="ADO"
    ' HTTP="true"
    ' Catalog=""
    ' Schema=""
    Dim MM_memberconn_STRING
    MM_memberconn_STRING = "dsn=memberdsn;uid=bnixroads;pwd=pass;"
    %>
    The dsn include code is here: http://bnicrossroadsconnections.com/connections/memberconn.asp
    What am I doing wrong?
    This is on a Windows server and I have set the file permissions to the dbs folder to allow writes and deletes.
    I tried moving a db and dsn from another site, where they work, and I get the same unidentified error on this site. I'm thinking I may have missed something with the host, but don't know what. Crystaltech says everything looks fine at their end, and IE throws no error messages.
    Many thanks!!!

    Thank you.  I closed all firewalls and tried it but got the same error.  Then I tried rebooting  and restarting DW to no avail.  So, I started clicking on the commands and on the site>advanced there is a Remove Connection Script command.  I clicked that and retried creating the dynamic table and much to my surprise it worked.  I think perhaps that it was a combination of your suggestion and getting rid of the old script that left it work.  Thanks again for your help.
    Best regards,
    Clair

  • ASP VBScript , Remote_User server variable, and Access DB

    I need to recreate some ASP pages that were orginally created
    in MS FrontPage once upon a time.
    I have a table in an Access DB that contains the user's login
    ID. I need to pull the date the user completed a quiz at the end of
    a web training module.
    My connection looks OK, b/c I can pull other info. I can pull
    the quiz completion date if I put in my login ID. The login ID is
    called Email in the DB and the completion date is called Time.
    This works:
    SELECT [Time]
    FROM QuizComplete
    WHERE Email = 'OCSP/BUTLER_A' AND QuizID = 109
    How do I change the WHERE Email so it filters by the Server
    Variable Remote_User?
    Thanks!

    Amy_L wrote:
    > Ah! Ok, I set it up with parameters, but still getting
    error messages.
    >
    > It doesn't seem to like having the
    ServerVariables("REMOTE_USER") as the value
    > for Param1. The webpage won't open in a browser at all.
    >
    > I then tried it with the value as
    Request.ServerVariables("REMOTE_USER"). The
    > web page opens and where the data should be there's an
    error message:
    Ahh yes, thats the correct one.
    > ADODB.Field error '800a0bcd'
    >
    > Either BOF or EOF is True, or the current record has
    been deleted. Requested
    > operation requires a current record.
    That means it not finding a record with the remote_user that
    matches.
    > I'm sure my record is in the DB. Even it wasn't there I
    need where the
    > recordset on the web page is to be blank. Is there an
    additional piece of code
    > I am supposed to add?
    As a test, create a blank page and put
    <%=Request.ServerVariables("REMOTE_USER")%> on it and
    then display the
    page in your browser. You will see what is returned so you
    can then
    double check your database. If you get nothing back, then
    your IIS
    server isn't configured properly, or you are using a browser
    that
    doesn't use your authenticated login from your domain
    controller.
    Firefox needs to have your servers names added to a special
    section in
    advanced options for this to work, IE does it by default,
    Safari can't
    do it at all and Opera will prompt for your username and
    password.
    Dooza
    Posting Guidelines
    http://www.adobe.com/support/forums/guidelines.html
    How To Ask Smart Questions
    http://www.catb.org/esr/faqs/smart-questions.html
    How To Report A Bug To Adobe
    http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • ASP VBSCRIPT: for a declared string, inserting a line break every N characters

    I'm using ASP VB. I want to insert a VbCr or a VbLf into a
    declared string
    every N characters. FWIW, I want to do this because of an
    apparent
    limitation in MSXML2, which I am using to "scrape" data from
    webpages that I
    control: I'm getting spurious exclamation points (!) where
    line lengths are
    too long. Manually inserting line breaks (which do not render
    in HTML) seems
    to solve the problem. Can someone tell me how to do this?
    Put another way, I need to flesh out the following
    pseudocode:
    Dim myString, myCursorPosition, myIncrement
    myString ="The quick brown fox jumped over the lazy dog."
    myCurrentCursorPosition=0
    myIncrement=5 ' I want a line break for every myIncrement
    While [there are still remaining characters to walk through
    in the string
    ' navigate cursor by myIncrement through myString
    ' insert a VbLf at myCurrentCursorPosition
    myCurrentCursorPosition = myCurrentCursorPosition +
    myIncrement
    [loop]
    Thanks for any help on the syntax here.
    -KF

    This is one possible solution specific to the problem I'm
    having with MSXML.
    Code is inefficient for explanatory clarity.
    BodyAsHtmlString = replace(BodyAsHtmlString, "</a>",
    ("</a>"&vbcrlf))
    BodyAsHtmlString = replace(BodyAsHtmlString, "</td>",
    ("</td>"&vbcrlf))
    BodyAsHtmlString = replace(BodyAsHtmlString,
    "</table>",
    ("</table>"&vbcrlf))
    BodyAsHtmlString = replace(BodyAsHtmlString, "</tr>",
    ("</tr>"&vbcrlf))
    BodyAsHtmlString = replace(BodyAsHtmlString, "</br>",
    ("</br>"&vbcrlf))
    -KF
    "Ken Fine" <[email protected]> wrote in message
    news:e52ln5$i7$[email protected]..
    > Thanks, this code works just fine. However, I'm
    realizing that my logic is
    > going to need to be a little more sophisticated. The
    string that I am
    > breaking includes HTML code. Inserting a VbCr can mess
    up the code.
    >
    > I need a way so that the breaks won't break code. Any
    ideas? If I could
    > identify a char that only appeared in written text,
    that's one hacky
    > solution.
    >
    > Thanks again,
    > -KF
    >
    > "Julian Roberts" <[email protected]> wrote in
    message
    > news:e52kjj$shd$[email protected]..
    >> Try something like
    >>
    >> for i=0 to len(mySt) step 5
    >> mySt=left(mySt,i) & vbcrlf &
    right(mySt,len(mySt)-i)
    >> next
    >>
    >> --
    >> Jules
    >>
    http://www.charon.co.uk/charoncart
    >> Charon Cart 3
    >> Shopping Cart Extension for Dreamweaver MX/MX 2004
    >>
    >>
    >>
    >>
    >
    >

Maybe you are looking for

  • IPhone out of 'sync'

    Hi There, I keep trying to sync my iPhone with iCal on my mac. Events that I have created on my iPhone suddenly become 1 day out of sync (and at random times)after the synching process with iCal. Is anyone else having this problem? or know how to fix

  • Album to Book - only takes 1st pic in Album....

    Hi - i'm trying to create a book using the pics I've selected into an Album.  Everytime I hit "create book" it only includes the first picture within the Album.  Is there anyway to select the entire Album ?  I have iPhoto 08, so due for an upgrade, b

  • Curves adjustment flyout shows two active controls

    I have read several of the discussions about the curves adjustment flyout showing greyed out controls after use.  This also happens on my levels adjustment flyout.  On my CS6 curves adjustment flyout, the drag control and the edit points control are

  • Nokia Lumia 920: problems when playing videos on p...

    Dear All, thanks to this great support community website, I will b hopefully able to solve my prob. Description: my nokia lumia 920 has got the latest Win8 firmware and Lumia Amber update ( with 3 UK) but when trying to play videos on my win 7 pc's,

  • Music videos being shown within the album list

    is it just me, or are music videos now being shown within the music section as well ? for example. a video for a single is correctly being shown in the "music videos" section within "my music". however when i go into "my music" > "artists" > "single"