ORA-01036 Error with Microsoft Provider for Oracle

  • Thread starter Thread starter Alok Jain
  • Start date Start date
A

Alok Jain

Hi,

I am using .Net Framework 1.0 with Oracle. I am using the Oracle provided
data provider 'Oracle.DataAccess.Client' and I am using the parameterized
queries. Now I want to use the Microsoft provided data provider
'System.Data.OracleClient' for Oracle, but when I change the reference in my
project I start getting following error:

ORA-01036: illegal variable name/number SQL String= SELECT
u.opid,user_id,password,first_name,start_date,middle_name,last_name,INITIALS
,email,menu_color,predefined_bg_color,tab_color,body_color,security_type,fon
t,max_search_results,max_search_results_per_page,startup_page,url,dept from
UADUSR_USER u, UADUSP_USER_SCREEN_PREF p, UADAPP_APPLICATIONS a WHERE u.opid
= p.opid AND u.startup_app = a.app_name_pk AND u.enabled_flag = 'E' AND
LOWER(user_id) = :USERNAME AND password = :PASSWORD

I guess this is a issue related to caramelized query related difference with
both the data provider. Can you suggest some thing here, I basically want to
make minimum changes in my code. I want my code to work on both Framework
1.0 and 1.1.

Thanks

Alok
 
See response on your first post on this subject.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
 
Hi All,

This is solved, the new provider from microsoft follows a strict parameter
check while the old oracle provider was flexible on parameter names, for it
only the order of parameter was significant (blind matching).

You have to use ':' prefix for your parameter names.

Regards,
Alok
 
Now I have to look deeper into this, as we are running our own parameter
naming scheme to match params. Oh, what a tangled web we weave.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
 
Back
Top