For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic Crystal Reports > May 2005 > error vb & crystal !!!!









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author error vb & crystal !!!!
javad.ebrahimnezhad

2005-05-23, 3:58 am

> hello to all
>
>
> i have a procedure blow in my sql server database and i userd it in a
> crestal report v9.2
>
>
> --------------------------------------------
> SET QUOTED_IDENTIFIER ON
> GO
> SET ANSI_NULLS ON
> GO
>
> ALTER PROCEDURE STTESTP @stklist as text AS
> exec ('select * from stuntt where stunt_cod in (' + @stklist + ') ')
>
>
> GO
> SET QUOTED_IDENTIFIER OFF
> GO
> SET ANSI_NULLS ON
> GO
>
> --------------------------------------------
>
> when i execute this instruction in query analyser its true and work
>
> exec STTESTP '1,2'
>
>
> when in cr9,2 inviroment i pass 1,2 in report input box its true and
> report works true


> but when i pass in vb this parameter it has a error
> error ---> incorrect syntax near ')'


i checked project

stk = "0,1"
rpt.ParameterFields.GetItemByName("@stk").AddCurrentValue (stk)

Debug.Print rpt.SQLQueryString --> "mis84"."dbo"."STTESTP";1 NULL
<---

but it pass null to report !!!





> thx a lot



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com