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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Possible to set dataenvironment's command's SQL statement at run time?

Status
Not open for further replies.

oka97

Programmer
May 25, 2003
28
0
0
GB
Is it? :)
 
Yes it is,

Close your current command if open and use the following to set a new SQL-Statement:

Dataenvironment.Commands("CommandName").CommandText= NewStatement

After that you run your command again and now the RSCommandName is the new results

/Haug
 
Thanks Hauggy :)

So this means I don't have to use that horrid parameters system then?

I hate that!
 
Once you begin to question the limitations of the Data Environment you are well on track to dumping it altogether. Which is a good thing.
 
Well, the main reason to use the "horrid parameters system" is because it's more efficient.

The DataEnvironment's way of getting parameters is by using the Refresh method, which you can also use if you want to avoid said "horrid parameters system." It does require an extra round trip to the database, so it's less efficient. But what it will do is go and look up the parameters for you refresh the parameters collection of the command object with the result.

Bob Rodes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top