[AccessD] SQL String - Executed against Oracle by ADO

Jim Lawrence accessd at shaw.ca
Thu Feb 2 14:02:58 CST 2006


Hi Tony:

You could either set the initial values by adding an empty value to it:

varOne = null
varOne = varOne + "" ... now it is an empty or ''

or if the shown value is 'null' could not the 'VALUES' be placed in a string
and the 'Replace' function be used to replace the value with either a zero
or empty?

Jim

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
tony.x.yeatman at jpmorgan.com
Sent: February 2, 2006 10:03 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] SQL String - Executed against Oracle by ADO

I am issuing the following SQL string against an Oracle 9i database, and 
it is erroring because of the Null.

strSQL is equal to:

INSERT INTO TBLLOADDATA 
        (LOADFILEID, A01, A02, A03, A04, A05, A06, A07, A08, A09, A10, 
A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25, 
A26, A27, A28, A29, A30) 
        VALUES 
('83','CCC','N','8642378','2663099','8642378','2663099','AAAAAA','BBBBB','26
630990','SP','317','20060201',Null,'0','0','1.212200000','20060203','VVV',
'B','YYY','150000.000000000','ZZZ','181830.000000000','1.212200000','.000000
000','1.212200000','.000000000','.000000000','20060201','0 
       ')

If in Immediate window I issue strSQL = "INSERT.... " etc (effectively 
resetting the variable) it runs just fine

I do have a function that is returning the Null as a string  (I have also 
tried as a variant)

Does anyone know how I could do the same through code ?

Thank you for any help you can give.


Tony

This communication is for informational purposes only. It is not intended
as an offer or solicitation for the purchase or sale of any financial
instrument or as an official confirmation of any transaction. All market
prices,
data and other information are not warranted as to completeness or accuracy
and
are subject to change without notice. Any comments or statements made herein

do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries 
and affiliates

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list