I.T. Discussion Community!
-Collapse +Expand
Paradox
Search Paradox Group:

Advanced
-Collapse +Expand Paradox To/From
To/FromCODEGuides
-Collapse +Expand Paradox Store
PRESTWOODSTORE

Prestwood eMagazine

April Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyCorel Paradox / ObjectPAL Coding BoardQBE & SQL Topic   Print This     

QBE answer table not populated with data

QBE answer table not populated with data in QBE & SQL topic (part of our Corel Paradox / ObjectPAL Coding group).

Quick Search: populated   QBE answer   QBE answer table   not populated  
PS_3060
Altro Transformers
Aireys Inlet AU

I have a query which I wish to populate a particular table (not the answer table). I have been unable to run this in objectpal. I think it has to do with the tilde variables but i'm not sure. following is my code.

The variable are populated correctly so any advise is most appreciated.

son = 22013
sol = 1

 
qvar = Query

Answer: :CaliachData:rptWorkorders.DB


WORKORDERS.db |WKOWONO | WKOPTNO |WKOBAL | WKOUSER | WKOUSE1 | WKOUSE2 | WKOUSER3 | WKOUSER4 |

|CHECK | CHECK |CHECK | CHECK |CHECK ..~sol | CHECK | CHECK ..~son| CHECK |

Endquery

ExecuteQBE(qvar)
tv.open(":CaliachData:rptWorkorders.DB")

Thanks

 Posted 61 days ago (Thread Starter)
Comment Quote
About PS_3060 -Collapse +Expand
Visit Profile
Membership pending.
Member subscribes to this thread with a verified email.
Member pending approval.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #18411, 6 replies
Thread Started 2/9/2021 9:56:32 PM
View Counter=99
Last Reply Posted 2/12/2021 5:10:13 AM)
Location=Aireys Inlet AU 
Joined=7 months ago   MB Posts=19  
Moderator
Steven.G
Myrtle Beach, SC USA

first, your vars.. they translate to

..1

..22013

and might not always work that way, mixing string and number.. better practice to set the string in the var, before

son = "..22013"

sol = "..1"

second, you can assign the table name two ways, either works

Answer: :CaliachData:rptWorkorders.DB

or

ExecuteQBE(qvar,":CaliachData:rptWorkorders.DB")

but here's the thing, to answer YOUR question

if not ExecuteQBE(qvar) then

  errorshow()

endif

if not tv.open(":CaliachData:rptWorkorders.DB") then

  errorshow()

endif

then you'll know why it's not working..

Steven Green
Senior Software Engineer
Paradox Support Specialist DOS/WIN

Prestwood IT Solutions
8421 Auburn Blvd, Suite 256, Citrus Heights, CA 95610
Office: 916-726-5675 | Fax: 916-726-5676 | http://www.prestwood.com
 Posted 60 days ago
Comment Quote
About Steven.G -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #18412 (Level 2) and Parent is 18411
Reply Posted 2/10/2021 5:49:48 AM
Location=Myrtle Beach, SC USA 
Joined=55 months ago   MB Posts=461  
PS_3060
Altro Transformers
Aireys Inlet AU

Hi Steven,

I have progressed a little further.

The variables are smallint from the page1 of the form. but I cannot get the query to find the record with those variables.

My code so far is:

var
qvar QUERY
solno Smallint
sono Smallint
tv TableView
Endvar

sono = page1.SalesOrderNo ; (field on Page1)
solno = self.value                  (current Edited Field)

qvar = Query


ANSWER::CaliachData:rptWorkorders.DB


:CaliachData:WORKORDERS.db |WKOWONO | WKOPTNO |WKOBAL | WKOUSER| WKOUSE1 | WKOUSE2 | WKOUSER3 | WKOUSER4 |

|CHECK | CHECK |CHECK | CHECK | CHECK = ~solno | CHECK | Check = ~sono | CHECK |


if not ExecuteQBE(qvar,":CaliachData:rptWorkorders.DB") then

errorshow()

endif

EndQuery
if not tv.open(":CaliachData:rptWorkorders.DB") then

errorshow()

endif

