473,396 Members | 2,039 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,396 software developers and data experts.

No Delete or Update Commands

I am using VS2005. I created a Windows Appication project. Inside the
Server Explorer, I created a new SQLExpress database, and then created a new
table. I added the rows, making my first row an integer, and setting the
identity property to true. I set that row to be my primary key. I then
added a dataset, and added my table to the dataset. When I configure the
table, I have no Update or Delete commands, even though the wizard has the
appropriate checkmarks, and the final screen says that it created these
commands. How do I create these commands?
Feb 27 '07 #1
13 1853
Vernon,

What wizards are you using. A SQLExpress database is completely independent
from a program.

The connections between those can be endless, a simple sample for this is
using the datasource.

http://www.vb-tips.com/dbpages.aspx?...2-b1ed16424252

Cor

"Vernon Peppers" <Ve***********@discussions.microsoft.comschreef in
bericht news:EA**********************************@microsof t.com...
>I am using VS2005. I created a Windows Appication project. Inside the
Server Explorer, I created a new SQLExpress database, and then created a
new
table. I added the rows, making my first row an integer, and setting the
identity property to true. I set that row to be my primary key. I then
added a dataset, and added my table to the dataset. When I configure the
table, I have no Update or Delete commands, even though the wizard has the
appropriate checkmarks, and the final screen says that it created these
commands. How do I create these commands?

Feb 28 '07 #2
I went into the Server Explorer, and chose "Add Connection". I then added
the DataSet to my project, and then configured it with the TableAdapter
Configuration Wizard. I realize that there are myriad ways to make a
connection to a SQL Server, but this is the way that is built right into
Visual Studio, using the SQLExpress database.

"Cor Ligthert [MVP]" wrote:
Vernon,

What wizards are you using. A SQLExpress database is completely independent
from a program.

The connections between those can be endless, a simple sample for this is
using the datasource.

http://www.vb-tips.com/dbpages.aspx?...2-b1ed16424252

Cor

"Vernon Peppers" <Ve***********@discussions.microsoft.comschreef in
bericht news:EA**********************************@microsof t.com...
I am using VS2005. I created a Windows Appication project. Inside the
Server Explorer, I created a new SQLExpress database, and then created a
new
table. I added the rows, making my first row an integer, and setting the
identity property to true. I set that row to be my primary key. I then
added a dataset, and added my table to the dataset. When I configure the
table, I have no Update or Delete commands, even though the wizard has the
appropriate checkmarks, and the final screen says that it created these
commands. How do I create these commands?


Feb 28 '07 #3
Does your table have a primary key assigned?

Robin S.
--------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote in message
news:EA**********************************@microsof t.com...
>I am using VS2005. I created a Windows Appication project. Inside the
Server Explorer, I created a new SQLExpress database, and then created a
new
table. I added the rows, making my first row an integer, and setting the
identity property to true. I set that row to be my primary key. I then
added a dataset, and added my table to the dataset. When I configure the
table, I have no Update or Delete commands, even though the wizard has
the
appropriate checkmarks, and the final screen says that it created these
commands. How do I create these commands?

Feb 28 '07 #4
Vernon,

I have almost the same effect if there is a timestamp in the data, is it
like that?

Cor
..
"Vernon Peppers" <Ve***********@discussions.microsoft.comschreef in
bericht news:D7**********************************@microsof t.com...
>I went into the Server Explorer, and chose "Add Connection". I then added
the DataSet to my project, and then configured it with the TableAdapter
Configuration Wizard. I realize that there are myriad ways to make a
connection to a SQL Server, but this is the way that is built right into
Visual Studio, using the SQLExpress database.

"Cor Ligthert [MVP]" wrote:
>Vernon,

What wizards are you using. A SQLExpress database is completely
independent
from a program.

The connections between those can be endless, a simple sample for this is
using the datasource.

http://www.vb-tips.com/dbpages.aspx?...2-b1ed16424252

Cor

