SqlCeCommandBuilder

  • Thread starter Thread starter Neelima
  • Start date Start date
N

Neelima

Hi All,

I am trying to build Insert/Update/Delete command objects at runtime
using SqlCeCommandBuilder.

The command builder method works fine if I use

oBuilder.GetInsertCommand();

I want to use the option where the parameter names are based on Column
names of the table

oBuilder.GetInsertCommand(true);

At runtime, this line throws a NotSupportedException (no other
details).

Any insight into this issue will be appreciated.

I am using CF2.0, SQL Mobile 2005


TIA
-Neelima
 
Nobody run into this issue?
I am out of options now.
Your help will be very much appreciated.
 
Hi Ilya

Thanks for your response. Here is the stack trace.

The exception is "NotSupportException"

System.NotSupportedException was unhandled
Message="NotSupportedException"
StackTrace:
at System.Data.Common.DbConnection.GetSchema()
at System.Data.Common.DbCommandBuilder.BuildCache()
at System.Data.Common.DbCommandBuilder.GetInsertCommand()
at System.Data.Common.DbCommandBuilder.GetInsertCommand()
at Dovarri.DAL.DALUtils.PrepareCommandObjects()
at Dovarri.Application.Main()


Thanks
Neelima
 
SQL Mobile does not override GetSchema() in SqlCeConnection class, so this
scenario is not supported.

As a workaround you can create queries manually.


--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
Back
Top