Home All Groups Group Topic Archive Search About

Manually generating SQL for OleDbDataAdapter

Author
14 May 2005 2:09 AM
AprilEtc
Not all of my "source" tables include primary keys (don't need it for my
purposes).  Unfortunately, that means I can't use the CommandBuilder to
generate SQL based on my SelectCommand.  I've tried to manually generate the
SQL commands (and they look right), but I seem to be missing a step because
then NO updating occurs (whether a primary key or unique field exists or
not).  I add the parameters (command.parameters.add), but that doesn't seem
to change anything.  The values I'm adding to the "source" are from an XML
file loaded into a dataset, so I'm not explicitly listing them in the code. 
These values will update to the "source" just fine when I use the
commandbuilder and the "source" table has a primary key or unique field.

Is there something else I should try or MUST every "source" table have a
primary key or unique field in order to write data back to the "source?"

Author
16 May 2005 3:08 PM
Jeff Johnson [MVP: VB]
This is a VB "classic" newsgroup. Questions about VB.NET (including VB 2005,
which has dropped .NET from its name) are off-topic here.

Please ask .NET questions in newsgroups with "dotnet" in their names. The
*.vb.* groups are for VB6 and earlier. If you don't see the *.dotnet.*
groups on your news server, connect directly to the Microsoft server:
msnews.microsoft.com.
Author
16 May 2005 10:51 PM
AprilEtc
Gee, thanks.  That's not at all clear from the website.  And I waited 3 days
for that answer.

Show quote
"Jeff Johnson [MVP: VB]" wrote:

> This is a VB "classic" newsgroup. Questions about VB.NET (including VB 2005,
> which has dropped .NET from its name) are off-topic here.
>
> Please ask .NET questions in newsgroups with "dotnet" in their names. The
> *.vb.* groups are for VB6 and earlier. If you don't see the *.dotnet.*
> groups on your news server, connect directly to the Microsoft server:
> msnews.microsoft.com.
>
>
>
Author
16 May 2005 11:41 PM
Bob Butler
"AprilEtc" <April***@discussions.microsoft.com> wrote in message
news:92824C54-471E-4DB6-AFE7-7D0EA34D6348@microsoft.com
> Gee, thanks.  That's not at all clear from the website.

Blame MS for re-using the name for a new language

> And I waited 3 days for that answer.

My suggestion is to get a real newsreader; even outlook express is orders of
magnitude better than web interfaces for newsgroups.

--
Reply to the group so all can participate
VB.Net: "Fool me once..."

AddThis Social Bookmark Button