"Vernon Peppers" <Ve***********@discussions.microsoft.comschreef in
bericht news:EA**********************************@microsof t.com...
>I am using VS2005. I created a Windows Appication project. Inside the
Server Explorer, I created a new SQLExpress database, and then created
a
new
table. I added the rows, making my first row an integer, and setting
the
identity property to true. I set that row to be my primary key. I
then
added a dataset, and added my table to the dataset. When I configure
the
table, I have no Update or Delete commands, even though the wizard has
the
appropriate checkmarks, and the final screen says that it created these
commands. How do I create these commands?



Feb 28 '07 #5
Yes, it does. I am aware that without the primary key being assigned in the
table adapter, there will be no Delete and Update, but I have that assigned.

"RobinS" wrote:
Does your table have a primary key assigned?

Robin S.
--------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote in message
news:EA**********************************@microsof t.com...
I am using VS2005. I created a Windows Appication project. Inside the
Server Explorer, I created a new SQLExpress database, and then created a
new
table. I added the rows, making my first row an integer, and setting the
identity property to true. I set that row to be my primary key. I then
added a dataset, and added my table to the dataset. When I configure the
table, I have no Update or Delete commands, even though the wizard has
the
appropriate checkmarks, and the final screen says that it created these
commands. How do I create these commands?


Mar 1 '07 #6
There is no time stamp. It's a pretty vanilla table. Just a few strings,
along with an autonumber ID field set as the primary key.

"Cor Ligthert [MVP]" wrote:
Vernon,

I have almost the same effect if there is a timestamp in the data, is it
like that?

Cor
..
"Vernon Peppers" <Ve***********@discussions.microsoft.comschreef in
bericht news:D7**********************************@microsof t.com...
I went into the Server Explorer, and chose "Add Connection". I then added
the DataSet to my project, and then configured it with the TableAdapter
Configuration Wizard. I realize that there are myriad ways to make a
connection to a SQL Server, but this is the way that is built right into
Visual Studio, using the SQLExpress database.

"Cor Ligthert [MVP]" wrote:
Vernon,

What wizards are you using. A SQLExpress database is completely
independent
from a program.

The connections between those can be endless, a simple sample for this is
using the datasource.

http://www.vb-tips.com/dbpages.aspx?...2-b1ed16424252

Cor

"Vernon Peppers" <Ve***********@discussions.microsoft.comschreef in
bericht news:EA**********************************@microsof t.com...
I am using VS2005. I created a Windows Appication project. Inside the
Server Explorer, I created a new SQLExpress database, and then created
a
new
table. I added the rows, making my first row an integer, and setting
the
identity property to true. I set that row to be my primary key. I
then
added a dataset, and added my table to the dataset. When I configure
the
table, I have no Update or Delete commands, even though the wizard has
the
appropriate checkmarks, and the final screen says that it created these
commands. How do I create these commands?


Mar 1 '07 #7
I found this confusing:
I added the rows, making my first row an integer, and setting the
identity property to true. I set that row to be my primary key.
If I assume that you meant columns, does that mean you only have one
column? If so, that might explain why you can't update it, with it being a
primary key. Try adding some more fields to your table and regenerating
your dataset and see what it does.

Robin S.
----------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote in message
news:77**********************************@microsof t.com...
Yes, it does. I am aware that without the primary key being assigned in
the
table adapter, there will be no Delete and Update, but I have that
assigned.

"RobinS" wrote:
>Does your table have a primary key assigned?

Robin S.
--------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote in
message
news:EA**********************************@microso ft.com...
>I am using VS2005. I created a Windows Appication project. Inside the
Server Explorer, I created a new SQLExpress database, and then created
a
new
table. I added the rows, making my first row an integer, and setting
the
identity property to true. I set that row to be my primary key. I
then
added a dataset, and added my table to the dataset. When I configure
the
table, I have no Update or Delete commands, even though the wizard has
the
appropriate checkmarks, and the final screen says that it created
these
commands. How do I create these commands?



Mar 1 '07 #8
I'm a dope. I meant columns, not rows. I have no data in the table, as I
haven't been able to Update.

"RobinS" wrote:
I found this confusing:
I added the rows, making my first row an integer, and setting the
identity property to true. I set that row to be my primary key.

If I assume that you meant columns, does that mean you only have one
column? If so, that might explain why you can't update it, with it being a
primary key. Try adding some more fields to your table and regenerating
your dataset and see what it does.

