Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 4th November 2016, 14:57
pramod pramod is offline
Member
 
Join Date: Jul 2002
Location: Chattanooga, TN
Posts: 38
pramod is on a distinguished road
Baan: B4c4, LN - DB: INF - OS: AIX
Dynamic Query
Baan: ERP LN 6.1 FP9 (Infor ERP 10.3)
C/S: None/Unknown

I need to run the query that looks like this

qry.str= "select count(*) "&"from "& tabname &" where "& tabname & "._compnr = " & str$(comp)

where tabname and comp are the variables. Trying to get the record count for the table(s). I thought dynamic query will be helpful. How do I construct rest of it to get the result?

Thanks in advance for any idea.
Pramod
Reply With Quote
Sponsored Links
  #2  
Old 4th November 2016, 15:48
pramod pramod is offline
Member
 
Join Date: Jul 2002
Location: Chattanooga, TN
Posts: 38
pramod is on a distinguished road
Baan: B4c4, LN - DB: INF - OS: AIX
Got it worked. After the sql.fetch I see the rowcount variables is filled with result.

qry.str= "select count(*):1 from "& tabname &" where "& tabname & "._compnr = :2"
sqlid = sql.parse(qry.str)
sql.select.bind(sqlid,1,rowcount)
sql.where.bind(sqlid, 2, comp)
ret = sql.exec(sqlid)
sql.fetch(sqlid)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic query builder and viewer halvorn Third Party Products 1 19th November 2002 09:51
Desktop Query eshirley Tools Administration & Installation 0 10th September 2002 02:41


All times are GMT +2. The time now is 01:28.


©2001-2017 - Baanboard.com - Baanforums.com