Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataReport and DataEnvironment
Message
De
11/04/2000 15:49:47
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Titre:
DataReport and DataEnvironment
Divers
Thread ID:
00358303
Message ID:
00358303
Vues:
64
Hi!

I'm using a Data Environment and a Data Report in a program. I want to change the SQL String and the database name because the name of the databse will change if I'm in Demo mode or in Real Mode... Can I do that?? I haved try :

dataEnv.connGis3000.Open(puDatabaseName)
dataEnv.connGis3000.DefaultDatabase = puDatabaseName

I want to change the original query too to add " Where =......"

For this I haved try

dataEnv.rscmdName.Source = SqlQuery$

But does not show that it's working..... Let me show you the part of the code I use to call my report Where dataEnvSoumission1is my dataEnvironmen name, rscmdSoumissions is my parent command, connGis3000 is my connection name and dataReportSoumission1is my dataReport sheet name..

dataEnvSoumission1.connGis3000.Open (puNomFichierClientMDB$)
dataEnvSoumission1.rscmdSoumissions.Source = "Select * From Soumissions Inner Join Client On Client.Id=Soumissions.Numero_client Where Soumissions.Numero_soumission=" & Int(Trim$(lblNumero_soumission.Caption))

If dataEnvSoumission1.rscmdSoumissions.State = 0 Then
dataEnvSoumission1.rscmdSoumissions.Open
End If

dataEnvSoumission1.rscmdSoumissions.Requery
dataReportSoumission1.Show 1
dataEnvSoumission1.rscmdSoumissions.Close
dataEnvSoumission1.connGis3000.Close

Thanx!!!!!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform