473,322 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

I want to connect between two columns in two databases

I am working on a students attendant project I have created two forms each with database , form1 database contain table that has students information and form2 contain table that has the name of the student and weeks of his attendant , Now i want to connect between the name column in form1 database and the name column in form2 so that whatever is added to form1 database is also added to form2 , please help me !
Jun 21 '14 #1
1 1102
i have used this code

Expand|Select|Wrap|Line Numbers
  1.     Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  2.         Dim conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source" & "C:\Users\Me\Desktop\meapp\bin\Debug\members.accdb" & ";Jet OLEDB:Database Password=")
  3.  
  4.         Dim Table_ As String = "Table1"
  5.         Dim query As String = "SELECT * FROM " & Table_
  6.         Dim ds As New DataSet
  7.  
  8.         conn.Open()
  9.         Dim cmd As New OleDbCommand(query, conn)
  10.         Dim da As New OleDbDataAdapter(cmd)
  11.         conn.Close()
  12.  
  13.         Dim t1 As DataTable = MembersDataSet.table1
  14.         Dim t2 As DataTable = Form5.WhoishereDataSet.firstmonth
  15.         Dim c1 As DataColumn = MembersDataSet.table1.nameColumn
  16.         Dim c2 As DataColumn = Form5.WhoishereDataSet.firstmonth.nameColumn
  17.         Dim Item(2) As String
  18.  
  19.         For Each column In t1.Columns
  20.             c1 = c2
  21.  
  22.  
  23.  
  24.  
  25.         Next
  26.  
  27.  
  28.     End Sub
Jun 21 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: CM | last post by:
Hi, when i want connect me in my BD with a JSP (with this simple code), this exception is throw. Thank's for ur help Mathieu CODE of my JSP ---------------------
5
by: Christoffer Gurell | last post by:
I want to create a program which displays large tables and makes this possible over a slow connection. The problem is that when i do a PQexec the entire retultset is transfered. I would like to...
5
by: xururong | last post by:
Hi, I need to create a sql select statement which join 2 databases, where both the database have to connect with different port numbers, db1 port: 3306 db2 port: 3311 select something from...
2
by: hanaa | last post by:
Hello Is it true that 16-bit C compilers cannot connect to databases? I have Borland Turbo C++ version 3.0. Would I have to use a 32-bit compiler if i want to use a database for my application?...
2
by: neovantage | last post by:
Hey, I want to connect to 2 different MYSQL databases at the same time. Does somebody help me out that how can i do that closing one connection and selecting other and vice versa...? kind...
1
by: VisHEarT | last post by:
I have two databases from two different server and i want to connect them in one php page... First connection is established but in second connection it's giving me error like... Warning:...
2
by: Bassem | last post by:
Hello, How can I connect two databases on two different host? I'm trying to copy some data from a table#1-database#1 to table#1-database#2. Thanks in advanced!
0
by: Code Bug | last post by:
Basically, I want to connect the tip of each plane to the other. So I thought I might try creating a variable specifically for the points I want to connect: The tip of each plane. Then, for each...
1
by: MuneerShajahan | last post by:
Hi, I am new to VB.Net. I want to connect my VB.Net project to SQL server to pass the data. How do I do that? Appreciate your help with an example.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.