Ah, simply change the SelectCommand on the DataAdapter. The question is,
will the CommandBuilder pick up that change (if it's being used) or will the
bound controls or other VS-generated code pick up the change.
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
I changed the SelectCommand and VS picked the changes but not the final
version of the Select command.
Now I'm using SqlUpdateCommand4.CommandText ="update query; a very long
select query..." in the Load Sub.
Can I somehow force VS to pick new select query?
I liked more VS2003 way to do this. There I could edit select query after
the update or insert.
Not really. Consider that the VS tools are generating a strongly typed
DataSet at design time--not at runtime. There is no mechanism to generate
the code at runtime.
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
Igor said:
I changed the SelectCommand and VS picked the changes but not the final
version of the Select command.
Now I'm using SqlUpdateCommand4.CommandText ="update query; a very long
select query..." in the Load Sub.
Can I somehow force VS to pick new select query?
I liked more VS2003 way to do this. There I could edit select query after
the update or insert.
Ah, simply change the SelectCommand on the DataAdapter. The question is,
will the CommandBuilder pick up that change (if it's being used) or will
the bound controls or other VS-generated code pick up the change.
I modified the Select command at design time (with Query Builder) and
generated strong typed dataset by righ clicking on the DataAdapter and
"generate Dataset" command.
New columns are added to the Dataset and after DataAdapter.Fill they are
filled with data but after adding new row to the database new columns are not
updated by the Select command after the Update command.
If I put in code "Debug.Writeline(SqlUpdateCommand4.CommandText)" in select
are missing two last added columns (I added them in Design mode and generated
strong typed dataset).
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.