If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > Oracle Error Code = 1036

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-10-02, 20:05
AnthroRules AnthroRules is offline
Registered User
 
Join Date: Jul 2002
Posts: 10
Oracle Error Code = 1036

We are using Oracle 8.1.7 and I keep getting the above error with the following query (executed via Cold Fusion 5.0):

Oracle Error Code = 1036

ORA-01036: illegal variable name/number

SQL = "

SELECT P.Disabled,
P.SiteID,
PC.EmailAddress,
P.PersonID AS PID,
PC.PrimaryEmail,
P.Password

FROM tbl_Person P,
tbl_Person_Contact PC

WHERE (P.PersonID = PC.PersonID)
AND (P.SiteID = :1)
AND (PC.PrimaryEmail = :2)
AND (PC.EmailAddress = ':3')
AND (P.Password = ':4')

ORDER BY P.PersonID

"

Query Parameter Value(s) -

Parameter #1 = 2
Parameter #2 = 1
Parameter #3 = test@something.com
Parameter #4 = test

From what I've read, the error could be caused by one or all of the following reasons:

1) Use of "reserved word" in the column name of "Password".
2) Not properly "binding" columns in the SQL statement with variables in the output.

I have tried using brackets around Password in the above SQL statement, but the error persists. I have also tried removing the column alias of PID, but the error persists.

Any suggestions would be greatly appreciated.

Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 09-11-02, 08:01
WingMan WingMan is offline
Registered User
 
Join Date: Aug 2002
Location: UK
Posts: 87
Are you sure that
PC.EmailAddress = ':3'
is being substitued by test@something.com ??

Shoud this be somthing like
PC.EmailAddress = char(39) + :3 + char(39)
to add the ansi ' before and after the variable :3

clear as mud
Reply With Quote
  #3 (permalink)  
Old 09-11-02, 12:09
AnthroRules AnthroRules is offline
Registered User
 
Join Date: Jul 2002
Posts: 10
Quote:
Originally posted by WingMan
Are you sure that
PC.EmailAddress = ':3'
is being substitued by test@something.com ??

Shoud this be somthing like
PC.EmailAddress = char(39) + :3 + char(39)
to add the ansi ' before and after the variable :3

clear as mud
Thank you very much for your reply! However, that is incorrect in terms of how Cold Fusion parameterizes variables within SQL statements. The parameterization is correct, but again, the error persists.

I think it may have something to do with the column type for "Password", since it was set to RAW rather than VARCHAR. I am going to try to change the column type and also the SQL type in the Cold Fusion parameterization codes.

Thanks!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On