muhd fauzi
|
Posted: 03/08/2004, 7:15 PM |
|
I have form with before show event as below
Function area_BeforeShow() 'area_BeforeShow @31-A5ACBC79
'Custom Code @59-73254650
' -------------------------
' Write your own code here.
if CCDlookUp("count(*)", "area", "parentarea=" & CCtosql(
CCGetParam("areaid",Empty ), CcsText ) & "" , DBMyNipsDc ) > 0 then
areafrm.DeleteAllowed = False
end if
' -------------------------
'End Custom Code
End Function 'Close area_BeforeShow @31-54C34B28
I also tried with following version of before show
Function area_BeforeShow() 'area_BeforeShow @31-A5ACBC79
'Custom Code @59-73254650
' -------------------------
' Write your own code here.
if CCDlookUp("count(*)", "area", "parentarea=" & CCtosql(
CCGetParam("areaid",Empty ), CcsText ) , DBMyNipsDc ) > 0 then
areafrm.DeleteAllowed = False
end if
' -------------------------
'End Custom Code
End Function 'Close area_BeforeShow @31-54C34B28
I got the following error:
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
/myNipsDc2/areafrm_events.asp, line 13
Line 13 is the if statement.The odbc setup is set to mysql type. I have
tried some other method, buts still has error. Areaid is varchar type in
mysql
Pls help.
|
|
|
DonB
|
Posted: 03/19/2004, 1:30 PM |
|
this part:
"parentarea=" & CCtosql(CCGetParam("areaid",Empty ), CcsText ) & ""
will result in something like this:
parentarea=xyz
so you probably want to add apostrophes so it comes out like this:
parentarea='xyz'
--
DonB
http://www.gotodon.com/ccbth
"muhd fauzi" <mfauzim@hotmail.com> wrote in message
news:c2jcs8$kd0$2@news.codecharge.com...
> I have form with before show event as below
>
> Function area_BeforeShow() 'area_BeforeShow @31-A5ACBC79
>
> 'Custom Code @59-73254650
> ' -------------------------
> ' Write your own code here.
> if CCDlookUp("count(*)", "area", "parentarea=" & CCtosql(
> CCGetParam("areaid",Empty ), CcsText ) & "" , DBMyNipsDc ) > 0 then
> areafrm.DeleteAllowed = False
> end if
> ' -------------------------
> 'End Custom Code
>
> End Function 'Close area_BeforeShow @31-54C34B28
>
>
> I also tried with following version of before show
>
> Function area_BeforeShow() 'area_BeforeShow @31-A5ACBC79
>
> 'Custom Code @59-73254650
> ' -------------------------
> ' Write your own code here.
> if CCDlookUp("count(*)", "area", "parentarea=" & CCtosql(
> CCGetParam("areaid",Empty ), CcsText ) , DBMyNipsDc ) > 0 then
> areafrm.DeleteAllowed = False
> end if
> ' -------------------------
> 'End Custom Code
>
> End Function 'Close area_BeforeShow @31-54C34B28
>
>
>
> I got the following error:
> Error Type:
> Microsoft VBScript runtime (0x800A000D)
> Type mismatch
> /myNipsDc2/areafrm_events.asp, line 13
>
> Line 13 is the if statement.The odbc setup is set to mysql type. I have
> tried some other method, buts still has error. Areaid is varchar type in
> mysql
> Pls help.
>
>
|
|
|
DonB
|
Posted: 03/19/2004, 1:32 PM |
|
Hmmm, wonder why I have these really old messages showing up as unread? I
thought the question sounded really familiar.
Oops.
--
DonB
http://www.gotodon.com/ccbth
"DonB" <~ccbth~@gotodon.com> wrote in message
news:c3foqj$rrq$1@news.codecharge.com...
> this part:
>
> "parentarea=" & CCtosql(CCGetParam("areaid",Empty ), CcsText ) & ""
>
> will result in something like this:
>
> parentarea=xyz
>
> so you probably want to add apostrophes so it comes out like this:
>
> parentarea='xyz'
>
> --
> DonB
>
> http://www.gotodon.com/ccbth
>
>
> "muhd fauzi" <mfauzim@hotmail.com> wrote in message
>news:c2jcs8$kd0$2@news.codecharge.com...
> > I have form with before show event as below
> >
> > Function area_BeforeShow() 'area_BeforeShow @31-A5ACBC79
> >
> > 'Custom Code @59-73254650
> > ' -------------------------
> > ' Write your own code here.
> > if CCDlookUp("count(*)", "area", "parentarea=" & CCtosql(
> > CCGetParam("areaid",Empty ), CcsText ) & "" , DBMyNipsDc ) > 0 then
> > areafrm.DeleteAllowed = False
> > end if
> > ' -------------------------
> > 'End Custom Code
> >
> > End Function 'Close area_BeforeShow @31-54C34B28
> >
> >
> > I also tried with following version of before show
> >
> > Function area_BeforeShow() 'area_BeforeShow @31-A5ACBC79
> >
> > 'Custom Code @59-73254650
> > ' -------------------------
> > ' Write your own code here.
> > if CCDlookUp("count(*)", "area", "parentarea=" & CCtosql(
> > CCGetParam("areaid",Empty ), CcsText ) , DBMyNipsDc ) > 0 then
> > areafrm.DeleteAllowed = False
> > end if
> > ' -------------------------
> > 'End Custom Code
> >
> > End Function 'Close area_BeforeShow @31-54C34B28
> >
> >
> >
> > I got the following error:
> > Error Type:
> > Microsoft VBScript runtime (0x800A000D)
> > Type mismatch
> > /myNipsDc2/areafrm_events.asp, line 13
> >
> > Line 13 is the if statement.The odbc setup is set to mysql type. I have
> > tried some other method, buts still has error. Areaid is varchar type in
> > mysql
> > Pls help.
> >
> >
>
>
|
|
|
|