VB disabling VBscript on a ASP page

Author Message
olinuri

  • Total Posts : 5
  • Scores: 0
  • Reward points : 0
  • Joined: 6/27/2001
  • Location: Spain
  • Status: offline
VB disabling VBscript on a ASP page Wednesday, July 04, 2001 6:35 AM (permalink)
0
Hi,
I have a page that contains a Sub _onclick statement, followed by a SQL connection statement. The SQL statement will not run. I am told it is because I have VB code and VBscript code on the same page, and the VB code kills the VBscript code. Is that true? If yes, how do I fix it?
many thanks for your help


 
#1
    adminkoe

    • Total Posts : 114
    • Scores: 0
    • Reward points : 0
    • Joined: 12/23/2000
    • Location:
    • Status: offline
    Re: VB disabling VBscript on a ASP page Wednesday, July 04, 2001 10:31 AM (permalink)
    0
    Hi:),

    That's not true .....,Just post the code and I will examine it

    Regards,
    Andi Zain
     
    #2
      olinuri

      • Total Posts : 5
      • Scores: 0
      • Reward points : 0
      • Joined: 6/27/2001
      • Location: Spain
      • Status: offline
      Re: VB disabling VBscript on a ASP page Thursday, July 05, 2001 3:05 AM (permalink)
      0
      hi, there it is

      <script language="VBScript"><!--
      Sub window_onLoad()
      mrktco.Additem "CLC Marketing Ltd 69"
      mrktco.Additem "Sunningdale 19"

      end sub

      --></script>
      <script language="VBScript"><!--
      Sub letsgo_Click()

      if mrktco.text = "CLC Marketing Ltd 69" then selection = 69 end if
      if mrktco.text = "Sunningdale 19" then selection = 19 end if

      Set Conn = Server.CreateObject("ADODB.Connection")
      Conn.Open "DSN=CLCWEB;UID=****;PWD=*******;DATABASE=CLCACC;"

      SQLcommand="exec clcacc..get_screen_3_amounts '"&selection &"'"
      SET CA=Conn.Execute(SQLcommand)

      if selection = "" then
      msgbox "Please select a Marketing Company",32,"ICT Intranet"
      end if

      if selection = "69" then
      Window.location.href = "http://sqlreports.clublacosta.com.local/SQLreports/Accounts/Developments/Screen_3_amounts.xls"
      end if

      if selection = "19" then
      Window.location.href = "http://sqlreports.clublacosta.com.local/SQLreports/Accounts/Developments/screen_3_Amounts.xls"
      end if

      End Sub

      --></script>

       
      #3
        adminkoe

        • Total Posts : 114
        • Scores: 0
        • Reward points : 0
        • Joined: 12/23/2000
        • Location:
        • Status: offline
        Re: VB disabling VBscript on a ASP page Thursday, July 05, 2001 11:09 AM (permalink)
        0
        Hi:),

        change this line of code from

        Set Conn = Server.CreateObject("ADODB.Connection")

        to

        Set Conn = CreateObject("ADODB.Connection")




        Regards,
        Andi Zain
         
        #4
          olinuri

          • Total Posts : 5
          • Scores: 0
          • Reward points : 0
          • Joined: 6/27/2001
          • Location: Spain
          • Status: offline
          Re: VB disabling VBscript on a ASP page Thursday, July 05, 2001 11:38 AM (permalink)
          0
          Hi

          I get the message that this page is accessing a data source on another domain.

          even if I say yes, it does not give me any results and stays on the same page.


           
          #5

            Online Bookmarks Sharing: Share/Bookmark

            Jump to:

            Current active users

            There are 0 members and 1 guests.

            Icon Legend and Permission

            • New Messages
            • No New Messages
            • Hot Topic w/ New Messages
            • Hot Topic w/o New Messages
            • Locked w/ New Messages
            • Locked w/o New Messages
            • Read Message
            • Post New Thread
            • Reply to message
            • Post New Poll
            • Submit Vote
            • Post reward post
            • Delete my own posts
            • Delete my own threads
            • Rate post

            2000-2012 ASPPlayground.NET Forum Version 3.9