Add/Edit/Delete Records With Remote SQL Server 2000 Database

Dec 2, 2007

Using ASP.net 2.0 or Visual Web Developer Edition 2005 I could not find a single example
with Datagrid Control or Form View Control, to achieve the basic functionality of
Add/Edit/Delete Records with Remote SQL Server 2000 Database. When I searched for these examples I found many videos and examples using local database and in learning path of Visual web express editions, very good
examples and videos using local SQL Server 2005 database, BUT not with the remote database.

My question Is it possible to get the basic functionality of Add/Edit/Delete Records with Remote SQL Server 2000 Database
using ASP.Net 2.0 Datagrid and FormView controls?

This question looks like, a lazy developer question!! but, in my learning path I found GREAT videos in Visual Studio Web Developer Express edition and learned simple way of drag and drop the controls assign create local database and their connections, and few clicks to add/edit/delete records using datagrid and formview controls. In real life those are not much useful because many of web interfaces are with sql server 2000 and we need to convert them into ASP.Net.
Similarly I wanted to drag and drop couple of controls and less coding etc. and accomplish basic functionality of add/edit/delete records using remote database sql server 2000.

If possible please help me out.

Wondering is it possible to get the functionality of add/edit/delete records using datagrid/formview with remote sql server 2000, the way they explained in bigginers learning videos ...
I am referring to (http://msdn2.microsoft.com/en-us/express/aa700802.aspx)

If possible and you think it is possible please guide me to that URL where I can learn the great functionalty n implement..!!

View 1 Replies


ADVERTISEMENT

SQL Server 2000 Permissions For GridView Edit/Delete Functions

Feb 16, 2007

I have a SQLDataSource that gets it's data from a SQL 2000 database table.  I have configured it to generate the Update/Delete commands, which look correct.  I then have a GridView that is using this SqlDataSource to show the data with "Edit" & "Delete" buttons (the default ones from the GridView).
My problem is that while all commands (Edit, Delete) work on my local server, they do NOT work on my live server.  In my connection string, I specifiy a username and password like this:

<add name="Project_Management.My.MySettings.WebReportsConnectionString"
connectionString="Data Source=Karlweb;Initial Catalog=WebReport;Persist Security Info=True;User ID=VbUser;Password=VbUser"
providerName="System.Data.SqlClient" />
I have access to change the permissions on my production server, so I gave this "VbUser" every allow permission I could find and still I could not Edit or Delete records.  What I mean by they "do not work" is that when I click the Edit button, the GridView switches to edit mode, but when I click Update, the changes are not written.  When I click the Delete button, the page just refreshes and the record is not deleted.
As this is working on my local server, I think the problem lies in some permission or configuration of the server.  Does anyone have any suggestions of where I could look or what to change?
Thank you!

View 3 Replies View Related

Why I Cannot Create/edit Tables In VS.Net Server Explorer For SQL Server 2000 Developer Local Database?

Apr 7, 2006

I found that when I install MSDE, then I can create/edit database objects for MSDE database in Visual Studio 2003 Server Explorer, but when I try to create/edit database objects under the default database created by the SQL Server 2000 installation, I cannot do these tasks as no option for these tasks appear when I right-click on the database object in Server Explorer.  Anyone knows why this is happening?

View 3 Replies View Related

Need Help~for Edit, Delete The Existing Query And Diagram In Database~

Apr 8, 2008

anyone know how to delete diagram in database that show relationship between tables?or anyone know how to open the existing relation diagram and existing query in database?wonder why my sqlexpress which come wit visual basic web developer 2005 only hav new query button and new diagram button~dont have edit exisiting diagram or edit existing query~==.=~~hope someone help me~ 

View 3 Replies View Related

How Can I Change The Read-only Database For Add, Edit And Delete Users?

Jan 25, 2006

Sorry about my English, it is not my natural language and thanks for your help. I have installed the Personal Site Starter Kit, everything work perfect except register users. When a new user try to register as a new user he receives an error, caused because the database is "read-only". In IIS the database has read and writing permissions and the directories where the aplication is. How can I change the database permissions?

Server Error in '/personalweb' Application.


Failed to update database "C:INETPUBWWWROOTPERSONALWEBAPP_DATAASPNETDB.MDF" because the database is read-only.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Failed to update database "C:INETPUBWWWROOTPERSONALWEBAPP_DATAASPNETDB.MDF" because the database is read-only.Source Error:



An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:



[SqlException (0x80131904): Failed to update database "C:INETPUBWWWROOTPERSONALWEBAPP_DATAASPNETDB.MDF" because the database is read-only.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +857466
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735078
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +149
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +886
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +415
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135
System.Web.Security.SqlMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) +3612
System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() +305
System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) +105
System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +453
System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) +149
System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +17
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

