473,408 Members | 2,030 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

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

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
Oct 23 '07 #1
1 1365
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
On 23 Oct, 18:36, "Vadim Rapp" <nos...@sbcglobal.netwrote:
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

Oct 26 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: joao dias | last post by:
hi all, sorry this is a bit lenghty... I am getting stucked with an unexpected behaviour of visual studio when I insert an sqlcommand data control in a aspx page, and after configuring it to run...
10
by: Henrik Dahl | last post by:
Hello! After I've finished using an instance of the SqlCommand class, should I then invoke Dispose() on the instance. I suppose so, as there is a Dispose method, but what does it actually...
2
by: Tracey | last post by:
Sorry for the repeated post. I tried to update a record in database using SqlCommand.ExecuteNonQuery( ) method (I failed using SqlDataAdapter). I traced the above statement and found that it returned...
10
by: John Bailo | last post by:
I want to pass a SqlCommand object as a input parameter to a method. I want to pass the SqlCommand "by value" so that any updates to the original object are *not* reflected in the object within...
1
by: IanO | last post by:
I am following Example 4-1 in Dave Mercer's ASP,NET A Beginner's Guide. He asks the reader to create a table 9 rows 2 columns with captions in the left column and Input controls in the right...
0
by: Leanne | last post by:
I am doing customization for Microsoft Pos. I am working on installation package now. I added some new tables and stored procuedures and generated SQL Script for that. During the installation...
6
by: Nuzzi | last post by:
Hello All, I have two pages that are very similar. One is working, one is not. Here is the code for both: Page 1 (Working): protected void btn_update_Click(object sender, EventArgs e)...
2
by: SunshineInTheRain | last post by:
I'm trying to modify a long long code within a button click by make the insert/update/delete/select using the same transaction. Purpose is to make sure every operation can be rollback instead of some...
2
by: Austin326 | last post by:
Hi Everyone, I have a problem that is quite frusturating. I am passing in an image from a database, which is to be accessed in an image button. When I dynamically add the string for an sql...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.