473,581 Members | 2,534 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1873
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.mic rosoft.comschre ef in
bericht news:EA******** *************** ***********@mic rosoft.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.mic rosoft.comschre ef in
bericht news:EA******** *************** ***********@mic rosoft.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.mic rosoft.comwrote in message
news:EA******** *************** ***********@mic rosoft.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.mic rosoft.comschre ef in
bericht news:D7******** *************** ***********@mic rosoft.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.mic rosoft.comschre ef in
bericht news:EA******** *************** ***********@mic rosoft.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.mic rosoft.comwrote in message
news:EA******** *************** ***********@mic rosoft.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.mic rosoft.comschre ef in
bericht news:D7******** *************** ***********@mic rosoft.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.mic rosoft.comschre ef in
bericht news:EA******** *************** ***********@mic rosoft.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.mic rosoft.comwrote in message
news:77******** *************** ***********@mic rosoft.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.mic rosoft.comwrote in
message
news:EA******* *************** ************@mi crosoft.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.mic rosoft.comwrote in message
news:77******** *************** ***********@mic rosoft.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.mic rosoft.comwrote in
message
news:EA******** *************** ***********@mic rosoft.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.mic rosoft.comwrote in message
news:26******** *************** ***********@mic rosoft.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.mic rosoft.comwrote in
message
news:77******* *************** ************@mi crosoft.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.mic rosoft.comwrote in
message
news:EA******* *************** ************@mi crosoft.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

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

Similar topics

16
16995
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 must be UPDATED, if not, they must be INSERTED. Logically then, I would like to SELECT * FROM <TABLE> WHERE ....<Values entered here>, and then...
6
2020
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
3251
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 textboxes are bound to columns in the dataset. This works correctly. I have been struggling with invoking da1.Update(ds1, "tbl1") and with help from the...
1
282
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 add the modified data adapter to my form the wizard informs me that it can not generate the code for the update and delete commands. If I remove...
3
2485
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 click Advanced should see the Generate Insert, Update and Delete statements check box but it is grayed out. Any idea what might cause this? I can...
4
9689
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 which I'm editing. SELECT: SelectCommand="SELECT ProviderID, AddressID, Address, Address2, City, State, County, Zip FROM ProviderAddress WHERE...
4
4849
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 sql DataAdapter (da) da.SelectCommand.CommandText = "Select * from Servertbl1" da.Fill(ds, "tbl1") so far, so good. If I add a row to the...
2
2444
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 problems in deleting the rows in the datagrid. i have used command fields(properties-columns) edit,update,cancel and delete commands. i changed it to...
5
1997
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 create Sqlcommands for update, insert and delete. In this program I specify that I want to delete the row with primary key = "ZACHI"
0
7873
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7800
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8309
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7902
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8178
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5365
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3806
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2304
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1405
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.