Home » Developer & Programmer » Forms » Select query problem in form (form 6i)
Select query problem in form [message #310943] Wed, 02 April 2008 22:01 Go to next message
mm_kanish05
Messages: 487
Registered: January 2007
Location: Chennai
Senior Member

Hi

Im using form 6i, On form of an item im using this code (When_validate_item)


SELECT GrdDate, VendCode, ChallanNo, ChallanDate, PendingItems, ExciseGPRef, 
               ExciseGPDate, Excise_Amt,Receiveditems, StatusInd
        INTO   :GRDRef_Dt, :VendCode, :ChallanNo, :ChallanDt, PItems, :Excise_GP_No,
               :Excise_GP_Dt, :Excise_Amt, Noitems, DelFlag
        FROM   GrdData
        WHERE  GrdNumber = rtrim(:GrdRef_No)
        and  Periodid  = :Global.Periodid
        and  UNitid    = :Global.Unitid;


when i try this query in isqlplus, im getting one row.

Buw inside the form it reach exception when no_data_found

Why? Can any one help me out to solve this problem. pls immtly

wbr.
kanish
Re: Select query problem in form [message #311056 is a reply to message #310943] Thu, 03 April 2008 05:29 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I believe I understand your problem, but can't figure out what "pls immtly" should mean. If it is some kind of IM speak, please, don't use it any more.

How did you obtain values of "global" variables in SQL*Plus? I guess you entered when prompted.

It seems that, at the time of the WHEN-VALIDATE-ITEM trigger execution, value of one (or more) global variables is unknown or such that WHERE condition is invalid and query returns no records.

Display global variables' values at the beginning of the trigger (the simplest way is to use MESSAGE built-in) to check what's going on.
Re: Select query problem in form [message #311136 is a reply to message #311056] Thu, 03 April 2008 09:26 Go to previous messageGo to next message
solisdeveloper
Messages: 48
Registered: March 2008
Location: Mexico
Member
Also check the length of your database field against your datablock Item.

ie. If ExciseGPRef has a lenght of 12 characters in your database, but the Item :Excise_GP_No has only 10 characters you will receive a no-data-found error message because Forms is unable to adapt the result from the query to the receiving item.

Regards!
Re: Select query problem in form [message #311188 is a reply to message #311136] Thu, 03 April 2008 12:06 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Oh?

My Forms (10g) will, in that case, return
Quote:
FRM-40831: Truncation occurred: value too long for field <field name>

(not NO-DATA-FOUND).
Re: Select query problem in form [message #311189 is a reply to message #311188] Thu, 03 April 2008 12:09 Go to previous messageGo to next message
solisdeveloper
Messages: 48
Registered: March 2008
Location: Mexico
Member
Ups!
You're right Embarassed

But he's using Forms 6i and when I'm working with 6i I get that very same error message.

[Updated on: Thu, 03 April 2008 12:11]

Report message to a moderator

Re: Select query problem in form [message #311206 is a reply to message #311189] Thu, 03 April 2008 12:59 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
that very same error message

Which one?
Re: Select query problem in form [message #311207 is a reply to message #311206] Thu, 03 April 2008 13:04 Go to previous messageGo to next message
solisdeveloper
Messages: 48
Registered: March 2008
Location: Mexico
Member
Well:

The no-data-found error message on Forms 6i when I try to asign the value retrieved from a query to an item, but the value is larger than my item's length.

My best Regards! Smile
Re: Select query problem in form [message #311209 is a reply to message #311207] Thu, 03 April 2008 13:07 Go to previous message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Oh, THAT one! Well, I'll have to trust you as I don't have 6i installation here. But, I'll check it once I get close to it (next week maybe) and if I remember to do that.
Previous Topic: how to enable/disable button through coding
Next Topic: User Priviledges from Developer form 6i
Goto Forum:
  


Current Time: Tue Dec 06 02:35:05 CST 2016

Total time taken to generate the page: 0.11315 seconds