RFGen
THE DATAMAX SOFTWARE GROUP, INC.
- KNOWLEDGE BASE TOPIC -
    Get the latest RFgen software updates - member login / registration requiredApplication Downloads
    Access RFgen Open Source Documentation for JD Edwards World / EnterpriseOneOpen Source Documentation
    Access RFgen publications and marketing materialsGeneral Publications
    Access the RFgen knowledge base on wireless data collection, development and implementation issuesKnowledge Base
    Authorize your RFgen Software ProductsProduct Activations
Open a live support session - please call RFgen support at 916-939-4065 to initiate the session
click here for live support
if you can't find what you need online
click here to email us
or contact our support desk
by calling 916-939-4065
RFgen Software Applications and Resources - JD Edwards World and EnterpriseOne - Certified Open Source Data Capture Solutions
   
Subject: How do I include variables in an sql statement?
Author: DataMAX
Dated: 1/31/2005 10:37:00 AM



String variables would take the form:
sql ="select partno, description from Inventory where partno = '" & part & "'"
where the single quote begins the string value, then the sql variable is stopped and the variable containing the value is appended, then the final single quote is appended to the sql variable.

For numeric variables just leave off the single quotes:
sql ="select partno, description from Inventory where partno = " & part

For Microsoft Access Date types replace the single quote with a # (hash) mark.

For substituting the values in RFgen prompts without declaring variables:
sql ="select partno, description from Inventory where partno = '%part'"

RFgen will search and replace the text %part and replace it with the value in that prompt's textbox. Again if it should be numeric just leave off the single quotes.

To reference a prompt by number instead of name (in case of a loop structure):
sql ="select partno, description from Inventory where partno = '%3'"

Copyright © The DataMAX Software Group    |    5049 Robert J. Mathews Pkwy. Suite 100    |    El Dorado Hills, CA 95762    |    USA Tel: 916.939.4065    |    Terms & Privacy    |    Contact Us