Robin S.
----------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote in message
news:77**********************************@microsof t.com...
Yes, it does. I am aware that without the primary key being assigned in
the
table adapter, there will be no Delete and Update, but I have that
assigned.

"RobinS" wrote:
Does your table have a primary key assigned?

Robin S.
--------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote in
message
news:EA**********************************@microsof t.com...
I am using VS2005. I created a Windows Appication project. Inside the
Server Explorer, I created a new SQLExpress database, and then created
a
new
table. I added the rows, making my first row an integer, and setting
the
identity property to true. I set that row to be my primary key. I
then
added a dataset, and added my table to the dataset. When I configure
the
table, I have no Update or Delete commands, even though the wizard has
the
appropriate checkmarks, and the final screen says that it created
these
commands. How do I create these commands?


Mar 1 '07 #9
It's okay, I just wanted to make sure I was understand. So you can't get
Insert to work, either, huh?

Just for grins, now that the table is there, try creating your dataset
again. To just create a dataset, right-click on your project, choose Add
New Item, and pick Data Set.

After it's created, click on the table adapter, and look at the properties.
Are the command objects given?

Robin S.
Ts'i mahnu uterna ot twan ot geifur hingts uto.
---------------------------------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote in message
news:26**********************************@microsof t.com...
I'm a dope. I meant columns, not rows. I have no data in the table, as
I
haven't been able to Update.

"RobinS" wrote:
>I found this confusing:
I added the rows, making my first row an integer, and setting the
identity property to true. I set that row to be my primary key.

If I assume that you meant columns, does that mean you only have one
column? If so, that might explain why you can't update it, with it being
a
primary key. Try adding some more fields to your table and regenerating
your dataset and see what it does.

Robin S.
----------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote in
message
news:77**********************************@microso ft.com...
Yes, it does. I am aware that without the primary key being assigned
in
the
table adapter, there will be no Delete and Update, but I have that
assigned.

"RobinS" wrote:

Does your table have a primary key assigned?

Robin S.
--------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote in
message
news:EA**********************************@microso ft.com...
I am using VS2005. I created a Windows Appication project. Inside
the
Server Explorer, I created a new SQLExpress database, and then
created
a
new
table. I added the rows, making my first row an integer, and
setting
the
identity property to true. I set that row to be my primary key. I
then
added a dataset, and added my table to the dataset. When I
configure
the
table, I have no Update or Delete commands, even though the wizard
has
the
appropriate checkmarks, and the final screen says that it created
these
commands. How do I create these commands?



Mar 1 '07 #10
Nope. Same result. No Update command, no Delete command.

"RobinS" wrote:
It's okay, I just wanted to make sure I was understand. So you can't get
Insert to work, either, huh?

Just for grins, now that the table is there, try creating your dataset
again. To just create a dataset, right-click on your project, choose Add
New Item, and pick Data Set.

After it's created, click on the table adapter, and look at the properties.
Are the command objects given?

Robin S.
Ts'i mahnu uterna ot twan ot geifur hingts uto.
---------------------------------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote in message
news:26**********************************@microsof t.com...
I'm a dope. I meant columns, not rows. I have no data in the table, as
I
haven't been able to Update.

"RobinS" wrote:
I found this confusing:

I added the rows, making my first row an integer, and setting the
identity property to true. I set that row to be my primary key.

If I assume that you meant columns, does that mean you only have one
column? If so, that might explain why you can't update it, with it being
a
primary key. Try adding some more fields to your table and regenerating
your dataset and see what it does.

Robin S.
----------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote in
message
news:77**********************************@microsof t.com...
Yes, it does. I am aware that without the primary key being assigned
in
the
table adapter, there will be no Delete and Update, but I have that
assigned.

"RobinS" wrote:

Does your table have a primary key assigned?

Robin S.
--------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote in
message
news:EA**********************************@microsof t.com...
I am using VS2005. I created a Windows Appication project. Inside
the
Server Explorer, I created a new SQLExpress database, and then
created
a
new
table. I added the rows, making my first row an integer, and
setting
the
identity property to true. I set that row to be my primary key. I
then
added a dataset, and added my table to the dataset. When I
configure
the
table, I have no Update or Delete commands, even though the wizard
has
the
appropriate checkmarks, and the final screen says that it created
these
commands. How do I create these commands?



