|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
stored procedure problem...
hi
i've got this problem. here's the stored procedure i've written : CREATE PROCEDURE Logowanie @login varchar(10), @znal varchar(10) output AS select haslo from konta where login = @login GO now : when executed in sql query analyzer, it works fine and returns what it should. but when called from an application ( like c# ) it always returns null. i think it may have something to do with binding the returned value with the output parameter. can anyone correct the syntax? any help will be appreciated ![]()
__________________
ania |
|
#2
|
||||
|
||||
|
Quote:
You never set your output variable to anything try this on for size.... CREATE PROCEDURE Logowanie @login varchar(10), @znal varchar(10) output AS select @znal = haslo from konta where login = @login GO |
|
#3
|
|||
|
|||
|
heh
yeah i tried that
but then - when i test the procedure in query analyzer it does not return any values even though it should. |
|
#4
|
||||
|
||||
|
What is the query you are using to execute the stored procedure?
i.e. declare @znal varchar(10) exec Logowanie 'Login', @znal output select @znal |
|
#5
|
|||
|
|||
|
hmm
well
i call stored procedure from C# application. there - when i pass the exact values ( like "login") to the procedure - it works perfect. but when i try to get the textbox.text value to pass it as input parameter to the stored procedure - it doesnt work. so i guess the procedure's all fine. it's the textbox.text that does not seem to work. cheers and thx for your effort. |
|
#6
|
||||
|
||||
|
I would post this question in the .net forum since it looks like your SQL is correct. It looks like your c# syntax might be wrong...
|
|
#7
|
|||
|
|||
|
yeah
yeah i allready did
![]() thanks ![]() |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > stored procedure problem... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|