Framework 2.0 Changes ADONET 1.1 SqlCommandBuilder Commands

G

Guest

I'm using the SqlCommandBuilder to help construct the update commands to a
SQL Server 2000 database. I have the SqlCommandBuilder generate the initial
command text and then modify the CommandText to use primary keys to specify
the row to be updated.

With the 1.1 Framework on a machine (that also has MSDE 2000 SP3 installed)
the UpdateCommand for a given table begins:
UPDATE tbl_employee SET employee_id = @p1 , purge = @p2 ,
After installing the 2.0 Framework on that machine the UpdateCommand for the
same table is now:
UPDATE [tbl_employee] SET [employee_id] = @p1, [purge] = @p2,

This addition of brackets to the table and field names breaks my existing
code since it is looking for un-bracketed names. After a client installs the
2.0 Framework, my code starts throwing an exception. What is the 2.0
Framework installation doing to modify the SQLCommandBuilder output in the
1.1 Framework and how can I fix it?

Curiously, the order of the installations seems to be important. I installed
the 2.0 Framework before MSDE is ever installed on a machine.
SqlCommandBuilder then returned the desired un-bracketed command string.
However, when I tried to re-install (as opposed to newly install) MSDE over a
2.0 Framework machine, the brackets in table and field names were still in
the command text.

Suggestions?
 
G

Guest

I forgot to mention that the ADO.NET 1.1 Framework code was being accessed
from a VB6 executable.

I've been able to resolve the issue by creating a configuration file for the
VB6 executable that specifies the use of the 1.1 .NET Framework.
 

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