Hi All,
In my question below, please ignore the third SQL, which I found is concerned
with another data object.
Anyone please reply my question considering the first and second SQL's only.
Seshu
Shamdasani Nimmi-ANS004 wrote:
> Seshu,
>
> I stand corrected. I didn't notice before that you were NOT setting the join
> criteria in your code which means that you had specified the join clause in
> the dataobject. If that is true then you don't need to set the join clause
> again in your code.
>
> -Nimmi
> -----Original Message-----
> From: Seshu [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 27, 2000 4:39 PM
> To: Shamdasani Nimmi-ANS004;
> [EMAIL PROTECTED]
> Subject: Re: [ND] data object with dynamic criteria
>
> Hi all,
>
> Before I implement what Nimmi has suggested, I explain below exact behaviour
> once again.
>
> The first click of has generated this SQL, with no result.
> execute SQL command: |SELECT ALL dbo.grp_prof.cd_appl_type_authtn FROM
> dbo.user_prof, dbo.grp_prof WHERE (dbo.user_prof.name_grp =
> dbo.grp_prof.name_grp)|
>
> Using back button of browser and clicking the button again has generated the
> SQL
> correctly and worked fine.
>
> execute SQL command: |SELECT ALL dbo.grp_prof.cd_appl_type_authtn FROM
> dbo.user_prof, dbo.grp_prof WHERE (((dbo.user_prof.name_grp =
> dbo.grp_prof.name_grp)) AND dbo.user_prof.id_user = 'widmxpHVE' AND
> dbo.user_prof.Password ='hve')|
>
> However, I notice another SQL being generated. I do not understand how this
> is
> generated?
>
> SQL command: |SELECT ALL dbo.user_prof.id_user, dbo.user_prof.name_user,
> dbo.user_prof.name_grp, dbo.user_prof.name_job_title, dbo.user_prof.nbr_ph,
> dbo.user_prof.name_proj, dbo.user_prof.addr_email, dbo.user_prof.addr_strt,
> dbo.user_prof.cd_inpt_type, dbo.user_prof.flag_rslt_onli,
> dbo.user_prof.flag_rslt_ftp, dbo.user_prof.id_ftp_lgn,
> dbo.user_prof.text_ftp_pswrd, dbo.user_prof.text_ftp_ip_addr,
> dbo.user_prof.text_trgt_drctry, dbo.user_prof.Password FROM dbo.user_prof
> WHERE
> (dbo.user_prof.id_user = 'widmxpHVE')|
>
> Shamdasani Nimmi-ANS004 wrote:
>
> > Yes you do have to put in the join criteria again for the tables
> >
> > -Nimmi
> >
> > -----Original Message-----
> > From: Seshu [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 27, 2000 4:07 PM
> > To: Shamdasani Nimmi-ANS004
> > Subject: Re: [ND] data object with dynamic criteria
> >
> > Hi Nimmi,
> >
> > Thanks for your reply. I have another question that I am pasting below
> > which
> > I asked Janet in reply back to her. Could you also look into and suggest
> > some
> > thing?
> >
> > Hi Janet,
> >
> > Thanks. It worked. But I have one more problem. The concerned dataobject
> is
> > using two tables. And
> > there is one join condition used in the data object properties in studio.
> > The
> > first click of the
> > button generates the following SQL.
> >
> > execute SQL command: |SELECT ALL dbo.grp_prof.cd_appl_type_authtn FROM
> > dbo.user_prof, dbo.grp_prof
> > WHERE (((dbo.user_prof.name_grp = dbo.grp_prof.name_grp)) AND
> > dbo.user_prof.id_user = 'widmxpHVE'
> > AND dbo.user_prof.Password ='hve')|
> >
> > And all the subsequent clicks of the button generate this SQL and this
> works
> > file.
> >
> > SELECT ALL dbo.user_prof.id_user, dbo.user_prof.name_user,
> > dbo.user_prof.name_grp,
> > dbo.user_prof.name_job_title, dbo.user_prof.nbr_ph,
> dbo.user_prof.name_proj,
> > dbo.user_prof.addr_email,
> > dbo.user_prof.addr_strt, dbo.user_prof.cd_inpt_type,
> > dbo.user_prof.flag_rslt_onli,
> > dbo.user_prof.flag_rslt_ftp, dbo.user_prof.id_ftp_lgn,
> > dbo.user_prof.text_ftp_pswrd,
> > dbo.user_prof.text_ftp_ip_addr, dbo.user_prof.text_trgt_drctry,
> > dbo.user_prof.Password FROM
> > dbo.user_prof WHERE (dbo.user_prof.id_user = 'widmxpHVE')|
> >
> > However, I notice that the SQL generated second time is including all the
> > data
> > fields and the join
> > criteria is missing in this, which was present in the first SQL.
> >
> > Do we have to include the join condition also in the dynamic criteria?
> >
> > Seshu
> >
> > Shamdasani Nimmi-ANS004 wrote:
> >
> > > Seshu,
> > >
> > > If the uid or pword are character fields your need to put single
> quotes(')
> > > around them in your SQL.
> > >
> > > -Nimmi
> > >
> > > -----Original Message-----
> > > From: Seshu [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, January 27, 2000 3:24 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [ND] data object with dynamic criteria
> > >
> > > Hi All,
> > > I am getting errors with the execution of data object. I am adding a
> > > dynamic criteria to the dataobject in the onBeforeExecuteEvent of
> > > datobject. I have turned the all three options turned on in command
> > > center for the dubug. the error log is enclosed in the attatchment.
> > > Following is piece of code.
> > >
> > > //[[SPIDER_EVENT<this_onBeforeExecuteEvent>
> > > public int this_onBeforeExecuteEvent(CSpDataObjectEvent event)
> > > {
> > > CSpString uid = (CSpString)CSpider.getUserSessionObject("sesuserid");
> > > CSpString pword =
> > > (CSpString)CSpider.getUserSessionObject("sespassword");
> > > String mySQL = new String("dbo.user_prof.id_user = "+uid+
> > > " AND dbo.user_prof.Password ="+pword);
> > > CSpSelect doVer = (CSpSelect)CSpider.getDataObject("doVerify");
> > > doVer.clearDynamicCriteria();
> > > doVer.addDynamicStrCriterion(mySQL);
> > > return (PROCEED);
> > > }
> > > //]]SPIDER_EVENT<this_onBeforeExecuteEvent>
> > >
> > > Can anyone help?
> > > Thanks in advance.
> > > We are using sybase database with odbc driver , ND 4.1.3.8 on NT and IIS
> > > server.
> > >
> > > Seshu
> _________________________________________________________________________
>
> For help in using, subscribing, and unsubscribing to the discussion
> forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
>
> For dire need help, email: [EMAIL PROTECTED]
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]