Mar 1 '07 #11
Are there Insert and Select command objects?

Robin S.
-----------------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote in message
news:51**********************************@microsof t.com...
Nope. Same result. No Update command, no Delete command.

"RobinS" wrote:
>It's okay, I just wanted to make sure I was understand. So you can't get
Insert to work, either, huh?

Just for grins, now that the table is there, try creating your dataset
again. To just create a dataset, right-click on your project, choose Add
New Item, and pick Data Set.

After it's created, click on the table adapter, and look at the
properties.
Are the command objects given?

Robin S.
Ts'i mahnu uterna ot twan ot geifur hingts uto.
---------------------------------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote in
message
news:26**********************************@microso ft.com...
I'm a dope. I meant columns, not rows. I have no data in the table,
as
I
haven't been able to Update.

"RobinS" wrote:

I found this confusing:

I added the rows, making my first row an integer, and setting
the
identity property to true. I set that row to be my primary key.

If I assume that you meant columns, does that mean you only have one
column? If so, that might explain why you can't update it, with it
being
a
primary key. Try adding some more fields to your table and
regenerating
your dataset and see what it does.

Robin S.
----------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote in
message
news:77**********************************@microso ft.com...
Yes, it does. I am aware that without the primary key being
assigned
in
the
table adapter, there will be no Delete and Update, but I have that
assigned.

"RobinS" wrote:

Does your table have a primary key assigned?

Robin S.
--------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote
in
message
news:EA**********************************@microso ft.com...
I am using VS2005. I created a Windows Appication project.
Inside
the
Server Explorer, I created a new SQLExpress database, and then
created
a
new
table. I added the rows, making my first row an integer, and
setting
the
identity property to true. I set that row to be my primary key.
I
then
added a dataset, and added my table to the dataset. When I
configure
the
table, I have no Update or Delete commands, even though the
wizard
has
the
appropriate checkmarks, and the final screen says that it
created
these
commands. How do I create these commands?




Mar 1 '07 #12
Yes, the insert and select commands are there.

"RobinS" wrote:
Are there Insert and Select command objects?

Robin S.
-----------------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote in message
news:51**********************************@microsof t.com...
Nope. Same result. No Update command, no Delete command.

"RobinS" wrote:
It's okay, I just wanted to make sure I was understand. So you can't get
Insert to work, either, huh?

Just for grins, now that the table is there, try creating your dataset
again. To just create a dataset, right-click on your project, choose Add
New Item, and pick Data Set.

After it's created, click on the table adapter, and look at the
properties.
Are the command objects given?

Robin S.
Ts'i mahnu uterna ot twan ot geifur hingts uto.
---------------------------------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote in
message
news:26**********************************@microsof t.com...
I'm a dope. I meant columns, not rows. I have no data in the table,
as
I
haven't been able to Update.

"RobinS" wrote:

I found this confusing:

I added the rows, making my first row an integer, and setting
the
identity property to true. I set that row to be my primary key.

If I assume that you meant columns, does that mean you only have one
column? If so, that might explain why you can't update it, with it
being
a
primary key. Try adding some more fields to your table and
regenerating
your dataset and see what it does.

Robin S.
----------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote in
message
news:77**********************************@microsof t.com...
Yes, it does. I am aware that without the primary key being
assigned
in
the
table adapter, there will be no Delete and Update, but I have that
assigned.

"RobinS" wrote:

Does your table have a primary key assigned?

Robin S.
--------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote
in
message
news:EA**********************************@microsof t.com...
I am using VS2005. I created a Windows Appication project.
Inside
the
Server Explorer, I created a new SQLExpress database, and then
created
a
new
table. I added the rows, making my first row an integer, and
setting
the
identity property to true. I set that row to be my primary key.
I
then
added a dataset, and added my table to the dataset. When I
configure
the
table, I have no Update or Delete commands, even though the
wizard
has
the
appropriate checkmarks, and the final screen says that it
created
these
commands. How do I create these commands?




