VWD2005: SQLCommand can't be added to page, why?

V

Vadim Rapp

Hello,

in Visual Studio 2005/Visual Web Developer, if I add SQLCommand,
SQLCommandBuilder,SQLConnection, SQLDataAdapter to the toolbox, they don't
show up until I check "show all items"; then they appear disabled, and can't
be added to the page. Still, I see that I can create those objects
programmatically. Why I can't use visual constructor? Is there some other
way that is more preferred in VS2005?

thanks
 
P

Phil H

Hi

The objects you mention have been superceded by the SQLDataSource
control and is specially designed for Web Applications. Unlike the
previous objects this new control is declared in the .ASPX source file
using the tag <asp:SqlDataSource ...> It is displayed in the Design
window as a grey box where you can configure with the aid of a Wizard.

The data controls in the namespace System.Data.SqlClient are still
available for use by WIndows Forms (in visual drag ad drop mode) or
Web applications (programmatic ony). In fact if you need to do data
operations in code in a Web application then these objects have to be
used rather the the new web datasources mentioned above which are
designed purely for attachment to visual controls.

HTH
 

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

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top