Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't get stored procedure to return data
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00569998
Message ID:
00570065
Views:
18
This message has been marked as the solution to the initial question of the thread.
There's a problem with the second parameter you are passing into SP. It has value of 2001 but TinyInt range is from 0 to 255. Use smallint or int instead.

>Hi everyone,
>
>I have the following SP call in method in an exe:
>nSQLExec = SQLExec(nConn, "{Call RKR_GetShiftsByMonth (1,2001)}")
>
>And this is the SP:
>CREATE PROCEDURE [RKR_GetShiftsByMonth]
>@Month as TinyInt = 2,
>@Year as Int = 2001
> AS
>Select tshiftstart, tshiftend
>From tblOESch_Shifts
>Where DatePart(Month,tshiftstart) = @Month and DatePart(Year,tshiftstart) = @Year
>
>The value returned by SQLExec is -1. The nConn value = 1. What am I missing/doing wrong?
>
>Thanks in advance...
>
>Keith
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform