Andreas Reese
|
Posted: 06/03/2005, 5:23 PM |
|
Hello,
I need to use a stored procedure as a Datasource for a Webform.
When I call this stored procedure directly with the MS SQL Query
Analyzer it works well.
There are three input parameters called @pers, @plz, and @flug
and the return value should display the price of a transfer .
IF I check the SQL Test Button it says OK.
After generating the pages, I switched to Liveview and got
the ODBC Error NO VALUE FOR Parameter @Pers submitted, so
I set the default value for @pers to 2, @PLZ to 45127, and
the value for @flug to "Duesseldorf, DUS". These are exactly
the same parameters I use for direct testing on the Database.
Now I press TEST again and I got the next Error "STRING WAS CUT
ON RIGHT SIDE" - without the @flug parameter it says OK.
Q1: Why does it fail in CCS and not on DB itself?
Q2: How can I assign stored procedure parameters to Webform
TextboxInputs and set initial values?
> SELECT tbl_Transferpreise.Preis
> FROM dbo.tbl_Personen INNER JOIN
> dbo.tbl_Lizenzgebiete INNER JOIN
> dbo.tbl_Transferpreise tbl_Transferpreise ON dbo.tbl_Lizenzgebiete.Lizenzgebiet_ID = tbl_Transferpreise.Lizenzgebiet ON
> dbo.tbl_Personen.Personen_Klasse = tbl_Transferpreise.Personen_Klasse
> WHERE (dbo.tbl_Personen.Anzahl = @Pers) AND (dbo.tbl_Lizenzgebiete.bis_PLZ >= @PLZ) AND (dbo.tbl_Lizenzgebiete.von_PLZ <= @PLZ) AND
> (tbl_Transferpreise.Abflughafen = @FLug)
Short Explanation: To get the price of an airport transfer we need the
input of the local zip code (@plz), the airport (@flug) and the number
of persons (@pers). The zip codes are assigned to ranges to keep the db
small.
Thank you in advance.
|
|
|
|