|
|
| Author |
Message |
dude Power User


Joined: 10 Mar 2004 Posts: 376
Location: Savar, Dhaka
|
Post subject: Compare two databases, all students and registered |
|
|
A question from a friend of mine:
He got two databases. One database holds a list of all the students of a university. Another one holds a list of data from a registration term which tracks who are registered for the term. What he wants to do in VB is to look at the first database to get a list of all the students. Then compare it to the second database and get a list of students that have registered for the term.
The databases are in Sql Server. The name fields in both database are the same. The application that I am writing is in vb. He is able to connect to the database. He just do not know what the sql statements would be to compare the information.
Can someone please help with this? |
|
Wed May 26, 04 7:12 pm
 |
|
 |
dinangkur Super Moderator


Joined: 24 Mar 2004 Posts: 491
Location: Dhaka, Bangladesh
|
Post subject: |
|
|
Dude,
Why not import that table in the student database? Write a trigger to update tables at certain schedule time.
Then create a relation between that 2 tables.
And create a "query" with where statement.
Second way,
1. connect both database.
2. get the records in a temp recordset.
3. use rs.filters function to get your data. Before that you need to join both temp recordset with another query.
I hope this will help. Work out with filter, post your code, I will help you if your code doesn't work.
-DK. _________________ ...we too are stardust... |
|
Thu May 27, 04 10:24 am
 |
|
 |
dude Power User


Joined: 10 Mar 2004 Posts: 376
Location: Savar, Dhaka
|
Post subject: |
|
|
Hi DK,
Thank you. I will pass on the information to my friend. Can you write a smalpe code for trigerring and updating tables on a scheduled time? |
|
Fri May 28, 04 6:17 am
 |
|
 |
dinangkur Super Moderator


Joined: 24 Mar 2004 Posts: 491
Location: Dhaka, Bangladesh
|
Post subject: |
|
|
Dude,
Sure I can do that but you've to give me exact senario for it. Otherwise, I can't do it. So, ask your friend to give you the project analysis and post it here. And I will be to head in it, it's really hard to think about something without having exact senario. I hope you understand what I mean? By the way, ask your friend to join the forum.
-DK. _________________ ...we too are stardust... |
|
Fri May 28, 04 10:20 am
 |
|
 |
dinangkur Super Moderator


Joined: 24 Mar 2004 Posts: 491
Location: Dhaka, Bangladesh
|
|
Sat May 29, 04 6:49 am
 |
|
 |
dude Power User


Joined: 10 Mar 2004 Posts: 376
Location: Savar, Dhaka
|
Post subject: |
|
|
Hi DK,
Many thanks for taking the time to develop a database and the VB code. This is much more than what I expected. Give us some time to analyse the code.
I told my friend to join tha forum. But bangladeshi people are so lazy.I think, you know that. But after you did so much for him, he must join the forum.
Thank you again my friend. |
|
Mon May 31, 04 9:27 am
 |
|
 |
dinangkur Super Moderator


Joined: 24 Mar 2004 Posts: 491
Location: Dhaka, Bangladesh
|
Post subject: |
|
|
IT isn't for lazy people. That's why I quit working at maggie's firm. LOL. Bob dylan.
-DK. _________________ ...we too are stardust... |
|
Mon May 31, 04 12:03 pm
 |
|
 |
|