| Author |
Passing Params from form to datamodual problem
|
|
| Dan Barbaria 2006-02-17, 11:23 am |
| Hi all,
I have a datamodual on a form. One of the queries in the datamodual has
two params. In the form I want to change the value of the params however I
can't seem to do it. I get a "Datatype Missmatch error: Expecting an Array"
at the first line of my pushbutton1_onClick (see below). I don't know how
to resolve this. Below is the query in the datamodual followed by the code
I'm trying to use to change the params.
Thanks
Dan Barbaria
// In datamodual
this.JOB1 = new QUERY()
this.JOB1.parent = this
with (this.JOB1)
left = 238.0
top = 133.0
width = 114.0
height = 100.0
database = form.maindb321
sql = "SELECT * FROM " + '"' + "covmgr.job" + '"' + " T WHERE T." +
'"' + "job_date_ordered" + '"' + " >= :startdate AND T." + '"' +
"job_date_ordered" + '"' + " <= :enddate order by job_date_ordered"
params["startdate"] = "12/15/2005"
params["enddate"] = "12/31/2005"
active = true
endwith
//In the form
function PUSHBUTTON1_onClick
this.form.jobscdatamodule1.job1.rowset.params["startdate"] =
this.form.startdate.value
this.form.jobscdatamodule1.job1.rowset.params["enddate"] =
this.form.enddate.value
this.form.jobscdatamodule1.job1.rowset.requery()
/// do stuff
return
| |
| Todd Kreuter 2006-02-17, 1:23 pm |
| Dan Barbaria wrote:
>
> //In the form
>
> function PUSHBUTTON1_onClick
> this.form.jobscdatamodule1.job1.rowset.params["startdate"] =
> this.form.startdate.value
> this.form.jobscdatamodule1.job1.rowset.params["enddate"] =
> this.form.enddate.value
> this.form.jobscdatamodule1.job1.rowset.requery()
Params and requery are properties and methods, respectively, of the
query. Try removing the .rowset from the three lines above and see it
that does the trick.
--
Todd Kreuter [dBVIPS]
| |
| Dan Barbaria 2006-02-17, 1:23 pm |
|
"Todd Kreuter" <tkreuter@dbvips.usa> wrote in message
news:43F60B1B.A99620DD@dbvips.usa...
> Params and requery are properties and methods, respectively, of the
> query. Try removing the .rowset from the three lines above and see it
> that does the trick.
Thanks Todd. It did the trick!
Dan Barbaria
| |
| Todd Kreuter 2006-02-17, 1:23 pm |
| Dan Barbaria wrote:
>
> Thanks Todd. It did the trick!
Good. You're welcome, Dan!
--
Todd Kreuter [dBVIPS]
|
|
|
|