Dear cyberm0t0,
I would like to tell that while you are using database in your project you need to write ConnectionString in your code to establish connection. No other settings are required.
Best place to write ConnectionString is Web.config (in Web Project) and App.config (in window project).
You do not need to any information/setting except from following:
<add name="cn" connectionString="server=Server-IP;database=DatabaseName;uid=UserID;pwd=Password" providerName="System.Data.SqlClient"/>
Stored procedure for user signup and authentication:
You need recieve two parameter from user One is UserName and Another is Password. You will check password if User exists. Otherwise Show wrong user message. let me make your work easy:
Create PROCEDURE SPName
(
@unam varchar(50),
@upwd varchar(50),
@regcod int out
)
as
declare @ap varbinary(50)
select @ap= cast(upwd as varbinary(50)) from tbusr where cast(unam as varbinary(50))=cast(@unam as varbinary(50))
if @ap is null
begin
set @regcod=0;
end
else if @ap=cast(@upwd as varbinary(50))
begin
select @regcod= uregcod from tbusr where unam=@unam
end
else
begin
set @regcod=-1;
end
@regcod is an output parameter which return his profile id for further use.
I hope it will help use.
Regards!
Aman