Visual basic 6 probleme with dataenvironment

J

JMF

to view data from a data base i created a data report
linked with a data environement.
The problem is that the instruction to assign a data
report to a table is fixed
exemple:
to initialise the connection i used this code

DataEnvironment1.connectTOF.Open
Parambase.baseOF1.Text, , , -1

DataEnvironment1.rsNumOF.Open "[Table des OF]",
DataEnvironment1.connectTOF, , , adCmdTable
Set RapportOF.DataSource = DataEnvironment1
RapportOF.DataMember = "NumOF"
RapportOF.Show

where Parambase.baseOF1.Text is the path name for the
database location, connectTOF is the connection with
Microsoft Jet, NumOF is the CommandText for the Table
RapportOF is the datareport whitch has been designed with
an exemple table.

instead of having a fixed table name, i would like to use
a variable ( instead of Table des OF) but the instruction
is not allow to do that.
If somebody have an idea it would help a lot
Thank you very much
 
C

Cindy Meister -WordMVP-

Hi Jmf,

Sometimes, VB-oriented people do drop in, here. But
you're more likely to get an answer to your purely VB6
question in a VB, rather than Office VBA, group.
to view data from a data base i created a data report
linked with a data environement.
The problem is that the instruction to assign a data
report to a table is fixed

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Jan 24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top