Hello,
I created command object in DataEnvironment. Now I wish to change to command object's Sql Text since table name gets changed depending upon year of working.

Could you be a little more specific, and possibly attach the project and database?

Let me try to help in this case, (Since i got the same doubt),

See, there is a DataEnvironment, it has a Connection object and both's required properties set at design time. There is also a Command1 which has a SQL string command which is set during design time.

Now,
At runtime I want to change the Command1's SQL string, but since its a constant value it give an error, how to solve it?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.