Home » Developer & Programmer » Forms » Data Block using query (Form Builder 10g)
Data Block using query [message #445346] Mon, 01 March 2010 00:52 Go to next message
khan.ashik
Messages: 11
Registered: February 2010
Location: Dhaka
Junior Member
I wanna to load data in a data block using sql which using multiple table, views based on condition
Re: Data Block using query [message #445351 is a reply to message #445346] Mon, 01 March 2010 00:57 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It looks as if you'd have to use a FROM clause as a data source.
Re: Data Block using query [message #445360 is a reply to message #445346] Mon, 01 March 2010 03:13 Go to previous messageGo to next message
khan.ashik
Messages: 11
Registered: February 2010
Location: Dhaka
Junior Member
but after that i want to execute query. that has an error
Re: Data Block using query [message #445361 is a reply to message #445360] Mon, 01 March 2010 03:18 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It probably means that there was something wrong.

What error did you get?
Re: Data Block using query [message #445363 is a reply to message #445361] Mon, 01 March 2010 03:29 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Optionally (if you don't like FROM clauses): create another view based on "multiple tables and views" mentioned in your first post) and create data block on that view.

"Based on condition" part of the story can be easily managed in data block's WHERE property (clause) (either hard-coded, or set programatically using SET_BLOCK_PROPERTY).
Re: Data Block using query [message #445365 is a reply to message #445361] Mon, 01 March 2010 03:31 Go to previous messageGo to next message
khan.ashik
Messages: 11
Registered: February 2010
Location: Dhaka
Junior Member
i declare a global variable under when-new-form-instance.

then i set
query data source type= from clause query
data source name = [table name]
where clause = [column_name =
:[global_variable]]
then it generate compile error:
frm-30100 (Block must contain at least 1 primary key item)
frm-30085 (unable to adjust form for output)

[Updated on: Mon, 01 March 2010 03:32]

Report message to a moderator

Re: Data Block using query [message #445366 is a reply to message #445363] Mon, 01 March 2010 03:34 Go to previous messageGo to next message
khan.ashik
Messages: 11
Registered: February 2010
Location: Dhaka
Junior Member
but please send me an example without using view
Re: Data Block using query [message #445367 is a reply to message #445365] Mon, 01 March 2010 04:12 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
Block must contain at least 1 primary key item
Set one of items as a PRIMARY KEY item.

Sample form? Sorry, I can't write a new form for you at the moment.
Previous Topic: I have a question
Next Topic: ERROR IN SENDING EMAILS FROM A FORM
Goto Forum:
  


Current Time: Fri Sep 20 10:18:04 CDT 2024