|
Friends :
in this occasion I need your help, I am carrying out a program in Mapbasic (MapInfo) it has more than enough and one of their options is to carry out query's where the user chooses the field and the value to use of this field, and so forth with other field through a Dialog and controls popmenu inside the, then when I press the button to accept, I am able to capture the elected fields and his chosen values, I store them in variable "string", next he wanted to build a variable that contains the fields and his values example: Dim campo1,campo2,valor1,valor2 as string Dim general as string Campo1 = "Predio" Campo2 = "Estado" valor1 =""" +"3"+""" valor2 =""" +"1"+""" general = campo1+" = +valor1 + " And " + campo2+" = +valor2 Select * from lote where general into sel1 but doesn't anything take place, or does it leave error, as solving this, since the I number from fields to use variable it is (do we say from 1 up to 7)? Then, try to make it in the following way: Dim a_campo1,a_campo2 as alias a_campo1=campo1 a_campo2=campo2 Select * from lote where a_campo1=valor1 And a_campo2=valor2 into sel and neither it does produce me anything, does somebody have some idea in this respect this way? finally the only form that if it works it is: Select * from lote where a_campo1 ="3" And a_campo2 ="1" into sel and it selects me the objects that agree, but it is not the appropriate form, what is required is something similar to the menu of SQL Select of the MapInfo but programmed via MapBasic to adapt it to the user or client. I say goodbye, expecting a prompt answer or some idea of as solving the above-mentioned. Javier Quispe Varillas
Department of Research and Development Corporacion Condor S.A. Lima - Peru Email:[EMAIL PROTECTED] |