Mar 1 '07 #13
Figures. Maybe the delete and update commands aren't created because you
have no data in the table to delete or update. What if you add a couple of
rows (in Server Explorer, open until you find the table, and right-click on
it and choose ShowTableData. Then you can type some data into the table.
This is not unlike Access; you have to hit return or go to a different line
to commit the change on a line.

Then try recreating your dataset and see if the Update and Delete commands
are created.
Robin S.
---------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote in message
news:0D**********************************@microsof t.com...
Yes, the insert and select commands are there.

"RobinS" wrote:
>Are there Insert and Select command objects?

Robin S.
-----------------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote in
message
news:51**********************************@microso ft.com...
Nope. Same result. No Update command, no Delete command.

"RobinS" wrote:

It's okay, I just wanted to make sure I was understand. So you can't
get
Insert to work, either, huh?

Just for grins, now that the table is there, try creating your
dataset
again. To just create a dataset, right-click on your project, choose
Add
New Item, and pick Data Set.

After it's created, click on the table adapter, and look at the
properties.
Are the command objects given?

Robin S.
Ts'i mahnu uterna ot twan ot geifur hingts uto.
---------------------------------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote in
message
news:26**********************************@microso ft.com...
I'm a dope. I meant columns, not rows. I have no data in the
table,
as
I
haven't been able to Update.

"RobinS" wrote:

I found this confusing:

I added the rows, making my first row an integer, and setting
the
identity property to true. I set that row to be my primary
key.

If I assume that you meant columns, does that mean you only have
one
column? If so, that might explain why you can't update it, with it
being
a
primary key. Try adding some more fields to your table and
regenerating
your dataset and see what it does.

Robin S.
----------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.comwrote
in
message
news:77**********************************@microso ft.com...
Yes, it does. I am aware that without the primary key being
assigned
in
the
table adapter, there will be no Delete and Update, but I have
that
assigned.

"RobinS" wrote:

Does your table have a primary key assigned?

Robin S.
--------------------------------
"Vernon Peppers" <Ve***********@discussions.microsoft.com>
wrote
in
message
news:EA**********************************@microso ft.com...
I am using VS2005. I created a Windows Appication project.
Inside
the
Server Explorer, I created a new SQLExpress database, and
then
created
a
new
table. I added the rows, making my first row an integer, and
setting
the
identity property to true. I set that row to be my primary
key.
I
then
added a dataset, and added my table to the dataset. When I
configure
the
table, I have no Update or Delete commands, even though the
wizard
has
the
appropriate checkmarks, and the final screen says that it
created
these
commands. How do I create these commands?





Mar 2 '07 #14

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

Similar topics

16
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
6
by: Mark Kurten | last post by:
for some reason when i delete a row, the row doesn't get deleted from the acutal data table in SQL server. my code follows what am i missing? thanks. Dim row As DataRow Try
2
by: Rich | last post by:
Hello, I have an oleDBDataAdapter (da1) which gets data from an Access mdb and fills a dataset (ds1) with integer data from "tbl1" in Access. Data displays in textboxes on a form. The...
1
by: JJ | last post by:
Hi All, is there a limit to the size of an update or delete command that a data adapter will automatically create. I have just added another varchar field to my table and when I attempt to now...
3
by: Jesse Liberty | last post by:
I created a new database (tried both in 2005 and in SQL 2000) and then created a SqlDataSource control in an asp.net application. Clicked on the smart tag and whose configure data source. When I...
4
by: drakuu | last post by:
Hello there, I have DataGrid with some records and I would like to edit it right in the datagrid using the built in commands. I can't figure out a way to pass to the SQL query the record ID...
4
by: =?Utf-8?B?UmljaA==?= | last post by:
On a form - I have a datagridview which is docked to the entire form. The datagridview allows users to Delete and/or Add Rows. On the Form_Load event I Fill the datagridview source table with a...
2
by: cmrhema | last post by:
hello, i am new to asp.net. i am trying to do a simple application of adding,inserting and deleting rows in gridview. i am using C#.net and javascript. My edit/update works but i have...
5
by: Tony Johansson | last post by:
Hello! Here I have a working program that delete the specified row in the database. It works fine but I want to fully understand it. In this example the SQLCommandBuilder will automatically...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.