.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Insert/Update OLE Attachment(Binary datatype) using SQL server 2000

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :ASP.Net
Hi All, In the same senario how we can Insert/Update OLE Attachment(Binary datatype)  from one source table to other destination table by using SQL Server 2000 not with C# fronend code. Appreciated if you can give fix on this regads, Divakar.

View Complete Post

More Related Resource Links

Inserting a Binary file in SQL Server 2000

Hi all, I want to store a native binary file into the DB having the column datatype as 'image', in SQL Server 2000, through SQL Query. I have found the solution for the case of 2005, thet is using the OPENROWSET and BULK. Can you please help me out in constructing the SQL or TSQL Query for performing that operation? Thanks a Bunch in Advance :)

Insertion of a Binary File in SQL Server 2000

Hi all, I want to insert a binary file into the SQL Server 2000. The type of the column reserved for the file is of 'image' datatype. I have found the solution for the SQL Server 2005 and later, using the open rowset. Can you please give me a SQL/T-SQL Query for the operation? Thanks a bunch in advance :)

Sql server 2000 Update Query with join


I have 3 tables . I will give the structure.

1) TblAgency   

PCC     SCCode  AgencyName

2) SegmentCalculation

PCC  StatusDate  Segment   YTD

  3) TblStandard                // for get abt this table. this is i am only for taking the  StartDate . Once i will get the Start Month   and Year to InPut Month and Year , we are going to calculate the sum of Segment  from Segmet Tabl

SCC   startDate EndDate  

the above is my 3 table structure

Now i want a query for update  second table 