View 1 Replies View Related

Best Practice For Add, Edit Records Into Database With Lots Of Fields ?

Feb 7, 2006

What's the best practice for adding / editing a record into a database with lots of fields ?I am not talking about the mechanics of it, as there are a lot of trivial examples using ADO.NET, stored procs, etc.
Deleting is easy, you just pass in (a few) primary key/keys to uniquely identify the record.
But in the real world when you have, say, a table with 100 fields! Do you code the INSERT sproc by hand,  with 100 parameters... then call it with your ADO.NET code ? sounds like a lot of work to me...
What about updating! That's even worst, sometimes you may need to update only 3 or 4 fields, but using sprocs you would have to pass the whole 100 parameters in again, and "update" the whole record (when in fact you are only changing 3 or 4 fields).
With the update i could write different sprocs targeting only the fields i wish to update, but that sounds like duplicating work, vs having one generic update proc.
Sometimes i just feel like bypassing sprocs and having inline sql as it would be less work... but i know it is untidy.. and more potential to be buggy.
So come on guys (and gals)... let's hear your thoughts on how you would handle the insert  / update scenarios when you have lots of fields ? Northwind examples are too trivial :-)
 

View 1 Replies View Related

Master Data Services :: Hard Delete All Soft Delete Records (members) In Database

May 19, 2012

I am using Master Data Service for couple of months now. I can load, update, merge and soft delete data in MDS. Occasionally we even have to hard delete data from MDS. If we keep on soft deleting records in a MDS table eventually there will be huge number of soft deleted records. Is there an easy way to hard delete all the soft deleted records from all MDS tables in a specific Model.

View 18 Replies View Related

Graphical Edit Interface For MSDE 2000 A Database

Jan 23, 2004

Greetings all,

Is theyr an Graphical edit interface for the MSDE 2000 A database ? Windows based would be best.

Tnx for the answer.

Greetz,
Stefan

View 3 Replies View Related

How To Delete User From A SQL Server 2000 Database In SQL Server 2005?

Feb 1, 2007

Hi,

I have a database created in server 2000, and now I have moved it to server 2005.

All works do fine, but there is a user which cannot be removed.

In the user properties window, the assigned schema is empty. The user is a db_owner of the database. When I was trying to update the user, it asked me for the login. The login is empty, but the field is disabled.

So my question is, how to remove this user?

Thank you.

Jensan

View 1 Replies View Related

Delete All Records From A Database

Aug 30, 2007

Is there a way to delete all records in a SQL Server 2005 database? A function or a script?

View 8 Replies View Related

Unable To Delete Duplicate Records In Database

Jul 20, 2005

Hi,I have an sql database that has the primary key set to three fields,but has not been set as unique(I didn't create the table).I have 1 record that has 2 duplicates and I am unable to delete theduplicate entries.If I try to delete any of the three records(they are identical) I getthe message 'key column is insufficient or incorrect. Too many rowswere affected by update'.I am trying to do this within Enterprise Mgr.Any suggestion?Thanks much

View 2 Replies View Related

Many To Many Relationship - What's Best Way To Add/edit/delete

Aug 3, 2006

I have a many to many relationship I can design the table 2 ways:1) Category table (cat_id, cat_name, active) - cat_id as PKCategoryReq (cat_id, req_name) - cat_id & req_name as PK2)CategoryReq (req_name, cat_name) - req_name & cat_name as PKIf
I design 1st way. Then when they want to add and delete from the
CategoryRequest table, they would have to add to the category table
first. Then maybe build a list of checkboxes to select from. The one's
they check insert into the CategoryRequest table.Drawback of
this is that they can't edit the list on the fly. Since it may be used
by other request (since cat_id CategoryReq is fk into Category table)If I design it the 2nd way. Then they can edit, delete, add on the fly. But there won't be a master category list.Which way is better?

View 1 Replies View Related

