Showing posts with label update. Show all posts
Showing posts with label update. Show all posts

Wednesday, March 28, 2012

how to connect with sqlexpress2005 & asp.net for update insert delete codings

I want to know about the how to connect with asp.net 2005 and sqlexpress through codings using parameters

import System.Data.SqlClient;

related update delete insert codings ...

How to know about the make the new connection with different databases sqlserver, oracle mysql...

Hi

Have you had a lookhttp://quickstarts.asp.net/QuickStartv20/default.aspx andhttp://www.asp.net/learn/data-access/.

Work through these samples.. They explain how to access databases using declarative coding (sqldatasource and the likes) and coe behind coding.

Hope that helps.

VJ

Monday, March 12, 2012

How to Config Virtual Directory for HTTP Access to Achieve XML Template Query in SQL Server2005?

Hi,

I have built a system with xml template query using SQL Server2000.

Now ,I want to update it with SQL Server2005.

The problem is how to config the virtual directory?

In SQL 2005 the SQLXML ISAPI virtual directories are no longer being shipped. Instead we have things like SOAP endpoints and ASP.Net that can provide you HTTP access to your data. If these do not work for you, your SQL 2000 virtual directories should work against SQL 2005, and in addition SQLXML 3 SP3 is available as a Web Release and works against SQL 2005:

http://www.microsoft.com/downloads/details.aspx?FamilyID=51d4a154-8e23-47d2-a033-764259cfb53b&DisplayLang=en

Wednesday, March 7, 2012

How to compare Binary and Int colns

I need to compare and update a Binary(8) coln with values from an
Int(4) coln. Could someone please explain how to do this..??

thanks
Sunitsjoshi (sjoshi@.ingr.com) writes:
> I need to compare and update a Binary(8) coln with values from an
> Int(4) coln. Could someone please explain how to do this..??

No, because I don't know how you want to compare four bytes with eight.

The standard recommendation is to include:

o CREATE TABLE statemens for your table(s)
o INSERT statements with sample data.
o The desired result given the sample data.

That permits people who tackle your problem to post a tested solution.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||CREATE TABLE [dbo].[COREBaseClass] (
[oid] [uniqueidentifier] NOT NULL ,
[ConditionID] [int] NOT NULL ,
[persistentFlag] [int] NOT NULL ,
[UIDCreator] [uniqueidentifier] NOT NULL ,
[UIDLastModifier] [uniqueidentifier] NOT NULL ,
[DateCreated] [smalldatetime] NOT NULL ,
[DateLastModified] [smalldatetime] NOT NULL ,
[ApprovalStatus] [int] NOT NULL ,
[ApprovalReason] [int] NOT NULL ,
[tsRelations] [int] NOT NULL ,
[ts] [int] NOT NULL
)
CREATE TABLE [dbo].[COREProxy] (
[oid] [uniqueidentifier] NOT NULL ,
[dwProperties] [int] NOT NULL ,
[sourceTimeStamp] [binary] (8) NOT NULL ,
[COREPersistentFlags] [int] NOT NULL ,
[ts] [int] NOT NULL ,
[tsRelations] [int] NOT NULL
)
These are the 2 tables and I need to update COREProxy.sourceTimeStamp
with the value of COREBaseClass.ts wherever they are not the same.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||Sunit Joshi (sjoshi@.ingr.com) writes:
> CREATE TABLE [dbo].[COREBaseClass] (
> [oid] [uniqueidentifier] NOT NULL ,
> [ConditionID] [int] NOT NULL ,
> [persistentFlag] [int] NOT NULL ,
> [UIDCreator] [uniqueidentifier] NOT NULL ,
> [UIDLastModifier] [uniqueidentifier] NOT NULL ,
> [DateCreated] [smalldatetime] NOT NULL ,
> [DateLastModified] [smalldatetime] NOT NULL ,
> [ApprovalStatus] [int] NOT NULL ,
> [ApprovalReason] [int] NOT NULL ,
> [tsRelations] [int] NOT NULL ,
> [ts] [int] NOT NULL
> )
> CREATE TABLE [dbo].[COREProxy] (
> [oid] [uniqueidentifier] NOT NULL ,
> [dwProperties] [int] NOT NULL ,
> [sourceTimeStamp] [binary] (8) NOT NULL ,
> [COREPersistentFlags] [int] NOT NULL ,
> [ts] [int] NOT NULL ,
> [tsRelations] [int] NOT NULL
> )
> These are the 2 tables and I need to update COREProxy.sourceTimeStamp
> with the value of COREBaseClass.ts wherever they are not the same.

But how? If ts is 4711, what do you want in sourceTimeStamp?

0x126700000000000, 0x0000126700000000 or 0x000000000001267?

If the number is 47114711, do you want:

0xE9D702CE00000000, 0x02CEE9D700000000 or 0x0000000002CEE9D7?

In my previous post, I said:

> The standard recommendation is to include:
> o CREATE TABLE statemens for your table(s)
> o INSERT statements with sample data.
> o The desired result given the sample data.
> That permits people who tackle your problem to post a tested solution.

I did not say this only for fun. If you cannot give a good specification
to the problem you have, you will either get no solution at all or

You can say things like:

convert(binary(8), ts) or convert(int, sourceTimeStamp)

But whether this gives you the values you are looking for, I can't
say, because I don't know what you are looking for.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||I would need 0x126700000000000 as below:

thanks
Sunit
---------------
But how? If ts is 4711, what do you want in sourceTimeStamp?

0x126700000000000, 0x0000126700000000 or 0x000000000001267?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||Sunit Joshi (sjoshi@.ingr.com) writes:
> I would need 0x126700000000000 as below:

And what about 47114711?

0xE9D702CE00000000, 0x02CEE9D700000000 or 0x0000000002CEE9D7?

And why do you refuse to post:

> The standard recommendation is to include:
> o INSERT statements with sample data.
> o The desired result given the sample data.

If you are not prepared to put any effort into your problem, why do
you expect someone else to do it?

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

How to commit the rest of the transactions of an update in large bulk?

I have to modify the table structure where the table have a lot of data already. The log is getting full due to uncommitted transactions, there is a lot of data being updated in large bulks, not all of the transactions are committed, the update task cannot be completed.
However, there is no more spare disk space for it to commit the transaction. Anyone can help?what exactly are you dong? bulk insert?|||change some field 's size and its predefined function where the table have about 50,000 data already.