Stored Procedure with out put parameter |
8/16/2020 9:10:10 AM |
ASPRunner.NET General questions | |
W
Willie531 authorDevClub member
Can't seem to get this to work, I keep getting Null Reference errors . |
|
FrankR_ENTA 8/16/2020 | |
Can't seem to get this to work, I keep getting Null Reference errors . I know the storeprocedure works and has been tested, can anyone see what I'm doing wrong here? btw using mssql Server 2016 Thank you in advance. DB.Query("EXEC dbo.sp_GetNewCustomerRow @CustomerNo"); dynamic rs = DB.Query("Select @CustomerNo;"); //rs.fetchAssoc(); dynamic data = rs.Value(0); //rs.Value(@CustomerNo); if(data) { pageObject.setProxyValue("pv_CustomerNo", data["CustomerNo"]); } else { MVCFunctions.Echo("Something Wrong In Before display calcs"); }
|
W
|
Willie531 authorDevClub member 8/16/2020 |
Hi Frank, I'll do my best to help you today. I have done a great deal with stored procedures successfully. First, give us some background on what you are trying to achieve. You posted some manually created C#. What version do you have? If you have V10.4, do you want help walking through the set up of a SQL View? |
FrankR_ENTA 8/16/2020 | |
Hi Frank, Currently using the 10.4. Basically the storeprocedure returns back the next customer number as OUTPUT. I need to be able to get this number.
|
W
|
Willie531 authorDevClub member 8/18/2020 |
Thank you Frank You have no relationship between the first and second DB.Query's. A typical use of DB.Query is:
|
W
|
WebReports 8/18/2020 |
How about something like: |
W
|
Willie531 authorDevClub member 8/19/2020 |
Thank you, but no. How about something like: string newid = tDAL.DBLookup("exec GetNewID"); |
D
|
drochel 9/7/2020 |
I am using a stored procedure to return a value for an email distribution list. Here is how I am executing the SP and obtaining the results. |
H
|
heilmanmd 9/10/2020 |
Hello |