Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Date and Time functions in SQL ,ASP code to access oracle database

mickcampionmickcampion Member Posts: 1
Hi again
The following sql is written in visual interdev and trying to acccess an oracle database using a DSN less connection. This code works with Microsoft access databases but oracle doesn't want to know it. Does anyone know what i need to change?? Know it's something to do with Date() and Time().
And Thanks Bill for pointing ou the problem
________________________________________________________________
<%@ Language=VBScript %>
<%
'Variables
Dim conn,rs,sSQL,today

'Create Data Connection and Recordset
set conn = server.CreateObject("ADODB.Connection")
set rs = server.CreateObject("ADODB.Recordset")

'Data Connection Attributes
conn.Provider = "MSDAORA.1"
conn.ConnectionString = Application.Value("Connection2_ConnectionString")
conn.Open

'Define and Run the Recordset
sSQL = "Select * FROM LiveTest WHERE LiveTest.Test_Date <= Date() AND LiveTest.Test_Time <= Time()"
set rs = conn.Execute (sSQL)
________________________________________________________________
NOTE Line 17 is: set rs = conn.Execute (sSQL)

This is the damn error i am receiving:




The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.

--------------------------------------------------------------------------------

Please try the following:

Click the Refresh button, or try again later.

Open the localhost home page, and then look for links to the information you want.
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

--------------------------------------------------------------------------------

Technical Information (for support personnel)

Error Type:
Microsoft OLE DB Provider for Oracle (0x80040E14)
ORA-00936: missing expression
/FYPVersion1/performtestcheck.asp, line 17


Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Page:
GET /FYPVersion1/performtestcheck.asp

Time:
18 May 2003, 13:51:07


More information:
Microsoft Support



Sign In or Register to comment.