How to force CommandBuilder to generate with a view

P

Philippe

Hello Everybody,

I now am building a solution based on VSTOv3, to build a word document to
access Dynamics CRM Data view, and print out the results.
I also want the word document to enable the final used to modify the
selected record to MS CRMv4.

Modifying the record thru the view is possible in direct sql.

Now, I generate the Data Adapters, but get no primary key as it is a view. I
want to generate the update method, but no way.
Therefore using code, I manually generate the commandeBuilder, but no way as
well : there is no Primary key thru the view.

Does anyone know a solution to this issue ? Let a view look like it owns a
primary key ( and it's the case in fact )

Thank you very much,
Philippe
 
C

Cor Ligthert[MVP]

Pilippe,

The only way to be able to use a view (assuming it is not a view from one
table) is to make the update, insert and delete SQL transact code.

If you do that in your datalayer or in a SP is not the most important thing.
As it is used intensive then a SP if not then dynamic.

The commandbuilder works alone with resultsets from tables and those should
have then less than 100 columns.

Cor
 
P

Philippe

Thanks Cor,

Yes sure it's gonna be fine this way.
I'd prefer something more... fine.. like fooling at the root the adapter and
let know the builder there is a primary key. No way ?

Anyway, it's a not so difficult solution.
thank you very much !

Regards,
Philippe
 

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.

Ask a Question

Top