|
I need a stored procedure example for validating Login page ....If someone could help i can do this assignment.......
SAJAN A PILLAI
ASP.NET,C#.NET Programmer
dWise Solutions and Services Pvt Ltd.
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
Hi
I understood from ur post,You want to SP for check username and password ,when you pass args. Is it rite?
If rite?
create Proc dbo.urtablename_User_Validation
(
@username char(10),
@pwd char(10)
)
AS
BEGIN
check ur select query with ur params.
END
i think this may be help to u.
|
|
|
|
|
Ravenet wrote: ur
Ravenet wrote: rite
Ravenet wrote: u
Could you write in proper English please. There are people on this forum for whom English is not their strongest language and being confronted by crap like this won't help them.
ur = your or you're
rite = right
u = you
|
|
|
|
|
Please read here[^].
sajan ss wrote: BANGALORE
I'm afraid that kind of says it all.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I need some help to clarify some confusion I have. If I access some data from the db and then create objects which hold the data--for example, access the customer table and create a customer object--am I using Connected technique or Disconnected? My understanding is I am using disconnected, however my teachers disagree.
I think to use connected technique I will query the db and keep connection open and every time a change is made it is made directly in db.
In other words, if the changes are made anywhere except the data storage source--the database in this case--then it is disconnected.
Furthermore, when you bind controls to the db, is it using connected or disconnected?
Please write a detailed answer and you can assume I am well familiar with ADO.NET.
CodingYoshi
|
|
|
|
|
CodingYoshi wrote: keep connection open
It is best practice to open the database only when you need to. Open it, do what you need, then close it. If you keep open persistently, then you can run into problems having too many connection pools...
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Thanks but that is not the answer to my question.
|
|
|
|
|
Whether you're disconnected or connected, you'll obviously need to access the data to create your object. The difference lies in what you do next.
If you leave the database connection open and and write changes to the object back to the database immediately then you are working in a connected state. If you close the database once you've created your object, do some processing with it and then re-establish a connection to the database to write the changes back then you're disconnected.
The answer to your question about binding will be answered in the way you've implemented your system; as you should know, working in a connected state is generally considered bad practice (though there are cases where it is required). In general, if you can get away with only connecting to the database at the start and end of an operation you should probably do that.
It definitely isn't definatley
|
|
|
|
|
Good clear answer! Your answer goes in agreement with most texts I have read but the teachers think otherwise. This proves the teachers are wrong.
Thanks
|
|
|
|
|
Hi All,
I am trying to display a list of databases in SQL Server 2005. When I used to use MySQL I used a SHOW DATABASE which returned a list of databases.
With SQL Server 2005 this command is not accepted. Can I perform the same list in SQL Server ?
Fritzables.
|
|
|
|
|
exec sys.sp_databases is a stored procedure that will list all the databases for you...
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
|
can you help me
i want to encrypt password that user input from c# app
how can do it
thanks
|
|
|
|
|
|
Use the EncryptoProvider classes in .net framework.
|
|
|
|
|
Mani_Kish wrote: want to encrypt password that user input from c# app
how can do it
There's numerous ways to do this. Look into the Cryptography namespace in .NET.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
I have 3 Tables (Person-1------1->Employee-1------*>Career)
an employee can have multiple Career. I created the sql statement below
to return some information on an employee
##################################################
select p.FamilyName,
p.AddressLine1,
Career.CareerDescription
from Person as p
inner join Employee on Employee.EmployeeID =p.PersonID
inner join Career on Employee.UniqueIdentifier = Career.ParentIdentifier and Career.PrimaryPostYN = 'Y'
###############################################
The "Career.PrimaryPostYN = Y" indicates which post is active for an employee with multiple career.
So only one post should be active at any one time all other should be set to "Career.PrimaryPostYN = N"
QUESTION:
If in a freak case, if an employee has multipe career and all record for that person is set to "Career.PrimaryPostYN = Y". In such a case i want to return the first case where "Career.PrimaryPostYN = Y"
How do i alter the above statement to do this?
|
|
|
|
|
depending on your dbms you can use "select top 1 p.FamilyName..." (mysql, sql server) or "select ... where rownum=1" (oracle)
but you should think about how to identiy which record should be the one you want to get. maybe some sorting is needed?
|
|
|
|
|
If i use "select top 1 p.FamilyName" all the other valid Employee in the select statement will not be returned.It will only return one record set
|
|
|
|
|
hi every body
I have a table called "fields" i want to make a trigger that work after any deletion from "fields" table then insert the deleted row into another table called "fields_history"
! Assume that both tables have the same schema.
thanks in advance.
Kind Regards.
haitham
|
|
|
|
|
What is your question? You want to write a delete trigger but don't know how? Have you tried reading the documentation[^]?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
thanks for ur attention
i know the syntax of how to write a trigger but i want to take the row that is deleted from the first table and insert that row in the second table
thank you in advance.
haitham
|
|
|
|
|
The logical table deleted contains the data for the row(s) you are deleting. Write an INSERT INTO query that takes the rows in this table and inserts them into your history table.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
thank you very much for this help
haitham
|
|
|
|
|
Hi!
is it possible to get a logical sum on two integers in sql??
thanks for any help
life is study!!!
|
|
|
|