I am a total newb, using VB.NET/ASP.NET 2.0 (visual studio 2008).Here's my stored proce (hope it's right)ALTER PROCEDURE dbo.GetPostingAuthorIdClassified ( @Id int )AS SELECT UserId FROM classifieds WHERE (Id = @Id)RETURN
Here's my code I'm using to retrieve the value UserId (which is a guid/uniqueidentifier)... MyCommand = New SqlCommand(spname, MyConnection) MyCommand.CommandType = Data.CommandType.StoredProcedure MyCommand.Parameters.AddWithValue("@id", CType(Request.QueryString("Id"), Integer)) Dim MyId = MyCommand.ExecuteScalar
The problem is that the guid is ALWAYS empty, though I should have records. What am I doing wrong? Thanks!