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

How to read an SQL Server into a ASP page and then change, add, delete and write it back to SQL Server

Hello All

I need to read a SQL Server table into a Web Page and within the Web
Page to permit my users to make changes to the records, delete or add
new records and then save the entire contents back to the SQL Server
table back.

The functionality I am looking is almost the same as In the SQL
Enterprise Manager whereby I can choose a table open the table and
then return all rows and I can maintain the same and save it back to
the SQL Server table. I want almost a similar web interface to such a
functionality.

Even if not a generic functionality as the SQL Enterprise Manager
table maintenance appreciate if somebody can share the code with a
sample how I can do it in ASP pages + T-SQL if need be.

Thanks
Belinda
Jul 19 '05 #1
4 1959
On 10 Jun 2004 01:20:10 -0700, be********@yahoo.com (Belinda) wrote:
I need to read a SQL Server table into a Web Page and within the Web
Page to permit my users to make changes to the records, delete or add
new records and then save the entire contents back to the SQL Server
table back.
That's an extremely ineficient design. Send *everything* to the web
page, then send *everything* back, even for just changing a single
phone number?
The functionality I am looking is almost the same as In the SQL
Enterprise Manager whereby I can choose a table open the table and
then return all rows and I can maintain the same and save it back to
the SQL Server table. I want almost a similar web interface to such a
functionality.
Then it's *not* the same. You change a row in the Enterprise Manager
and it changes just that data in the table.
Even if not a generic functionality as the SQL Enterprise Manager
table maintenance appreciate if somebody can share the code with a
sample how I can do it in ASP pages + T-SQL if need be.


Pull up a list of records that match a criteria (reduce the amount of
data sent), then when a single record is clicked on to change, pull
the full record into a form. Edit it and do an UPDATE on that record
by clicking a "Save Changes" button. Simpler, faster and infinitely
expandable. Plenty of sample code on the internet for each portion of
this.

Jeff
Jul 19 '05 #2
Belinda wrote:
Hello All

I need to read a SQL Server table into a Web Page and within the Web
Page to permit my users to make changes to the records, delete or add
new records and then save the entire contents back to the SQL Server
table back.

The functionality I am looking is almost the same as In the SQL
Enterprise Manager whereby I can choose a table open the table and
then return all rows and I can maintain the same and save it back to
the SQL Server table. I want almost a similar web interface to such a
functionality.


You definitely have the wrong idea about what's going on in the Enterprise
Manager interface. Be that as it may, you do NOT want to give your users the
ability to bring ALL the records from a table into their browser. A web
application running in a browser is miles from having the same capabilities
as a client application installed on a user's machine.

I suggest you pick up one of the Wrox books on database programming with ASP
and eductate yourself.

In the meantime, you may want to download and try out one of the generic
database tools for database editing available on te web. One such tool is
Eli Robillard's GenericDB which is available at www.genericdb.com. This will
give you a starting point and allow you to see what needs to be done.

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #3
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message news:<OY*************@tk2msftngp13.phx.gbl>...
Belinda wrote:
Hello All

I need to read a SQL Server table into a Web Page and within the Web
Page to permit my users to make changes to the records, delete or add
new records and then save the entire contents back to the SQL Server
table back.

The functionality I am looking is almost the same as In the SQL
Enterprise Manager whereby I can choose a table open the table and
then return all rows and I can maintain the same and save it back to
the SQL Server table. I want almost a similar web interface to such a
functionality.


You definitely have the wrong idea about what's going on in the Enterprise
Manager interface. Be that as it may, you do NOT want to give your users the
ability to bring ALL the records from a table into their browser. A web
application running in a browser is miles from having the same capabilities
as a client application installed on a user's machine.

I suggest you pick up one of the Wrox books on database programming with ASP
and eductate yourself.

In the meantime, you may want to download and try out one of the generic
database tools for database editing available on te web. One such tool is
Eli Robillard's GenericDB which is available at www.genericdb.com. This will
give you a starting point and allow you to see what needs to be done.

Bob Barrows


Hi Bob

Thanks for your tips. Please note the tables I will be permitting to
edit have less than 2000 records so network impact is minimal secondly
I am not planning to let all users maintain these tables.

This is a what if analysis system users change the assumptions in some
these tables which maintain the assumptions they keep iteratively
changing the assumptions unless they meet the goal.

Please highlight to me if there is a better way of maintaining this
kind of asssumptions in a what if analysis situation. We have a number
of users doing what if analysis on a SQL server database and some of
them are remote hence we want to provided some kind of a data grid to
enable them to maintain these assumptions.

Thanks
Belinda
Jul 19 '05 #4
Belinda wrote:
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:<OY*************@tk2msftngp13.phx.gbl>...
Belinda wrote:
Hello All

I need to read a SQL Server table into a Web Page and within the Web
Page to permit my users to make changes to the records, delete or
add
new records and then save the entire contents back to the SQL Server
table back.

The functionality I am looking is almost the same as In the SQL
Enterprise Manager whereby I can choose a table open the table and
then return all rows and I can maintain the same and save it back to
the SQL Server table. I want almost a similar web interface to such
a
functionality.

You definitely have the wrong idea about what's going on in the
Enterprise
Manager interface. Be that as it may, you do NOT want to give your
users the
ability to bring ALL the records from a table into their browser. A
web
application running in a browser is miles from having the same
capabilities
as a client application installed on a user's machine.

I suggest you pick up one of the Wrox books on database programming
with ASP
and eductate yourself.

In the meantime, you may want to download and try out one of the
generic
database tools for database editing available on te web. One such
tool is
Eli Robillard's GenericDB which is available at www.genericdb.com.
This will
give you a starting point and allow you to see what needs to be done.

Bob Barrows


Hi Bob

Thanks for your tips. Please note the tables I will be permitting to
edit have less than 2000 records so network impact is minimal secondly
I am not planning to let all users maintain these tables.


This is irrelevant. The network traffic is not the only thing to think
about. Browsers have limited ability to handle large amounts of data. Web
applications do (should) not work by bringing all the records to the client.

This is a what if analysis system users change the assumptions in some
these tables which maintain the assumptions they keep iteratively
changing the assumptions unless they meet the goal.

Please highlight to me if there is a better way of maintaining this
kind of asssumptions in a what if analysis situation. We have a number
of users doing what if analysis on a SQL server database and some of
them are remote hence we want to provided some kind of a data grid to
enable them to maintain these assumptions.

I think the best way to do this would be to retrieve the records into a
spreadsheet and allow the users to do what they will with the data. I would
not recommend using an ASP application to give your users this
functionality. Use the tools that are appropriate for the task.

A Google search should find you information about using ASP to retrieve data
from a database and put it into a spreadsheet which the user can download.
As for saving the changes back to the database, you have several options,
including:

1. Give the user the ability to upload (there are third-party upload
applications that can make this easy for you - do a search at www.aspfaq.com
for some examples) his spreadsheet to a folder on your webserver and use DTS
to import it into the database. See www.sqldts.com for pointers.

There are other less efficient options, but I'm out of time. Maybe some
other people can chime in here ...

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #5

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

Similar topics

12
by: tshad | last post by:
I am trying to run a test sending mail using CDONTS on my W2K3 machine. It works fine running from my WXP Pro, but I don't recieve the mail if run the W2K3 machine. Both machines have IIS...
12
by: James Norton-Jones | last post by:
Hi, Am I trying to hold the data of a DataGrid in a label so that when the form is reposted the DataGrid can be repopulated. The problem I am having is that I don't understand how to get the...
4
by: Glenn M | last post by:
I have a shared XML file on a server . i also have one xslt file that performs a simple transform on in to view the data. now i want to have another page that lets users modify the shared xml...
6
by: den 2005 | last post by:
Hi everybody, Question 1: How do you set the values from server-side to a client-side control or how do you execute a javascript function without a button click event? Question 2: How do you...
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...
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.