I have a simple stored procedure that executes successfully, but always says no records returned...this is BS!
I can run the proc in Query analyzer and it also says executed successfully...but returns no resultset..
There's just one parameter being passed to the SP, whose value would be something like: "hot", or "promised", or "brkn proms"...
I've verified that every record in TblDebtors has a value in it's StatusID field, so it's got me pulling my hair out in big frustrated strands...
I've even whittled it down to this and get the same result:
What am I doing wrong?
Thanks,
Steve
---------------------------------------
IF WebApplicationProgrammer = True Then
ElectronicSheepHerder = True
End If
I can run the proc in Query analyzer and it also says executed successfully...but returns no resultset..
There's just one parameter being passed to the SP, whose value would be something like: "hot", or "promised", or "brkn proms"...
Code:
ALTER Procedure dbo.QryBuildList @Text0 nvarchar(20)
As
return
SELECT dbo.TblDebtors.DebtorID,
dbo.TblDebtors.AccountName, dbo.TblDebtors.Address1,
dbo.TblDebtors.HomePhone, dbo.TblDebtors.CurrentBalance,
dbo.TblDebtors.PromisePayAmount, dbo.TblDebtors.terms,
dbo.TblDebtors.WorkPhone, dbo.TblDebtors.ClientID,
dbo.TblDebtors.PromiseDate, dbo.TblDebtors.PaidToDate,
dbo.TblClients.ClientName
FROM dbo.TblDebtors INNER JOIN dbo.TblClients
ON dbo.TblClients.ClientID = dbo.TblDebtors.ClientID
WHERE (dbo.TblDebtors.StatusID=' + @Text0 +')
I've verified that every record in TblDebtors has a value in it's StatusID field, so it's got me pulling my hair out in big frustrated strands...
I've even whittled it down to this and get the same result:
Code:
ALTER Procedure dbo.QryBuildList @Text0 nvarchar(20)
As
return
SELECT dbo.TblDebtors.DebtorID,
dbo.TblDebtors.AccountName, dbo.TblDebtors.Address1,
dbo.TblDebtors.HomePhone, dbo.TblDebtors.CurrentBalance,
dbo.TblDebtors.PromisePayAmount, dbo.TblDebtors.terms,
dbo.TblDebtors.WorkPhone, dbo.TblDebtors.ClientID,
dbo.TblDebtors.PromiseDate, dbo.TblDebtors.PaidToDate
FROM dbo.TblDebtors
WHERE (dbo.TblDebtors.StatusID = ' + @Text0 +')
What am I doing wrong?
Thanks,
Steve
---------------------------------------
IF WebApplicationProgrammer = True Then
ElectronicSheepHerder = True
End If