The query populates the answer db with all records.

 Posted 60 days ago (Thread Starter)
Comment Quote
About PS_3060 -Collapse +Expand
Visit Profile
Membership pending.
Member subscribes to this thread with a verified email.
Member pending approval.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #18413 (Level 3) and Parent is 18411
Reply Posted 2/10/2021 10:33:53 PM
Location=Aireys Inlet AU 
Joined=7 months ago   MB Posts=19  
PS_3060
Altro Transformers
Aireys Inlet AU

Hi Steven,

I have progressed a little further.

The variables are smallint from the page1 of the form. but I cannot get the query to find the record with those variables.

My code so far is:

var
qvar QUERY
solno Smallint
sono Smallint
tv TableView
Endvar

sono = page1.SalesOrderNo ; (field on Page1)
solno = self.value                  (current Edited Field)

qvar = Query


ANSWER::CaliachData:rptWorkorders.DB


:CaliachData:WORKORDERS.db |WKOWONO | WKOPTNO |WKOBAL | WKOUSER| WKOUSE1 | WKOUSE2 | WKOUSER3 | WKOUSER4 |

|CHECK | CHECK |CHECK | CHECK | CHECK = ~solno | CHECK | Check = ~sono | CHECK |


if not ExecuteQBE(qvar,":CaliachData:rptWorkorders.DB") then

errorshow()

endif

EndQuery
if not tv.open(":CaliachData:rptWorkorders.DB") then

errorshow()

endif

The query populates the answer db with all records.

 Posted 60 days ago (Thread Starter)
Comment Quote
About PS_3060 -Collapse +Expand
Visit Profile
Membership pending.
Member subscribes to this thread with a verified email.
Member pending approval.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #18414 (Level 4) and Parent is 18411
Reply Posted 2/10/2021 10:33:53 PM
Location=Aireys Inlet AU 
Joined=7 months ago   MB Posts=19  
Moderator
Steven.G
Myrtle Beach, SC USA

no errors, empty or wrong results in the Answer table.. ok.. verify the values being passed along.. before the query

sono.view()

solno.view()

that's what's going into the query.. is it what you want?

Steven Green
Senior Software Engineer
Paradox Support Specialist DOS/WIN

Prestwood IT Solutions
8421 Auburn Blvd, Suite 256, Citrus Heights, CA 95610
Office: 916-726-5675 | Fax: 916-726-5676 | http://www.prestwood.com
 Posted 59 days ago
Comment Quote
About Steven.G -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #18415 (Level 5) and Parent is 18411
Reply Posted 2/11/2021 5:48:14 AM
Location=Myrtle Beach, SC USA 
Joined=55 months ago   MB Posts=461  
PS_3060
Altro Transformers
Aireys Inlet AU

I have viewed the sono, solnn variables and they are correct as integers. Realy stumped by this, I have seveeral other QBE which work just fine.

 Posted 59 days ago (Thread Starter)
Comment Quote
About PS_3060 -Collapse +Expand
Visit Profile
Membership pending.
Member subscribes to this thread with a verified email.
Member pending approval.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #18418 (Level 1.1)  Reply to 18415 and Parent is 18411
Thread Started 2/11/2021 2:35:34 PM
Location=Aireys Inlet AU 
Joined=7 months ago   MB Posts=19  
Most Recent Post
Moderator
Steven.G
Myrtle Beach, SC USA

and errorshow() doen't fire?

I'd suggest string(sono) and string(solno), but errorshow() would fire if lack of that was the problem

Steven Green
Senior Software Engineer
Paradox Support Specialist DOS/WIN

Prestwood IT Solutions
8421 Auburn Blvd, Suite 256, Citrus Heights, CA 95610
Office: 916-726-5675 | Fax: 916-726-5676 | http://www.prestwood.com
 Posted 58 days ago
Comment Quote
About Steven.G -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #18420 (Level 6) and Parent is 18411
Reply Posted 2/12/2021 5:08:55 AM
Location=Myrtle Beach, SC USA 
Joined=55 months ago   MB Posts=461  
Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1111A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #18411 Counter
99
Since 2/9/2021

Follow PrestwoodBoards on: 


©1995-2021 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech