| Author |
Topic |
|
Mpilo
Yak Posting Veteran
52 Posts |
Posted - 2008-09-29 : 06:04:12
|
| I have 2 forms login form and member form , if a member login in a login form iwant to populate members details in the form member.how can i do this with stored procedure |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-09-29 : 06:04:53
|
| what all data you want to populate? what are fields of memeber table? |
 |
|
|
Mpilo
Yak Posting Veteran
52 Posts |
Posted - 2008-09-29 : 06:17:10
|
| Here are the attribute of member ,the member login using Surname and a MembershipNum in the form login:Create table Member( MembershipNo int identity(010,1)Not null, Title varchar(5), FirstName varchar(30), Surname varchar(30), MembershipNum int Not Null, IDNumber varchar(13), DOB varchar(15), Languages varchar(30), Gender varchar(6), Occupation varchar(20), CellNumber varchar(10), Work_Tel varchar(10), Home_Tel varchar(10), E_mail varchar(30), Hobbies varchar(30), MemberShipOfOrg varchar(30), R_Address varchar(60), R_Code int Not Null, Postal_Address varchar(60), Postal_Code int Not Null, DateCreated Datetime default getdate(), WardNo int Not Null, Constraint Member_pk Primary key clustered(MembershipNo)); |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-09-29 : 06:19:02
|
| what will you be passing from form? |
 |
|
|
Mpilo
Yak Posting Veteran
52 Posts |
Posted - 2008-09-29 : 06:23:41
|
i will pass MembershipNum quote: Originally posted by visakh16 what will you be passing from form?
|
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-09-29 : 06:30:31
|
quote: Originally posted by Mpilo i will pass MembershipNum quote: Originally posted by visakh16 what will you be passing from form?
replace * by columns you want. |
 |
|
|
Mpilo
Yak Posting Veteran
52 Posts |
Posted - 2008-09-29 : 06:40:16
|
How can i login in another form show details in another formquote: Originally posted by visakh16
quote: Originally posted by Mpilo i will pass MembershipNum quote: Originally posted by visakh16 what will you be passing from form?
replace * by columns you want.
|
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-09-29 : 06:48:02
|
quote: Originally posted by Mpilo How can i login in another form show details in another formquote: Originally posted by visakh16
quote: Originally posted by Mpilo i will pass MembershipNum quote: Originally posted by visakh16 what will you be passing from form?
you need to call this sp from form passed memnum of logged in person and retrieve deatils and display it.replace * by columns you want.
|
 |
|
|
Mpilo
Yak Posting Veteran
52 Posts |
Posted - 2008-09-29 : 07:04:43
|
how to pass this variable in another formquote: Originally posted by visakh16
quote: Originally posted by Mpilo How can i login in another form show details in another formquote: Originally posted by visakh16
quote: Originally posted by Mpilo i will pass MembershipNum quote: Originally posted by visakh16 what will you be passing from form?
you need to call this sp from form passed memnum of logged in person and retrieve deatils and display it.replace * by columns you want.
|
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-09-29 : 07:12:06
|
quote: Originally posted by Mpilo how to pass this variable in another form
may be as a query string parameter . which language you're using? |
 |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2008-09-29 : 07:12:08
|
| I would advice you read up on .net's membership providers. Microsoft has simplified your request in .net 2.0 |
 |
|
|
Mpilo
Yak Posting Veteran
52 Posts |
Posted - 2008-09-29 : 07:12:18
|
i need to pass my stored procedure in form.populate data without entering any data.how can i do itquote: Originally posted by visakh16
quote: Originally posted by Mpilo How can i login in another form show details in another formquote: Originally posted by visakh16
quote: Originally posted by Mpilo i will pass MembershipNum quote: Originally posted by visakh16 what will you be passing from form?
you need to call this sp from form passed memnum of logged in person and retrieve deatils and display it.replace * by columns you want.
|
 |
|
|
Mpilo
Yak Posting Veteran
52 Posts |
Posted - 2008-09-29 : 07:15:54
|
i'm using C# and sqlserverquote: Originally posted by visakh16
quote: Originally posted by Mpilo how to pass this variable in another form
may be as a query string parameter . which language you're using?
|
 |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2008-09-29 : 07:23:13
|
| Are you using winforms or webforms ?As I adviced, if you are using webforms in c#, I would advice you to use Micorosft memebership provider. It...1. Creates your database for you (encrypts your passwords)2. Secures your site3. Simplifies your frontend codeSo you dont need to call stored procedures to do your work. But with one line of code you can create your users (encrypt passwords) and your user profilesMemebrship.Createuser("username","password","email@yourdomain.com"); |
 |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2008-09-29 : 07:25:54
|
quote: Originally posted by visakh16 may be as a query string parameter . which language you're using?
Thats not a good idea, there are far more advanced methods.To pass values, use string variable;variable = Your_control.Text.ToString(); |
 |
|
|
|