DarkConsultant
Programmer
Hello again,
Fallen at the first fence ...
I have set up a stored procedure -
and in my vb code ...
But there is no data returned.
I have spent 4 hours searching for an answer to this and according to all I have read it should work but doesn't. I know I have missed something vital but please what is it?
TIA
DarkConsultant
Live long and prosper \\//
Fallen at the first fence ...
I have set up a stored procedure -
Code:
CREATE PROCEDURE dbo.GetDBRecord
(
@MainUIN int
)
AS
SELECT MainUIN, MainPhotograph, MainTitle, MainFirstName, MainMiddleName, MainLastName, MainAddress1, MainAddress2, MainAddress3, MainTown,
MainCounty, MainPostCode, MainCountry, MainCompanyName, MainWorkPhone, MainWorkExtension, MainHomePhone, MainMobilePhone,
MainFaxNumber, MainEmailAddress, MainBirthDate, MainProfileReceived, MainMaritalStatus, MainSpouseName, MainChildrensNames, MainMentor,
MainWhenAchievedConsultant, MainWhenAchievedSeniorConsultant, MainTotalProjectsSubmitted, MainTotalProjectsPassed, MainRecordManager,
MainRecordCreated, MainRecordCreator
FROM Main
WHERE (MainUIN = @MainUIN)
RETURN
and in my vb code ...
Code:
Using _MyConnection = New SqlClient.SqlConnection(ConStr)
_MyConnection.Open()
_MySQLCommand = New SqlClient.SqlCommand("GetDBRecord", _MyConnection)
_MySQLCommand.CommandType = CommandType.StoredProcedure
_MySQLCommand.Parameters.Add(New SqlClient.SqlParameter("@MainUIN", SqlDbType.Int)).Value = CurrentRecordUIN
_MyDataReader = _MySQLCommand.ExecuteReader()
While _MyDataReader.Read
' Read data iteration
End While
But there is no data returned.
I have spent 4 hours searching for an answer to this and according to all I have read it should work but doesn't. I know I have missed something vital but please what is it?
TIA
DarkConsultant
Live long and prosper \\//