473,388 Members | 1,256 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,388 software developers and data experts.

Update changes

I have this example:

Dim myConn As New SqlConnection(myConnection)
Dim myDataAdapter As New SqlDataAdapter()
myDataAdapter.SelectCommand = New SqlCommand(mySelectQuery, myConn)
Dim cb As SqlCommandBuilder = New SqlCommandBuilder(myDataAdapter)

myConn.Open()

Dim ds As DataSet = New DataSet
myDataAdapter.Fill(ds, myTableName)

' Code to modify data in DataSet here
myDataAdapter.Update(ds, myTableName)

myConn.Close()

I use update command to update the modified data from dataSet back into the
database.
Now I would like to know if it's possible to update the changes from dataset
back to database with stored procedure?

The problem is, that my sqlConnection has only read permissions on the
database tables and execute permission on Stored procedures.
That is for security purpose.

Is it possible and any example?

Thank you for your answer,
Simon
Nov 20 '05 #1
2 1060
> Now I would like to know if it's possible to update the changes from dataset
back to database with stored procedure?

The problem is, that my sqlConnection has only read permissions on the
database tables and execute permission on Stored procedures.
That is for security purpose.

Is it possible and any example?

Thank you for your answer,
Simon

Sure it´s possible - and it not hard at all!
Rember that the updatecommand is just a Command object - so there should be no problems. If you not are used to work with SP´s and the command object take a look at http://msdn.microsoft.com/library/de...ithcommand.asp

Nov 20 '05 #2
> Now I would like to know if it's possible to update the changes from dataset
back to database with stored procedure?

The problem is, that my sqlConnection has only read permissions on the
database tables and execute permission on Stored procedures.
That is for security purpose.

Is it possible and any example?

Thank you for your answer,
Simon

Sure it´s possible - and it not hard at all!
Rember that the updatecommand is just a Command object - so there should be no problems. If you not are used to work with SP´s and the command object take a look at http://msdn.microsoft.com/library/de...ithcommand.asp

Nov 20 '05 #3

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

Similar topics

5
by: Klemens | last post by:
I get SQL30090 reason 18 by trying to do an insert in a federated table and an update in a local table in one transaction Do I have to change some settings to get done or ist this not possible by...
1
by: Just_Buy | last post by:
Environment: MS Access 97 Problem: Trying to force a record to update using the recordset.Update property. What syntax do I need to force a record to be updated? I have searched the...
1
by: Jose_Csharp | last post by:
Hello group, I trying to do an aplicattion where it shows the data from a sql server database and you can save the changes. When I use a datagrid I haven´t any problem to update de changes but...
4
by: Jonathan Upright | last post by:
Greetings to anyone who can help: I'm using WebMatrix to make ASP.NET pages, and I chose the "Editable DataGrid" at the project selector screen. As you may know, it defaults to the Microsoft...
2
by: Richard | last post by:
Hi, I have 1 dataset with 2 tables (Table1 as parent, Table2 as Child), 1 row in both the tables. I am updating it with a transaction. First parent then child. When child update fails, it raise...
7
by: Jean Christophe Avard | last post by:
Hi! I have a dataset that retreive all the item information from the database. I need to be able to edit them, in the dataset and in the database. I have this code, could anyone tell me if I'm...
1
by: cindy | last post by:
this is the call private void Page_Load(object sender, System.EventArgs e) { OdbcConnection connection = new OdbcConnection ("DSN=PFW52"); CreateDataAdapter(connection); } this is the code,...
30
by: Charles Law | last post by:
Here's one that should probably have the sub-heading "I'm sure I asked this once before, but ...". Two users are both looking at the same data, from a database. One user changes the data and...
16
by: Ian Davies | last post by:
Hello Needing help with a suitable solution. I have extracted records into a table under three columns 'category', 'comment' and share (the category column also holds the index no of the record...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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,...
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...

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.