Never mind... varchar/char problem...

Thanks Stefan!

Tarun


On Aug 28, 2006, at 9:06 AM, Tarun Reddy wrote:

I've started a complete new project with just WOLips in an attempt to learn the lifecycle of WebObjects in this brave new world.

My first project was a simple dating site (aren't they all making money?) but while I can successfully create new records in the database, I can't read them!

Here is my java code to read a user from the database:

NSLog.allowDebugLoggingForGroups(0x10000L);
LoveUser user = (LoveUser) EOUtilities.objectMatchingKeyAndValue(ec,
"LoveUser", "login", loginUser);
NSLog.refuseDebugLoggingForGroups(0x10000L);

The debugging shows:
[2006-08-28 08:55:11 MDT] <WorkerThread0> Using JDBCPlugIn 'com.webobjects.jdbcadaptor.OraclePlugIn' for [EMAIL PROTECTED]
[2006-08-28 08:55:11 MDT] <WorkerThread0>  connecting with dictionary: {plugin = ""; username = "wolove"; driver = ""; password = "<password deleted for log>"; URL = ""; }
[2006-08-28 08:55:11 MDT] <WorkerThread0>  === Begin Internal Transaction
[2006-08-28 08:55:11 MDT] <WorkerThread0>  evaluateExpression: <com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: "SELECT t0.ADMIN, t0.DOB, t0.EMAIL_ADDRESS, t0.LOGIN, t0.PASSWORD, t0.SEX, t0.USER_OID, t0.ZIPCODE FROM LOVEUSER t0 WHERE t0.LOGIN = ?" withBindings: 1:"treddy"(login)>
[2006-08-28 08:55:11 MDT] <WorkerThread0> 0 row(s) processed

However, in sqlplus:
SQL> SELECT t0.ADMIN, t0.DOB, t0.EMAIL_ADDRESS, t0.LOGIN, t0.PASSWORD, t0.SEX, t0.USER_OID, t0.ZIPCODE FROM LOVEUSER t0 WHERE t0.LOGIN = 'treddy';

ADMIN DOB       EMAIL_ADDRESS                            LOGIN
----- --------- ---------------------------------------- --------------------
PASSWORD                                           SE   USER_OID    ZIPCODE
-------------------------------------------------- -- ---------- ----------
false 16-DEC-93 [EMAIL PROTECTED]                         treddy
abc123                                             MF          1      80211


I know the objectMatchingKeyAndValue worked for me before.. just can't figure out what is going on here.

Thanks,
Tarun
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:

This email sent to [EMAIL PROTECTED]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Reply via email to