I cannot say for sure, but I think it is an issue caused by the ODBC driver. I researched on the Internet and found other people getting "sqlstate s1104" when running their queries using ODBC and not getting it when using native drivers and tools or pass-through queries. Can you try a different ODBC driver or set DB Mail to use native connection for Oracle. : This query works: SELECT send_mail('tespafford@hickok-inc.com', : 'Test message', : 'DB Mail test message from SQL statement', : 'tespafford@hickok-inc.com') : FROM dual ; : This one does not: SELECT send_mail('tespafford@hickok-inc.com', : 'New Product Registration', : '(This is a test of a new Oracle database email utility)' || chr(10) || : 'The following online registration has been received.' || chr(10) || : 'Please review online at : http://appserver.hickok-inc.com/webdb/product.r_csedit.show ' || chr(10) : || : 'Customer ID ' || custid || chr(10) || : 'Last name: ' || lname || chr(10) || : 'First Name: ' || fname ||chr(10), : 'registrations@hickok-inc.com' ) : FROM product.csreg : WHERE cdate IS NULL and rdate = TRUNC(SYSDATE); : From SQL Plus, the equivalent of the second query shows: SQL> select : custid,lname,fname from product.csreg where cdate is null and : rdate=trunc(sysdate); : CUSTID LNAME FNAME : ------------- -------------------- -------------------- : AW5712210089 WINGETT ALEX : All of these used to work flawlessy before. My limited research seems to : point to an ODBC problem? I am using ODBC connection in DB mail, after : installed Oracle 8i client and configuring with Net8 easy Config.
|