J
JohnE
Hello. I have a mdb connected to sql2005 backend. In the backend there is a
stored proc that scans 4 tables for the 2 parameters passed in from the front
end. The stored proc then returns a value of either 0 (nothing found) or 1
(info found). On the front end in a form there is a button that when the
user clicks it, part of the click event is passing the params and calling the
stored proc.
Below is part of the code that is in the button event. This is the part
that passes the params in and calls the stored proc. Don't let the 'dimSQL =
....' line and the 'Call ..." line throw you off. The Call line is used
throughout the app and has been used for years. The same with the dimSQL
line (or similar to it). Both work well. It is getting the return value
back for the If...Then statement.
Dim dimSQL As String
Dim nondimSQL As String
Dim dim_result As Long
Dim nondim_result As Long
dimSQL = "RISpecForPartNumberHasResults '" & PartNumber & "', '" &
cboViewRevision & "'"
Call RunSQLServerStoredProcedure(dimSQL)
' dim_result = CurrentProject.Connection.Execute (dimSQL)
If dim_result > 0 Then
What my issue is centers around getting the return value from the stored
proc. How does it get returned back to the front end to be used in the
If...Then statement?
Thanks in advance for any help on this.
John
stored proc that scans 4 tables for the 2 parameters passed in from the front
end. The stored proc then returns a value of either 0 (nothing found) or 1
(info found). On the front end in a form there is a button that when the
user clicks it, part of the click event is passing the params and calling the
stored proc.
Below is part of the code that is in the button event. This is the part
that passes the params in and calls the stored proc. Don't let the 'dimSQL =
....' line and the 'Call ..." line throw you off. The Call line is used
throughout the app and has been used for years. The same with the dimSQL
line (or similar to it). Both work well. It is getting the return value
back for the If...Then statement.
Dim dimSQL As String
Dim nondimSQL As String
Dim dim_result As Long
Dim nondim_result As Long
dimSQL = "RISpecForPartNumberHasResults '" & PartNumber & "', '" &
cboViewRevision & "'"
Call RunSQLServerStoredProcedure(dimSQL)
' dim_result = CurrentProject.Connection.Execute (dimSQL)
If dim_result > 0 Then
What my issue is centers around getting the return value from the stored
proc. How does it get returned back to the front end to be used in the
If...Then statement?
Thanks in advance for any help on this.
John