Database to ASP

Hello,
I am building a page with a stats bar which can be
dynamically updated (this is the best method, as every page uses
the same bar). There are some stats (such as an ASP countdown to a
date) that I would really like to use, but when I put in the
VBScript <%response.write(DateDiff("d", Now(), x))%> all that
is posted on the page is what you see. For example, if I manually
place the script into the page it returns a value of 15, but when
it is dynamically placed in by the database I just get the script
appearing. Is it possible to fix this? The point is to have as
little intervention into the website as possible (such as creating
application variables), I would like to add a number of different
functions like this in the future. Thanks for your help,
Jason Farneth
Just to cover the ground - ASP VBScript, DW8, Access
Database

You can't store server-side code in the database. As you're
seeing,
anything from the database is treated as output. You'll have
to use a
client-side javascript instead because javascript IS output
and isn't
executed until the page is loaded by the client.
"JFarneth" <[email protected]> wrote in
message
news:e2n06a$7h5$[email protected]..
> Hello,
> I put in the VBScript <%response.write(DateDiff("d",
Now(), x))%> all that
> is
> posted on the page is what you see. For example, if I
manually place the
> script into the page it returns a value of 15, but when
it is dynamically
> placed in by the database I just get the script
appearing.

Similar Messages

  • Connecting to an Oracle database using ASP

    Hi
    I am having problems connecting to an Oracle database using ASP. I am trying to do this for a school project the school's database server is running Oracle 9i. The repository is version 6. The web server I have access to only has ASP not ASP.net. What kind of connection string would I need to be able to connect to the database?

    You do need to ensure that the Oracle client and Oracle server are compatible, but that is generally pretty easy to accomplish. Unless you are trying to cross more than one major release (i.e. 9.2 client to a 7.3.4 database), you're pretty safe there.
    You could try downloading and installing the latest 8.1.7.x Oracle ODBC driver from OTN on the machine with the 8.1.7 Oracle client (I believe the last ODBC patchset was 8.1.7.10), but I don't have particular confidence that that will solve the problem. If it doesn't, we can do an ODBC trace to focus in on the issue, but installing a new driver is a much easier process, so that probably ought to be the first step.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Inserting data in oracle database using ASP.

    hi all.
    i am using oracle database 11g R2,windows xp,ASP.
    i am able to store texts and numbers but i am not able to store image in blob.
    here is my table structure.
    Roll number
    Name varchar2(20)
    Subject varchar2(20)
    Marks number
    Attach Blobmy problem is in blob i am not able to insert image into database using ASP codes.
    here is the code.
    <%
    Dim conn,recset
    set conn=server.CreateObject("ADODB.connection")
    set recset=server.CreateObject("ADODB.recordset")
    'set conn=Server.CreateObject("ADODB.Connection")
    conn.Provider="MSDAORA;Data Source=orcl;User ID=XXXX;Password=XXX"
    conn.Open(conn)
    Dim r,n,s,m,att
    r=upload.Form("roll")
    n=upload.Form("nam")
    s=upload.Form("sub")
    m=upload.Form("mark")
    att=upload.Form("FILE1")
    Response.Write "Succssfully Inserted"
    conn.execute "insert into table1 values('"&r&"','"&n&"','"&s&"','"&m&"','"&file1&"')"
    conn.close
    %>plz guide me and help me out.
    thanks in advance..

    Azure Stream Analytics does not have Boolean type. On input we will convert JSON Boolean value to bigint.
    Here is the list of supported types and conversions:
    https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx 
    You  can fix this erro by changing column type from bit to int in SQL table schema.

  • Load image from SQL database with ASP?

    Hello,
    Does anyone know a tutorial where you can load an image from
    a SQL database ?
    I would like to show this image in Flash, but i don't know
    how to load in from a SQL database using ASP.
    Regards,
    Micheal

    Flash cannot load images from an SQL database.
    Flash can load JPEG, PNG, GIF, SWF, MP3, and FLV files.
    An SQL database can be used to store the file names and their
    location. ASP can retrieve that data from the SQL and return to
    Flash to load the above file formats.
    For Flash to do the communication with ASP you need to
    determine if you are using URL Encoded or XML data structures.
    For URL Encoded data you look at
    LoadVars.sendAndLoad
    For XML Encoded data you look at
    XML.sendAndLoad
    Then in their onLoad methods you use
    MovieClip.loadMovie
    to load JPEG, GIF, PNG and SWF;
    Sound.loadSound
    for MP3,
    NetConnection.connect,
    Video.attachVideo and NetStream.play for FLV.
    For the ASP side the work with the database has nothing to do
    with Flash other than using any search variable sent from Flash
    with LoadVars.sendAndLoad or XML.sendAndLoad. In other words it
    could be an HTML form sending the same variable and calling the
    same ASP script. Same with returning values except with Flash only
    URL Encoded or XML data structures are sent back and not
    HTML.

  • Connecting to Oracle database from ASP = please help!

    i have tried every kind of combination of connection string to connect to a 9i database from ASP but it does not work!
    I am using XP Professional and have 9i Developer and ODP.NET installed but I want to use OLE DB (Oracle or Microsoft) to access the database. I have a feeling the web page is not seeing the driver. here is my code:
    <% Option Explicit %>
    <HTML>
    <HEAD><TITLE>Oracle Data Access</TITLE></HEAD>
    <BODY>
    <%
    Dim objConnection
    Dim objRecordset
    Set objConnection = Server.CreateObject("ADODB.Connection")
    With objConnection
    .ConnectionString = "Provider=MSDAORA;Data Source=obiwan;" & _
    "User ID=user; Password=pass;"
    .Open
    Response.Write "ADO Provider=" & .Provider & "<BR>"
    Set objRecordset = .Execute("SELECT sysdate, user FROM dual")
    End With
    </body>
    </html>

    Try using this connect string:
    Provider=MSDAORA.1;Password=tiger;User ID=scott;Data Source=ORA92;Persist Security Info=True
    substitute your username/password and Data Source here.
    This works on Windows2000 with Microsoft OLEDB provider
    for Oracle.

  • Open an Access database from ASP on the Windows 2008 32-bit server

    We are upgrading to a Windows 2008 server.  The ASP application opens an Access database with this code:
      Set oConn=Server.CreateObject("ADODB.connection")
      oConn.Open  "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=E:\webdata\applications\po\sfisnet\sfisnet.mdb;"
    The open statement causes this error:
           Number: -2147217887
           Description: Multiple-step OLE DB operation generated errors. Check each OLE DB
           status value, if available. No work was done.
           Source: Microsoft JET Database Engine
           SQL State:
           Native Error: 0
    Research includes: 
     - ODBC drivers  
     - verified that the ms jet dll is present: msjet40.dll, msjet35.dll
     - IIS settings reviewed
     - permission and sharing on the directory and "sfisnet.mdb" database
     - verifies thet OLEDB_SERVICES is in the registry

    They'll help you over here.
    Microsoft ASP.Net forums
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Populating a pdf from database with ASP

    Hi,
    I have been tasked to see if it is possible to fill in
    http://www.uses.doleta.gov/pdf/eta9061.pdf
    this government form and
    several others dynamically from a database.
    Does anyone have an idea if it can be done via ASP or am I
    looking at
    recreating each form with HTML and filling in that way.
    My main issue with this is if the government will accept the
    generated
    forms that way.
    Any ideas would be helpful.
    Thanks in advance

    > Does anyone have an idea if it can be done via ASP or am
    I looking at
    > recreating each form with HTML and filling in that way.
    > My main issue with this is if the government will accept
    the generated
    > forms that way.
    As a .gover myself, I have to deal with thie all the time.
    The core problem is that .gov is *still* run on paper-forms,
    and solutions
    like these are nothing but gigantic hacks that don't actually
    solve the core
    issue: distributing and collecting data electronically.
    If you zoom into that particular PDF example, you will note
    that it is not
    'electronic' at all.
    It's nothing more than a scanned piece of paper.
    So, to get this to where the client would be happy, you're
    going to have to
    first add PDF form fields to this PDF. Then be sure to put in
    the
    apporpriate labels and extra text to make it accessible. Then
    you need to
    create the data-base back end. Then you need to create an
    interface to get
    the data to and from the PDF.
    Then you're done.
    Until they decide to slightly change the form.
    Then look out.
    Ultimately, this is a really dumb way to go about it.
    Granted, it'll be a
    big chore to convince them of that. ;o)
    Ideally, you'd take the simple route, as simple is often
    better. Make a web
    form. Let people fill it out online. Once filled in, give
    them a printable
    HTML form back.
    Adobe has done an AMAZING job of firmly getting their foot in
    the .gov door,
    and it's going to be REALLY hard to pry that foot out, but
    hopefully we'll
    get there some day.
    -Darrel

  • Oracle database on ASP model - question

    my orale 8i database is running on sun solaris and the whole
    front end is an ASP model product.
    for every customer we have separate schemas and the same set of
    all database objects are there in every schema.
    this is going well.
    my questions is: instead of putting the same set of pl/sql
    procedures & functions into every schemas. Is it possible to have
    a centralized procedure & function and whenever invoked, it
    should work on the invoked schema's tables.
    any ideas would help.
    (the reason i'm asking is, it is hard to maintain the version of
    the procedures & functions across the schemas)

    use AUTHID CURRENT_USER
    CREATE OR REPLACE PROCEDURE TEST AUTHID CURRENT_USER
    IS
    BEGIN
    SELECT * FROM MYTABLE;
    END TEST;
    THIS PACKAGE NEEDS TO COMPILE IN A SCHEMA THAT HAS AL THE UNDERLAYING OBJECTS .
    MYTABLE WILL BE USED FROM THE 'CURRENT' SCHEMA.
    It is also possible to create 1 schema for all companies using oracle policies (DBMS_RLS)

  • 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

  • Can't add database to ASP Javascript page?

    If I make a page with document type of ASP javascript the option to add a db connection is grayed out even though the site, type and server onumbers have checks by them.  Do the same thing with doc type of ASP VB script and I can add db.  I don't believe I used to have this problem before.
    Any ideas on what I'm doing wrong would be appreciated. Thanks.

    Arrrgghhh!!!! But thank you for replying and letting me know.

  • Class not found Exception when accessing database through java using ASP

    I am trying to access the database through ASP via java:
    the database is setup as a system database..
    the java class works fine if i try to run it as a stand alone.. but as soon as I run it through ASP.. it does not get passed the driver line.. is there anything in particular I need to do ?
    JAVA and ASP and the output code looks like as follows:
    java code looks like this:
    import java.sql.*;
    public class testDB{
    private Connection connection;
    private Statement statement;
    public static void main(String[] args){
    public String getDriver(){
    String x = "start of program ";     
    try{
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              x = x + " Got Driver";
              connection = java.sql.DriverManager.getConnection("jdbc:odbc:database", "sunny", "jassal");
              x = x + " After connection statement";
              statement = connection.createStatement();
              x = x + " After statement statement";
              statement.execute("Insert into name (name, age) values ('hello', 33)");
              x = x + " after insert";
              connection.close();
         } catch (Exception sqlex){x = x + sqlex.getMessage() + " " ;
              x = x + sqlex.toString() + " " ;
              x = x + sqlex.getLocalizedMessage();}
    return x;
    and the asp looks like this:
    <html>
    <%
         set javaobject = GetObject("java:testDB")
         response.write "after getting object"
         response.write javaobject.getDriver()
         set javaobject = nothing
    %>
    </html>
    after getting objectstart of program sun/jdbc/odbc/JdbcOdbcDriver java.lang.ClassNotFoundException: sun/jdbc/odbc/JdbcOdbcDriver sun/jdbc/odbc/JdbcOdbcDriver

    what would I set the classpath to be .. and I am sorry I am new to this.. but how would I be able to check the CLASSPATH .. or even how do I set the CLASSPATH.. to which directory would i need to set the classpath to
    I know I can set the classpath in dos by set CLASSPATH=
    but I dont know how to set it so it would read the drivers

  • Trouble with ASP and databases

    Hi,
    I am trying to create a form in Dreamweaver 8 so my customers
    can enter their information and save it to a sql server database. I
    am able to set up the connection to the database using ASP VB. I
    can create the fields and which records it will update, but as soon
    as I save it, I no longer have access to the database. I can't even
    add a new one. In the database window the plus sign is greyed out.
    It tells me "To preview pages containing server-side code, you need
    a testing server. Would you like to specify one now?" The page is
    located under the correct site. I can upload it but when I punch in
    the info, it gives me a page not found.
    Everything works fine until I save the file.
    Plese help!

    Right now I have it set up so it points to the same server.
    Here are my settings:
    Under the advanced tab-
    Remote Info:
    Access = FTP
    FTP Host = xxxxxx
    Host directory = xxxxxxx
    Login = xxxxxx
    Password = xxxxxx
    Testing Server
    Server Model = ASP VBScript
    Access = FTP
    FTP host = xxxxxx
    host directory = xxxxxxx
    Login = xxxxx
    Password = xxxxxx
    On both accounts the ftp host and the host directory are the
    same.
    I don't receive any errors when I finish. Alos everything
    tests correctly to the server.

  • ASP & Clob fields in the Oracle Database 8i

    Hi All,
    This is the first time I am posting a question. We are having a problem interfacing ASP pages with Clob fields int he Oracle Database.
    We are trying to display clob fields in an oracle database from ASP PAge. The ASP Page does a select to a clob field from a table. But we lose the formatting od the data inside the clob field when we display it out using ASP. We display it as a
    single stream of data. But when we display the clob using SQLPLUS we do see the formatted data.
    How can we solve this issue or circumvent it ?
    We are not looking to parse through the clob field in ASP, rather we already have a stored procedure that parses the data for us. The parsed data is then stored in a clob field already formatted the way we need it. The problem occurs when the ASP
    page reads the clob field. The ASP page reads it as one continuos string instead of the formatted data that exists in the clob field.
    I imported the data from Oracle to Access in order to view the raw data. The data is shown formatted properly in Access, so we know our stored procedure is doing what it supposed to do. As far as getting the data to display. The only way to retrieve (as far as I know) a clob field using ASP is by a built in function called GetChunk(). Is there a better method of displaying the formatted data aside from parsing on the client side, using ASP?
    Let me know if anyone has a solution to this problem.
    Thanks for your help and time. Sanjiv.

    Sanjiv, you might want to try some of the Windows development forums:
    ODBC: http://forums.oracle.com/forums/forum.jsp?id=763957
    New .NET provider forum: http://forums.oracle.com/forums/forum.jsp?id=1015160
    Oracle Objects for OLE: http://forums.oracle.com/forums/forum.jsp?id=763961
    Oracle Provider for OLE DB: http://forums.oracle.com/forums/forum.jsp?id=763961
    Oracle Services for MTS: http://forums.oracle.com/forums/forum.jsp?id=763960
    You'll reach a more appropriate audience than just the Web services audience.
    Mike.

  • ASP database

    Hi all
    I've created (a monster) a small database and everything
    works fine on my testing server (IIS on my PC) but I've uploaded it
    to the remote server and only 1 page loads up. Firefox throws up
    the following error
    C:\Inetpub\wwwroot\alliedAdmin\database\alliedAdmin.mdb' is
    not a valid path.
    /testsite/alliedAdmin/database/index.asp, line 8
    What it should be finding is this.
    http://www.alliedstrategies.com/alliedAdmin/database/index.asp
    the odd thing is that this page
    http://www.alliedstrategies.com/testsite/alliedAdmin/database/add.asp
    ..is found OK.
    There's something wrong.
    by the way, there no formatting or anything nice about these
    pages at the minute.
    Can anyone help.
    Thanks
    Martin

    You need to change your pat to the db on the server from your
    ISP
    The path that you mentioned is on your HD, this will never
    work online
    C:\Inetpub\wwwroot\alliedAdmin\database\alliedAdmin.mdb' is
    not a valid path
    Cheers
    www.SamDesign.be
    "martinstan" <[email protected]> a
    �crit dans le message de news:
    e4d98a$hsv$[email protected]..
    > Hi all
    > I've created (a monster) a small database and everything
    works fine on my
    > testing server (IIS on my PC) but I've uploaded it to
    the remote server
    > and
    > only 1 page loads up. Firefox throws up the following
    error
    > C:\Inetpub\wwwroot\alliedAdmin\database\alliedAdmin.mdb'
    is not a valid
    > path.
    > /testsite/alliedAdmin/database/index.asp, line 8
    >
    > What it should be finding is this.
    > <a target=_blank class=ftalternatingbarlinklarge
    > href="
    http://www.alliedstrategies.com/alliedAdmin/database/index.asp
    >
    > the">
    http://www.alliedstrategies.com/alliedAdmin/database/index.asp
    >
    > the</a> odd thing is that this page
    > <a target=_blank class=ftalternatingbarlinklarge
    > href="
    http://www.alliedstrategies.com/testsite/alliedAdmin/database/add.asp
    >
    > ..is">
    http://www.alliedstrategies.com/testsite/alliedAdmin/database/add.asp
    >
    > ..is</a> found OK.
    >
    > There's something wrong.
    >
    > by the way, there no formatting or anything nice about
    these pages at the
    > minute.
    >
    > Can anyone help.
    > Thanks
    > Martin
    >

  • Video, database, asp, newbie piker learning

    Okay, I am psycho on learning new apps and am looking for a
    little insight as to how the following was developed.
    Know that it has database integration, asp, and flash
    intertwined (at least I think so)
    http://beer.com/beer.com-Content_C-section_id-1126642898596_vb.html
    I have the video production and encoding aspect covered, just
    trying to determine best way to bring up reponses from mysql
    database (or any db for that matter.
    Any resources, suggestions, insights, inspiration, coaching,
    consulting, etc. would be appreciated. Hopefully Lon will see this.
    Thanks for your support and help.
    mjd out

    Personally, I'd like to see some more video tutorials of some experienced users showing how they get things done. Maybe now's the time???
    I asked a couple of the Shake users I know (like Capt Mench), if they would be able to for the site http://www.proapptips.com
    they are working on them but they are a little on the busy side at the moment.
    I will post when they are up
    DAVE

Maybe you are looking for

  • Error starting the Application Server and Deployment Tool in Windows 2000

    After installing the iPlanet Aplication Server with sp3 in Windows 2000 I get the following errors starting the Application Server and Deployment Tool. iAS Application Server ================ GXBindInit: GXBindBasic failed GXContextInit: GXBindInit f

  • More info needed on BC Dynamic menus and using CSS with them

    Hi all, The BC Gurus tutorial on Dynamic Menus and how to style them with CSS made no sense to me, unfortunately. The presentation was too rushed and the screen too small to see what was happening. In a previous question I found out how to apply CSS

  • Content Publishing Suite(CPS) in Weblogic Portal 10.3

    Hi, I had included the portlet which I had made using the producer and consumer which is defined in the CPS documentation. Everything works fine but when I tries to retrieve the portlet following error occurs : com.stellent.cis.client.command.Command

  • Lightroom 4.4 -  external editing

    When I am in lightroom 4.4 and I want to edit in elements 11, once I save the Jpeg it doesn't automatically go back into lightroom. how do I set this up to happen automatically?

  • Bluetooth Headset won't stay connected under 10.6

    My PS3 headset use to stay connected under leopard but something in snow leopard doesnt like it. If I can get it connected it'll stay connected for a min. And i cant get the input meter to pickup any audio from the device. However on my iPhone and PS