|
-
Nov 12th, 2003, 07:29 PM
#1
Thread Starter
New Member
How to access multiple tables in VB.NET?
How to access multiple tables in VB.NET?
We have 4 tables(in MSAccess) of which one is not related to any other table.
To access all the 4 tables from a windows form should we have more than one data adapter and data set?
OR
Can we have independent data adapters and sets for each table?
Pls let me know in detail.
-
Nov 12th, 2003, 08:14 PM
#2
Hyperactive Member
you can use the same DataAdapter to load multiple DataSet's.
-
Nov 13th, 2003, 02:17 PM
#3
Thread Starter
New Member
Thanks
Thank you very much mr.crpietschmann
-
Nov 13th, 2003, 02:22 PM
#4
Thread Starter
New Member
Closing of Forms.
My problem is this:
When a new form(say Form2) pops up on clicking a button on the previous form(say Form1), I need to get the Form1 closed automatically.
I found the close method but it closes all the forms.Also there is Hide mehtod , but i dont know how to use that. Will this Hide help in solving the problem?
Pls let me know
-
Jan 28th, 2004, 12:57 AM
#5
New Member
mmm
To close the form you are in only add Me.Close () to your exit button.
For example
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Close()
End Sub
-
Jan 28th, 2004, 12:04 PM
#6
Addicted Member
In the event that shows form2:
Private Sub btnShowForm2(........
Dim form2 as new form2
Me.ActiveForm.Hide() 'Hide Form1
Form2.Showdialog() 'Show Form2
End Sub
-
Jan 28th, 2004, 12:49 PM
#7
PowerPoster
Hi,
"When a new form(say Form2) pops up on clicking a button on the previous form(say Form1), I need to get the Form1 closed automatically.
I found the close method but it closes all the forms.Also there is Hide mehtod , but i dont know how to use that. Will this Hide help in solving the problem?"
I think you may find that you have not started your application correctly. If you use the following code in a module and use the sub main as the startup, you will be able to close any form without affecting the others.
Public frm1 as new Form1
Public Sub Main()
Application.Run(frm1)
end sub
Regards,
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|