Hello boys.. I'm here for an advice.. I have table 'users' with : ID , USER.. And 'activities' with : USER_ID , activity..
I want to select the USER_ID from 'activities' to find the user ID in the 'users' table..
I am using the VB database..
On php i know how to do this , but in VB i can't imagine how to select a row from a table , and to find it on anoter table..
I hope you understand , and you can help me .

Recommended Answers

All 7 Replies

Nobody knows ?

Do you know ADO.NET? Using ADO.NET classes you may establish database connection and execute queries.

Do you know ADO.NET? Using ADO.NET classes you may establish database connection and execute queries.

I don't know.. i don't know how to start.. A website that explains good , can you give me please ?

Start learning ADO.NET from MSDN.

Edit:
Corrected it.

first of all, to have a matching 'user_id' with a matching 'iD' in the users table, there has to be a relationship between the two tables in order to avoid conflicts or avoid the return of nulls.

first of all, to have a matching 'user_id' with a matching 'iD' in the users table, there has to be a relationship between the two tables in order to avoid conflicts or avoid the return of nulls.

Not necessarily. Null is a value and it is not always possible to have a relationship between the tables. That's why joins exist.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.