Hello all,
Kris is correct, although it sounded like my father when I read the
email.. hehe.
Here's the deal -
Whenever you have a SELECT statement, you MUST have a FROM statement...
it's the way of the SQL glue-roo (pronounced GURU).
The confusing thing about things like returning systime and sysdate is
that they aren't in a table, so you can't say SELECT sysdate FROM
blah_table.
Soooo, Oracle created a bogus table called DUAL. Technically it is a
table with one row (the row name is DUMMY) with a value of X.
The purpose of the table is to be able to select system variables and
still have a SELECT ... FROM clause that doesn't offend the SQL gods.
As Kris stated, the variable you are trying to get must be valid, and
date is actually sysdate.
Regards,
Jeffrey C. Ferrel
DMS III
State of Nevada
775.687.9327
[Email address protected]
-----Original Message-----
From: Krishnakumar
[mailto:oracledba-ezmlmshield-x49730181.[Email address protected]
Sent: Monday, August 06, 2007 10:34 PM
To: LazyDBA Discussion
Subject: RE: ODBC error
Hi,
This has nothing to do with your connection object or ASP !
Just correct your SQL stmt, and voila !
SELECT sysdate FROM DUAL;
(ps: There's no pseudo column date to select from dual !)
Cheers!
Kris
-----Original Message-----
From: Anil Kumar (IT - Extn : 4423)
[mailto:oracledba-ezmlmshield-x54904393.[Email address protected]
Sent: Tuesday, August 07, 2007 10:36 AM
To: LazyDBA Discussion
Subject: ODBC error
Hi,
I have connected my client to Oracle 8i database through following
connection string in ASP
set conn=Server.CreateObject("ADODB.Connection")
conn.ConnectionString= "DRIVER={Microsoft ODBC for
Oracle};UID=[username];PWD=[password];SERVER=ssdb;"
conn.open
but, when I trying to execute sql statement in ASP I am getting
following error. Kindly suggest to come out of this error
set rs=Server.CreateObject("ADODB.recordset")
sql = "select date from dual "
set rs=Server.CreateObject("ADODB.Recordset")
rs.Open sql,conn
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC driver for Oracle][Oracle]ORA-00936: missing expression
/online/files/tobe/test.asp, line 38
Oracle LazyDBA home page