Get the data from login and insert the data in another table

vb.net , mssql , login form , one form , another form India
  • 12 years ago
    Hello All, Good Day! I am a fresher, doing a project in vb.net/ms sql 2003 for machine maintenance application. As usual the first form is a Login form for users. Second form is for to view/add/delete/edit the machine details.. say a machine master. Each hold a table in the MS SQL database. Please help me for the following, 1) How to get the Username who login and place it in the second form's table as I have to track which user has logged in and modified the data 2) Is it possible to have seesion in vb.ne.. any alternative as I need to avoid the issue when two users alter a same data at same time? Thanks for your help, Allen
  • 12 years ago
    Simply create a property on Form2 that makes this possible: public string CaptionText { get {return textbox1.Text;} set {textbox1.Text = value;} } and assign it: sForm.CaptionText = textbox1.Text; sForm.Show(); For the record, I also don't recommend this Form2 Instance() approach; I'd simply use a new frmNEmp(); A static form, in particular, has various issues with threading, multiple parenting, etc... G.sam....

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Some people, when confronted with a problem, think "I know, I’ll use regular expressions." Now they have two problems.” - Jamie Zawinski