Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataReport and DataEnvironment
Message
From
11/04/2000 15:49:47
 
 
To
All
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Title:
DataReport and DataEnvironment
Miscellaneous
Thread ID:
00358303
Message ID:
00358303
Views:
57
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!!!!!
Next
Reply
Map
View

Click here to load this message in the networking platform