SegmentCalculation.YTD =( 
SELECT     sum(Segment) as Total       
FROM    SegmentCalculation P
        inner JOIN TblAgency A ON P.PCC = A.PCC
   left JOIN TblStandard T ON A.groupcode = T.SCCode            &n

To Update a Binary datatype column using a query from MSAccess:



I have MSAccess as front-end application and SQL Server as the database. I need to update a column of varbinary datatype using the MSAccess application.

The below is the code snippet i work on:


If StrComp(Nz(rsDst!destination_column, ""), Nz(rsSrc!source_column, ""), vbBinaryCompare) <> 0 Then
      strSQL = "UPDATE tablename SET " & _
                   "destination_column = '" & Nz(rsSrc!source_column, "") & "'" & _
                   "WHERE case_party.file_id= " & rsSrc!file_id & " " & _
      DoCmd.SetWarnings True
      DoCmd.RunSQL strSQL
      DoCmd.SetWarnings True
End If     


I am getting an error with the above code. The error mentioned is synta

SqlCommand.ExecuteNonQuery() returns -1 when doing Insert / Update / Delete

Sometimes you end up with a return value of -1 when using the SqlClient.SqlCommand.ExecuteNonQuery method.

Why is that?

Well, the ExecuteNonQuery method is there for statements for changing data, ie. DELETE / UPDATE /INSERT, and the returned value are the number of rows affected by that statement.

When checking the documentation we can see that there are some conditions that return -1.

For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command.

When a trigger exists on a table being inserted or updated, the return value includes the number of rows affected by both the insert or update operation and the number of

rows affected by the trigger or triggers. For all other types of statements, the return value is -1. If a rollback occurs, the return value is also -1.

sql server 2000 vs 2005


i would like to ask what the difference between sql server 2000 and 2005 

update/delete not working on server only


my aspx page works in VWD, and everything works on the server EXCEPT update and delete sql functions. any ideas?


Data Points: XML Features in SQL Server 2000


SQL ServerT 2000 includes several XML features that let you transform relational rowsets into hierarchical XML documents, read XML documents, and bulk load data via XML. For example, you can pass an XML document to a stored procedure, join the XML to some tables and return a rowset, or even modify data in the database.

John Papa

MSDN Magazine June 2005

ClickOnce: Deploy and Update Your Smart Client Projects Using a Central Server


ClickOnce is a new deployment technology that allows users to download and execute Windows-based client applications over the Web, a network share, or from a local disk. Users get the rich interactive and stateful experience of Windows Forms, but still have the ease of deployment and updates available to Web applications. ClickOnce applications can be run offline and support a variety of automatic and manual update scenarios.Learn all about it here.

Brian Noyes

MSDN Magazine May 2004

OLAP: Build an OLAP Reporting App in ASP.NET Using SQL Server 2000 Analysis Services and Office XP


Many organizations analyze their business-critical data using Online Analytical Processing (OLAP) technology. OLAP-based data mining provides a way to query multidimensional data sets and drill down into the data to find patterns. ASP.NET and the Microsoft Office Web Components (OWC) enable Web-based OLAP reporting. The OWC controls include PivotTable and Chart components that can be embedded in a Web page and scripted by programmers. In this article, the authors build a Web-based OLAP reporting app using ASP.NET, OWC, and SQL Server 2000 Analysis Services to illustrate the process.

Jeffrey Hasan and Kenneth Tu

MSDN Magazine October 2003

Metadata: Create a Database Schema Repository with Meta Data Services in SQL Server 2000


SQL Server 2000 Meta Data Services is a repository technology that stores and manages metadata for SQL Server. Instead of building database schemas over and over, Meta Data Services allows you to freeze an entire schema for use in other projects. You can also use these schemas for training, testing, or debugging. In this article, the authors will review the various components of Meta Data Services and show how it can be programmed using a Visual Basic client, XML, and XSLT. They will also show you how to manage and manipulate your metadata by generating a simple database schema using a SQL Server repository.

Alok Mehta and Ricardo Rodriguez

MSDN Magazine May 2003

Scripting SQL: VBScript Interfaces in SQL Server 2000 Let You Transform Data and Provide Reports to


Application service providers often must send information to clients automatically rather than on-demand. For example, a manufacturer may want to know each day how many of their products were sold by a retail chain. While SQL Server is ideal for maintaining this type of database, you have to write scripts to get the data out in a client-friendly format. Here you will see how you can use Data Transformation Services (DTS), a powerful tool in SQL Server, to automate the retrieval and formatting of data from SQL Server 2000 and make the process of pushing data to your users a lot easier.

Alok Mehta and Daniel Williams

MSDN Magazine August 2002

SQLXML 3.0: Build Data-Driven Web Services with Updated XML Support for SQL Server 2000


XML is becoming the ubiquitous data format on the Web, and XML support in SQL Server is evolving to meet the additional demand. Using XML, SOAP, HTTP, and SQL Server, you can now build powerful Web Services easily. To show just how simple it is with SQLXML 3.0, this article walks the reader through the process step by step, from setting up a virtual directory enabling data access via HTTP to executing queries and building Web Services. Finally, the author illustrates the creation of two Web Services clients-one with C# that works with the Microsoft .NET Framework and one with the SOAP Toolkit 2.0 for anyone still using earlier development tools.

Christian Thilmany

MSDN Magazine May 2002

SQL Server 2000 and XML: Developing XML-Enabled Data Solutions for the Web


Using XML for data access allows you to separate the data from the presentation, and promotes reuse, extensibility, and division of labor. XML also has a simplified data model, which promotes easier testing. This article presents and compares five data access approaches, using a variety of technologies including ASP and ADO, XSLT, and DirectXML. Once built, the solutions are compared on the basis of their speed and efficiency.

Scott Howlett and Darryl Jennings

MSDN Magazine January 2002

BizTalk and XML: Add E-Commerce to Your App with XML and SQL Server 2000


XML support in SQL Server lives up to the hype that's always surrounded XML. Using SQL Server 2000, you can send queries over HTTP, save XML records to the database, and retrieve records via XML. This article shows how you can take advantage of these features in SQL Server 2000 by building a database entry system that keeps track of sales and customer information. The sample app presented here uses updategrams to make the database updates. To accomplish this, the mapping and usage of updategrams is explained. In this example, BizTalk is used to illustrate the XML capabilities of SQL Server 2000.

Christian Thilmany

MSDN Magazine January 2002

SQL Server CE: New Version Lets You Store and Update Data on Handheld Devices


Handheld device users need to be able to synchronize with a main data store when it's convenient and, preferably, when the back-end database server isn't busy. SQL Server 2000 Windows CE Edition allows you to build a traveling data store that can be displayed and run on a variety of devices. SQL Server CE supports a subset of the full SQL Server package, and can be used as a standalone server or in tandem with SWL Server and IIS. The architecture of SQL Server CE, along with data manipulation, synchronization, and connectivity issues, are discussed in this article. Topics such as making your data public, choosing the right type of replication, and handling errors are also covered.

Paul Yao and David Durant

MSDN Magazine June 2001

Server Farms: Application Center 2000 Offers World-Class Scalability


Application Center 2000 simplifies the deployment of a Microsoft .NET-based application to clusters, which are shared-nothing, loosely coupled computers that appear as one virtual computer. This allows all the computers in Application Center 2000 clusters to provide the same service or Web application at the same time. This article explains network load balancing and component load balancing for COM+ components with Application Center 2000. Accessing the features of Application Center 2000 though the MMC snap-in interface and the command-line interface for batching administrative tasks is also covered.

Panos Kougiouris

MSDN Magazine May 2001

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend