Re: VS 2003 & SQL 2005 Data Adapter Error

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Cor

Your last reply has just got me thinking this may be a permissions
problem on the SQL 2005. I have just loaded it and wanted to start to
develop against it rather than SQL2000. The only difference was that
sql2k was on the 2k3 sever and sql2k5 is on my local machine.

I think some playing around with permissions might be in order here.

Thanks for your reply..... I no doubt will be back to you.
--

DaveG
Norway - Oslo - Skoyen


Cor Ligthert [MVP] wrote:

Dave,

What is strange for me is that it works for the 2000 and not for 2005.

The error code you shows means that the connection for the
dataadapter are not set properly, but that is a part of the wizard
generated code. Are you sure you use the by the wizard generated
datadapter. In other words, can you show a piece of the code you use
to update?

Cor

"Dave Griffiths" <daveginorge@xxxxxxxxxxxxxxxxxx> schreef in bericht
news:xn0epov22az5t5000@xxxxxxxxxxxxxxxxx
I am attempting to connect with SQL Client.
When I create the Data adapter using the Wizard (as I said still
early days for me)
1. I choose the connection
2. I select "Use SQL Staements"
3. I use the "Query Builder" and select a single table and a few
fields 4. The following Query is Generated.

SELECT
DisplayName,
CompanyName,
FirstName,
CustomerID
FROM
Customer

6. Click next and it creates all Statements but INSERT - DELETE -
UPDATE have errors. When I try and use the UPDATE in the program I
get an ERROR during UPDATE process.

Error Message
----------------------
An unhandled exception of type 'System.InvalidOperationException'
occurred in system.data.dll

Additional information: Update requires the UpdateCommand to have a
connection object. The Connection property of the UpdateCommand has
not been initialized.
--------------------------------

If I do the above against an SQL 2000 server all works fine.

Thanks for your time Cor
--
DaveG
Norway - Oslo - Skoyen


Cor Ligthert [MVP] wrote:

Dave,

At least we need to know what kind of provider you use, SQLClient,
OleDB, ODBC. Than we are interested in your Select command what
is the base of the three that goes wrong,

Cor

"Dave Griffiths" <daveginorge@xxxxxxxxxxxxxxxxxx> schreef in bericht
news:xn0epotmz92rd0000@xxxxxxxxxxxxxxxxx
Hi All

Very new to ADO.Net & SQL

When I create a data adapter to SQL 2005 server I get the
meassages.

Generated SELECT Command
Generated TABLE Mappings
Error creating INSERT command
Error creating UPDATE command
Error creating DELETE command

If I create a data adapter to a SQL 2000 server everything creates
OK

Is this a known issue between the 2 products VS 2003 & SQL 2005.

Is there an answer to the problem apart from using sql 2000
server.

All help welcomed.

Thanks in advance.
--
DaveG
Norway - Oslo - Skxyen
.



Relevant Pages

  • Re: COBOL stored procedure for DB2
    ... Regarding how you precompile the app, you must specify target mfcob to db2 prep, rather than target ibmcob. ... Have you also confirmed that, prior to executing the CALL statement, the host variables specified within the client app have the appropriate values? ... MODIFIES SQL DATA ... confirm the cob command used for creating the SP module. ...
    (comp.lang.cobol)
  • Re: VS 2003 & SQL 2005 Data Adapter Error
    ... The error code you shows means that the connection for the dataadapter are ... If I do the above against an SQL 2000 server all works fine. ... When I create a data adapter to SQL 2005 server I get the meassages. ... Generated SELECT Command ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: What commands can a user execute
    ... simple security query rather than BOL. ... example would be the command UPDATE STATISTICS. ... ALTER permissions on the table or view. ... you could retrieve this with a query from SQL Server rather than Books ...
    (microsoft.public.sqlserver.security)
  • Re: What commands can a user execute
    ... example would be the command UPDATE STATISTICS. ... ALTER permissions on the table or view. ... you could retrieve this with a query from SQL Server rather than Books ...
    (microsoft.public.sqlserver.security)
  • Re: COBOL stored procedure for DB2
    ... Have you also confirmed that, prior to executing the CALL statement, the ... The DB2 CREATE PROCEDURE statement. ... MODIFIES SQL DATA ... confirm the cob command used for creating the SP module. ...
    (comp.lang.cobol)