hi man Number one try to change you Procedure to be like this, you have Complicated things in your Procedure, remember the order of declaration is important in your Procedure Create Procedure usp_OutBound_Login_Details ( @Agent_ID BIGINT , @Extno VARCHAR(50), @LoginDateTime AS DATETIME, @IPAddress VARCHAR(50) = 0 ) as Insert into OutBound_Login_Details With(RowLock) (Agent_ID , ExtNo,Login_Time,IPAddress) Values( @Agent_ID,@Extno,Getdate(),@IPAddress) SELECT Outbound_Login_ID FROM Outbound_Login_Details (NOLOCK) WHERE Agent_ID = @Agent_ID And Login_Time = Getdate() AND Extno = @ExtNo number two your Procedure Expect Parameters and you did not supply them from your Sub, i see that you are supplying values but where does those values come from? do they fly into the Sub from nowhere ? number three you have Declared a variable "@IPAddress" and initialized it to 0, and now your procedure that you are calling from your vb code need that parameter and you did not supply it. Why dont you make an IP address a default value of "0" and dont include it in your Procedure, see how i got rid of the @LoginDateTime variable, you are wasting resouce's. And in your Procedure does not tell us that you want to receive an Output from this Procedure, we only see your intensions in your vb code.You have done a lot of mistakes both in vb and in SQL. i suggest you Google and try step by step to spent time on your Procedure and after that you will know that you want to receive an output from a Procedure, remember to put output keyword when you declare a variable to will carry an output for you.In your vb.net code be in mind that you are supposed supply an input make sure that you show us how you get those inputs after that you must come back and show us what you did. Dont worry i learnt from Dave and Colin that is why am like this hope it helps
Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za