Hi,

Can anyone help with  the following query? I am noticing one SQL generated the first 
time and the
using browser back button and clicking the button generates  a different SQL .

Thanks in advance.

Seshu


>
>
>
>  (Embedded
>  image moved   Seshu <[EMAIL PROTECTED]>
>  to file:      01/27/2000 04:57 PM
>  pic06135.pcx)
>
>
> To:   Janet Traub/IS/SSC/THD
> cc:
> Subject:  Re: [ND] data object with dynamic criteria
>
> 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
>
> [EMAIL PROTECTED] wrote:
>
> > I think you need to include the single quotes around the variable like this:
> >
> > (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");
> >
> >
> >  (Embedded
> >  image moved   Seshu <[EMAIL PROTECTED]>
> >  to file:      01/27/2000 04:24 PM
> >  pic28469.pcx)
> >
> >
> > To:   "[EMAIL PROTECTED]"
> >       <[EMAIL PROTECTED]>
> > cc:    (bcc: Janet Traub/IS/SSC/THD)
> > 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
>
>   ------------------------------------------------------------------------
>                    Name: pic06135.pcx
>    pic06135.pcx    Type: PCX Image Document 
>(application/x-unknown-content-type-PCXImage.Document)
>                Encoding: base64

_________________________________________________________________________

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]

Reply via email to