Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datagrid and ADODB coupling 1

Status
Not open for further replies.

Genotix

Programmer
Dec 16, 2004
53
NL
Hi there,

I'm quite new in using VB6 but very fimiliar with SQL databases and many other programming languages.

At the moment i'm filling a Datagrid using a pre defined
Data Environment command.
This works very nice but..
I would like to get a listing of a Recordset that i declared in the form into my Datagrid.
I've tried for about 3 hours now but I don't seem to get any further.

The reason I want this, is because I need to couple multiple tables and "editing" the foreign and primary keys through VB6.

I saw an option named "filter" that could be used with a recordset and I'm trying to find out how this works too.

Thanx 4 all of you advice!

Eric (from Holland)

Linux IS userfriendly.
It's only very selective about who it's friends are.
 
If I understand you correctly, you want to reference in your code the recordset that underlies the dataenvironment object. I'm assuming also that you have successfully created a connection with a child command in the Data environment window, meaning you can open the command and see the fields of your recordset. If that is so, you can reference the recordset in code as follows:

MyDe.rsMyCommand

In other words, the data environment exposes a recordset object as a property of itself, as "rs" followed by the name of your command.

HTH

Bob
 
Thanx for your help, Bob.
The problem was actually that I couldn't insert a Recordset in the Datagrid.
I managed to do it now without using the graphical dataenvironment but with a data environment that i can adapt so i can choose my own queries to run.

Linux IS userfriendly.
It's only very selective about who it's friends are.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top