maintaining relation ships of tables at run time



  • 1. Install Printers
    Hi, I created an application that installs network printers. Everything seems to work oke...but the printer is not set to default. I use the following line to install the printer Shell("rundll32 printui.dll,PrintUIEntry /y /if /b ""HP LaserJet 4000"" /f D:\Install\Drivers\HP4000\WinXP\hp222ip6.inf /r ""\\SSMD\" & pq & ".Printers.Amsterdam.NL.SSMD"" /m ""HP LaserJet 4000 Series PCL 6""") I read that the /y switch is for setting the printer to default, this seems not to be working. Can anybody help me?
  • 2. Button_click (Armin)
    Hi Gary, When it is a program where even the name stays Button1, it will be in this situation with me often button1_click(nothing, nothing) When it is a real program and there are more events than Private Sub DescribeWhatIwantToDo ((ByVal sender As System.Object, ByVal e As System.EventArgs) In addition to Spamface, I am curious if Armin add also something :-)) Cor
  • 3. Solution Explorer
    Is there is a shortcut key/menu item to collapse all the project folders in the solution explorer.
  • 4. Can Array String Values Be Assigned to a Struct
    The following code puts a structure location in an array field: XrefArray(i) = "ArrayIn(i).Field" & RefText.Substring(NumStart + 1) -------------------------------------------------------- Array(i).Field1 is the value now assigned to XrefArray(i) -------------------------------------------------------- How can I now assign the value in this array and, therefore, the value in ArrayIn(i).Field1 to another struct? OutputArray(i).Field1 = XrefArray(i) Or can I? Thanks for any help.
  • 5. Adding an item to a Checked List Box
    Hello, I am trying to add an item to a checked list box, like: clbList.Items.add("Hello",true) I get an error back: Run-time exception thrown: System.ArgumentOutOfRangeException - Specified argument was out of the range of valid values. Parameter name: '-1' is not a valid value for index. This doesn't make a lot of sense? Any ideas why this happens? Regards Simon Jefferies Tools Programmer, Headfirst Productions mailto: XXXX@XXXXX.COM -

maintaining relation ships of tables at run time

Postby gaffar » Tue, 18 Jan 2005 14:40:48 GMT

Hello Sir,

I have created database(ms access) and tables at runtime how to maintain
relation ships between the tables. by using

Thanking u sir.

Re: maintaining relation ships of tables at run time

Postby Cor Ligthert » Tue, 18 Jan 2005 18:14:06 GMT


A (old) snippet sample I once made for this.

Dim Sql As String = "SELECT * from A, B Where " & _
    "A.n = B.n"
 Dim Conn As New OleDbConnection(connString)
 Dim da As New OleDbDataAdapter(Sql, Conn)
 da.Fill(ds, "A")
 da.Fill(ds, "B")
Dim drlA As New DataRelation _
    ("AA", ds.Tables("A").Columns("A.n"), _
Dim dv As New DataView(ds.Tables("A"))
DataGrid1.DataSource = ds

When this snippet is to short, I have others as well.

I hope this helps,


Similar Threads:

1.Maintaining relation between two tables when transferring records


I have two identical tables - same field names, identical datatypes(the tables are in different databases) and same

I need to transfer a record from one table to the other. While doing the transfer, the column names are to be
checked so that the right column data gets inserted into the other.
Though the column names are identical their order may be different in the tables

My thinking is having two data adapters and datasets and then do some sort of comparison of column names before I go ahead with the data insertion. Does that sound ok ?

Is there some other easy way ?


2.MDI Relation ship


          I have doubt in MDI forms 
genarally we will set formname.MdiParent=me in the mdi 
form if it is child but my doubt is when i open another 
child in the child form of the mdi form it is comming out 
side when i was runnig the application.
how to set mdi relation in another child of mdi child.plz 
give me the reply 


3.maintaing relation ships at runtime

Hello Sir,

I have created database(ms access) and tables at runtime how to maintain
relation ships between the tables. by using

Thanking u sir.

4.typed datasets and maintaining object relations

We are implementing Data Transfer Objects (DTO) as Typed DataSets. This 
means that we would have multiple typed DataSet classes that overlap 
slightly, sharing tables between them. 
The issue with typed datasets is that it inherits from the DataSet class and 
hence a typed dataset class cannot inherit from any other class.
For example consider two datasets MemberDS and AgentDS both sharing a Person 
table between them. By default each generated dataset would contain a schema 
defining the Person table, meaning that if the table changes, you'll have to 
change the schema in two different places. Ideally, you need a way to define 
each type once; no matter how many times your application uses or extends 
that type. That way, when the shared Person table changes, you'll only have 
to modify your code in one place.

We are planning to write a tool that will take of the issues mentioned above. 
Your help is welcome.

5.The same table cannot be the child table in two nested relations

6. same table cannot be the child table in two nested relations

7. C Run-Time Error R6002C Run-Time Error R6002

8. Auto Shipping Auto Shipping Scheduling:car moving auto transport

Return to VB.NET


Who is online

Users browsing this forum: No registered users and 93 guest