awaw 0 Newbie Poster

thanks i finshed the project and fixed the problem.

awaw 0 Newbie Poster

Hi I am in very harry can you attach your code when you use the sql in login page and can you attach your store producer

in harry please i have a final project

awaw 0 Newbie Poster

Hi EVERY BODY
I am working now in the large project. I used in some pages visual basic .net language and some C# language. How I can gather the two languages in one solution. I am using visual stido.net program.
Note I could change any of them to other language it is huge and not time.
Thank for help

awaw 0 Newbie Poster

Thanks Paladine but i check more than ten times. it is still I will try with train quariy

awaw 0 Newbie Poster

Hi
THANKS FOR Paladine for nice code
did any one try the sql code it doesn't work with me
no error but the invalid message display all the time with any input?
if any one try the sql and it work can help me ????????????

thanks again for help

awaw 0 Newbie Poster

Yes i am using Visual Studio?
but can you attach your file it may help in my stiuation
thanks

awaw 0 Newbie Poster

the sql code work fine but give me invild message with any input eather wrong or right

awaw 0 Newbie Poster

HI
i used the sql database and i did your code my problem is all the input give me the message invalid passward although it is stored in the database.

awaw 0 Newbie Poster

Paladine
can you attach the file and database it will be more helpful

awaw 0 Newbie Poster

Hi thanks a lot for quick help
I did the change but the same problem. It give me the same even the password is wrong

awaw 0 Newbie Poster

Hi
I am new member in your site i used your codes to fit in my project i did the query in sql and connect that to my web but it doesn't work can any one help me in that
this is my codes

Private Sub submit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

        SqlConnection1.Open()
        Dim user As String = nameF.Text
        Dim pass As String = Password1.Text

        Dim oCM2 As SqlClient.SqlCommand
        oCM2 = New SqlClient.SqlCommand("login", SqlConnection1)
        oCM2.CommandType = CommandType.StoredProcedure


        Dim StID As SqlClient.SqlParameter
        StID = New SqlClient.SqlParameter("@SID", SqlDbType.Int, 4)
        StID.Value = user
        StID.Direction = ParameterDirection.Input
        oCM2.Parameters.Add(StID)


        Dim Spassword As SqlClient.SqlParameter
        Spassword = New SqlClient.SqlParameter("@Password", SqlDbType.NVarChar, 50)
        Spassword.Value = pass
        Spassword.Direction = ParameterDirection.Input
        oCM2.Parameters.Add(StID)

        Dim objReader As SqlDataReader
        objReader = oCM2.ExecuteReader(CommandBehavior.CloseConnection)

        While objReader.Read()
            If CStr(objReader.GetValue(0)) <> "1" Then
                Response.Redirect("start.aspx")
                lblMessage.Text = "Invalid Login!"
            Else
                Response.Redirect("test.aspx")
                objReader.Close()

            End If

        End While

    End Sub
End Class

this my query

ALTER PROCEDURE dbo.login
(@SID int ,
@Password nvarchar (50)
)
AS
	select count(*) as Num_Use
	from Sinfo
	where SID=@SID and Password=@Password
	
	RETURN

thanks for help and give this chance