Cannot Delete Remote Server

Feb 9, 2006

Trying to delete remote server 'DVA'

- When I go to delete the 'DVA' from the list of remote servers I get
- Error 15190: There are still remote logins for the server 'DVA'

I execute the following statement to list remote logins

- execute sp_helpRemoteLogin

the output returns

SERVER | LOCAL | REMOTE | OPTIONS
T1 | Distributor_admin | distributor_admin | trusted
T1 | Distributor_admin | sa | trusted

Fair enough I go to delete those remote logins using

- execute sp_dropremotelogin 'DVA' ,'distributor_admin', 'distributor_admin'
- execute sp_dropremotelogin 'DVA' ,'distributor_admin', 'sa'

but.. get the following error messages

There is no remote user 'Distributor_admin' and 'sa' mapped to the local user 'distributor_admin' from the remote server 'DVA'

Don't understand why it is not finding those logins and how to resolve?

View 1 Replies View Related

Implementing Edit And Delete Operations Using Templatefields In GridView

Aug 9, 2007

Hi!
I want to customize the Edit And Delete Operations of a gridview using Image Button Controls.Please suggest me the way to implement that.

One more Problem I am facing is,Image button doesn't fire the RowCommand Event of GridView whereas when I use the Link button that event is firing.

Thanks

View 3 Replies View Related

Vista Business ODBC/DSN To Remote Windows 2000 Server / SQL 2000

Oct 8, 2007

Hi,
Just upgraded some development desktops to Vista Business. However we need
to still connect to some older remote windows 2000/SQL 2000 servers.

Trying to setup an ODBC system DSN on our Vista Business local desktop we get the
following errors -

-START ERROR WINDOW-
Connection Failed:
SQLState: '01000'
SQL Server Error: 772
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen
(SECDoClientHandshake()0.
Connection failed:
SQLState: '08001'
SQL Server Error: 18
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SSL Security Error
-END ERROR WINDOW-

Any help greatly appreciated as this is stopping us from making
database/table connections etc. We've checked the firewall setup and all is well there.

PS - we can still connect fine using XP or windows 2000 desktops and their
local DSNs.

View 8 Replies View Related

Remote Hosted Database - SQLServer 2000

Jul 20, 2005

Hi allWe have a small database that we host on our own local server. In order toget the information into the database I have a VB program that collates theinformation from a variety of sources and then over our local internalnetwork writes it to the database tables.This information is then made available over the internet using thecompanies broadband connection. In order to alleviate bandwidth issues weare looking at paying for someone else to host the database.What I am hoping to achieve is to keep the VB software, but during the nightupload the data to the remotely hosted SQL server using say a series ofupdate statements. Does anyone know if this is possible, and will SQL Serverlook after the integratory of the data. Is there any issues with therelatively low speed of then Internet as compared with a local networkenvironment. The amount of data we are looking at moving is very little,some where in the region of a few hundred records per night split over about10 tables.many thanksAndy

View 1 Replies View Related

Delete Records In SQL Server Via Access

Aug 17, 2006

Hi,

I have a question to ask. I'm new to SQL Server but have been trying to learn it. I have just installed the SQL Server 2000 SP4 and have a dummy Access database that need to be migrated to SQL Server 2000 for a test. I used the DTS wizard provided by the SQL Server 2000. It was successful - no error appears. I have also successfully done the link tables from Access to SQL Server. Now, my question is how do i add/edit/delete some records in SQL Server via Access. I need your help or guidance on this.

Thank you in advance

View 2 Replies View Related

Database Name Not Found In The Edit Job Step In SQL Server Enterprise Manager

May 1, 2006

Hi,I need help. I transferred my database from one server to another byusing attach detach process.I created all the jobs which existed in theold server in the new server. Everything looked fine but a couple ofjobs is a giving me some problems. When I try to edit the job step Icould see that the database dropdown list doesn't contain the databasename(which I transferred from the old server)Does anyone have any idea about it.ThanksArun

View 1 Replies View Related

SQL 2005: Unable To Edit Linked Table Records

Oct 27, 2006

Hi!I am able to add records to my SQL 2005 database using bound forms in myAccess application, but if I try to edit any records (not only the newrecords I create) using the same bound forms, I receive a write conflict.For the record, I am currently the only user of this application and my SQLServer database has only one userID. I used this userID to create all ofthe objects in the database and to connect to the database from Access. Thedata sources for the bound forms are linked tables, the record source typeis set to "Dynaset" and the record locks are set to "No Locks". "Opendatabases using record-level locking" is checked.The write error says that another user has changed the current record sinceit was opened (since I'm currently the only user this isn't possible) andasks me to copy my changes to the clipboard or drop the changes.Can anyone suggest what might be causing this? Thanks!

View 1 Replies View Related

Data Flow Task To Delete Records And Then Insert Records In Transaction

Aug 6, 2007

HI,

I have been trying to solve the locking problem from past couple of days. Please help mee!!

Scenario:
--------------
I have a SSIS package in which 2 data flow tasks. 1st data flow task deletes records from a 5 tables and the 2nd data flow task should insert records into 1 of the five tables after the success of 1st data flow task. This scenario runs in Transacation.

The above scenrio in the 2nd data flow task hangs in runtime. It does not complete. with sp_who2 command i could see that there is an intent share lock(LK_M_IS) on the table and the status is SUSPENDED.

I dont know how to come out of this locking. Please help.

Thanks ,
Sunil

View 7 Replies View Related

SQL Server 2008 :: Job To Delete All Records Then Copy All From Another Table?

Apr 22, 2015

I am using a SQL Server Agent jobs that run each morning to update the records in a table to match what they should be for that day. I built them and tested it using a test table called "testtable1". It worked fine. But when I switched over to our production table, it fails saying the table has to be decaled. What would be the difference. The production table has a "@" in front of the name, is that causing issues?

USE [Live_build]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
BEGIN
DELETE
FROM @ZIPLIST
INSERT INTO @ZIPLIST
SELECT * FROM tblZip3DSWed;
END

View 4 Replies View Related

SQL Server 2012 :: Keep Only Top 50 Records For Every User And Delete Remaining

Aug 4, 2015

I have a table 'library' with two columns

user_name, access_time

every user is having more than 500 entries, i want to keep only top 50 records for every user and delete the remaining records.

View 9 Replies View Related

SQL Server 2012 :: Delete Large Number Of Records?

Sep 8, 2015

I have the following scenario:

SQL database on SQL 2012

Large Production table 15 Million record

The table has 3 years of data

New monthly data is being added every month.

A New Monthly data is being loaded, checked and finally approved after 6 or 7 iteration before approval.Because of this iteration the monthly data set is being added then deleted then added then deleted few times.Because the table is big this process takes time, any thoughts on how to make the delete insert process faster.Keep in mind I cannot do much because it is a production table and is being access by other users to do other analysis.

Delete is done based on trx_date which is a year/month combo, like 201508.

The table has monthly sales by customer aggregated.

The table structure is:

CREATE TABLE [dbo].[Sales](
[batch_key] [int] NOT NULL,
[Company_key] [int] NOT NULL,
[customer_key] [char](22) NOT NULL,
[Trx_Date] [int] NOT NULL,
[account] [nvarchar](35) NOT NULL,

[code].....

View 9 Replies View Related

SQL Server 2012 :: Randomly Delete Records Based On Some Condition

Mar 19, 2014

create table #sample
(
Name varchar(100),
value int

[code]....

From that I wanted to delete some records based on following condition. randomly select any number of records but sum(value) = 125 and name = xxx

View 2 Replies View Related

SQL Server 2012 :: Delete Unmatching Records In Child Table

Feb 24, 2015

I've 2 tables ResumeSkill (Child table) and Skill (Parent table), There are duplicates in the parent table and after removing the foreign key constraint in child table deleted all duplicate values from Parent table. But those deleted duplicate values has references in child table which need to be deleted now.

ResumeSkill Skill

Id SkillId
SkillId Name

I want to delete all the records from ResumeSkill that dont have matching skillId in Skill table.

View 2 Replies View Related

SQL Server 2008 :: Archive And Delete Old Records In Table With No Date Column

Feb 4, 2015

I have these two tables Log and CategoryLog, I need to archive records older than 13 months in these two tables to two separate tables and then delete the archived records from Log and CategoryLog tables. The problem is that only 'Log' table has a date column, the other table CategoryLog does not have any date column. But the two tables are connected by a column(LogID). How to archive the data and then delete the archive data from both tables.

View 9 Replies View Related

SQL Server 2008 :: Making Use Of A Large Transaction File To Delete Records?

Jun 5, 2015

Currently we has a database of size about 300G. Because our backup system failed some time past we were left with a transaction log file which grew to about 160G. However our backups are working again and everything is working fine. My understanding is that now the transaction log file is practically empty but the capacity remains at 160G.

When you delete records the deleted transactions are going to get logged to the transaction file. My understanding is when a backup is done these transactions get discarded out of the transaction file.

could I make use of this relatively large transaction file and start deleting transactions without out actually adding to the transaction file size.

The plan is to delete records from logging tables that are not referenced to by any other table without this increasing the transaction log file.For example over a period of a few weeks we can delete a chunk of records from a table. Then after it has completed a backup we can delete another chunk of records out of this table until we have got the table down to the records that we now need.Will this work?

View 2 Replies View Related

Delete Row From MS SQL Server 2000

Jul 1, 2007

Hi, I'm using SQL Server 2000 Personal Edition. I have created a table 'Student' which has 2 fields.

ID -- Varchar(10), Primary Key - contains ID of a student

NAME -- Varchar(50) -- contains names of student



ID NAME

------------------ ------------------------------------------

0107200701 abcd

0107200702 cdgdh

0107200703 iyiylklk

.

.



I want to delete a complete row (all entries) from the "student" table using/specifing 'ID'. What will be the SQL query for that?

View 1 Replies View Related

Remote Management Of Sql Server 2000

Apr 16, 2001

One of my clients is upgrading to Sql 2000. I currently administer her server using a SQL 7 interface but I will need to upgrade that interface to sql 8 now to be able to give her the same level of support. How do I go about installing the required clients on my desktop in such a way as to not interfere with my own installation of MSDE?

I use Windows NT workstation 4. If I have a choice do I install developer's edition of SQL2000 or personal edition?

We also have pcanywhere access but this is too slow and unsure for my money.

Thank you,
Bo Graham

View 1 Replies View Related

MS SQL Server 2000 Installation For Remote

Apr 7, 2008

I installed MS Sql server 2000 having Typical type setup.
I choosed Local system account in service setting & mixed mode authentication mode. I choose default Tcp/Ip port 1433 which is free.
After successful installtion i tried
telnet localhost 1433
But gaves the error :
"Could not open connection to host on port 1433" Connection failed.
So should i do for remote or telnet connection.
Please help me!

View 1 Replies View Related

SQL 2000 Remote Server Problem

Mar 26, 2008

i 've tried to run this part of query it gives a problem like : unauthorised trasaction in Databasename errors

At Server1
Use
DatabaseName1

BEGIN TRAN
INSERT into Server2.Database2.dbo.TableName2
SELECT * FROM Server1.Database1.dbo.TableName1
END

can anybody help me ?

View 2 Replies View Related

SQL SERVER 2000 Delete Problem

Mar 24, 2006

Hi All! Im new here and Im not pretty sure if this thread really belongs here. I just want to ask why I kept on having errors in deleting a record in Enterprise Manager.

Everytime I delete a record / row in a table it prompts me of Invalid Object Name. I guess its because of my table name "my.table" because it has a "." (dot). Does MS SQL not enclosed my table name by brackets "[]" to ensure success of action?

Anyway, It was just a dummy table that's why my table name has a "." and Im pretty sure that this naming convention is a NO - NO but nonetheless, I think MSSQL should still be able to process my delete query regardless of the name of my table (Since in the first place it didnt warn me upon creating the table that the name is invalid)

Hope you can enlighten me.

thanks!

View 1 Replies View Related

Issue Connecting To A Remote SQL Server 2000

Mar 11, 2007

I get the following error message in quotes. I have a web application written in ASP.NET 2.0 through which I am trying to connect to a remote SQL Server 2000. My operating system is Windows Vista .
I looked at many different sites to find a solution for this but without any luck. I am sure someone would have seen this issue here and I expect them to shed some light. 
An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server).
The connection string is located in my web.config file which looks like
 <add name="AMSConn" connectionString="Data Source=xxxx;Initial Catalog=testdb;User ID=sa;Password=xxxx" providerName="System.Data.SqlClient" />
I want to get this issue resolved and I need you guys help.
Please let me know if you need any more information.
Thanks
Bharat 
 

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved