Update stored procedure question

We are using VS 2008 and SQL Server 2005.
I have a table Spread that has 1 Integer column called SecurityID.

I have a stored procedure spUpdateSpread that increment the SecurityID by 1, 
and returns that value.
If more than 1 process call the stored procedure at the same time, will it 
return the correct SecurityID ?

Thank you

CREATE TABLE [dbo].[Spread](
 SecurityID [int] NOT NULL,
PRIMARY KEY NONCLUSTERED
(
 [SecurityID] ASC
)
) ON [PRIMARY]


CREATE PROCEDURE [dbo].[spUpdateSpread]
@SecurityID int output
as
update Spread set SecurityID = SecurityID + 1
select @SecurityID = SecurityID from spread


0
fniles
6/16/2010 6:12:45 PM
sqlserver.programming 1873 articles. 0 followers. Follow

9 Replies
663 Views

Similar Articles

[PageSpeed] 9

fniles wrote:
> We are using VS 2008 and SQL Server 2005.
> I have a table Spread that has 1 Integer column called SecurityID.
>
> I have a stored procedure spUpdateSpread that increment the
> SecurityID by 1, and returns that value.
> If more than 1 process call the stored procedure at the same time,
> will it return the correct SecurityID ?

Not if you do it like this:

 update Spread set @SecurityID = SecurityID + 1,SecurityID = @SecurityID

-- 
HTH,
Bob Barrows


0
Bob
6/16/2010 6:33:21 PM
fniles (fniles@pfmail.com) writes:
> We are using VS 2008 and SQL Server 2005.
> I have a table Spread that has 1 Integer column called SecurityID.
> 
> I have a stored procedure spUpdateSpread that increment the SecurityID
> by 1, and returns that value. 
> If more than 1 process call the stored procedure at the same time, will it 
> return the correct SecurityID ?
>... 
> CREATE PROCEDURE [dbo].[spUpdateSpread]
> @SecurityID int output
> as
> update Spread set SecurityID = SecurityID + 1
> select @SecurityID = SecurityID from spread
 
This is not safe, you would need to wrap it in a transaction:

BEGIN TRANSACTION 
 update Spread set SecurityID = SecurityID + 1
 select @SecurityID = SecurityID from spread
COMMIT TRANSACTION

I've also seen it suggested that you can do:

 update Spread set @SecurityID = SecurityID = SecurityID + 1

But this syntax is obscure in my eyes, and to me it seems to be
implementation-dependent.

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

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

0
Erland
6/16/2010 10:03:21 PM
Thank you, everybody.

I also have another table HistTradesOrig that has an identity column ID.
When adding a record to it in the stored procedure 
INSERT_INTO_HistTradesOrig, I want to return the value of ID that was just 
added, and also set the ORDER column to be @ACCOUNT + '-' + 
convert(varchar(50),@ID).
I got the value of ID by "select @ID = SCOPE_IDENTITY()" as shown below.
If more than 1 process call the stored procedure at the same time, will it 
return the correct ID ?

Thanks

CREATE PROCEDURE INSERT_INTO_HistTradesOrig
@ID int output,
@Order varchar(50) = NULL,
@ACCOUNT varchar(10)  = NULL
AS
insert into HistTradesOrig
([Order])
values
(@Order)

select @ID = SCOPE_IDENTITY()
UPDATE HistTradesOrig
SET [Order] = @ACCOUNT + '-' + convert(varchar(50),@ID)
WHERE ID = @ID
GO

 CREATE TABLE HistTradesOrig (
        ID                   int IDENTITY(1,1),
        [order]                varchar(50) NOT NULL,
        Account              varchar(10) NULL
 )
go

 ALTER TABLE HistTradesOrig
        ADD PRIMARY KEY ([order])


"Erland Sommarskog" <esquel@sommarskog.se> wrote in message 
news:Xns9D9A91D9E41Yazorman@127.0.0.1...
> fniles (fniles@pfmail.com) writes:
>> We are using VS 2008 and SQL Server 2005.
>> I have a table Spread that has 1 Integer column called SecurityID.
>>
>> I have a stored procedure spUpdateSpread that increment the SecurityID
>> by 1, and returns that value.
>> If more than 1 process call the stored procedure at the same time, will 
>> it
>> return the correct SecurityID ?
>>...
>> CREATE PROCEDURE [dbo].[spUpdateSpread]
>> @SecurityID int output
>> as
>> update Spread set SecurityID = SecurityID + 1
>> select @SecurityID = SecurityID from spread
>
> This is not safe, you would need to wrap it in a transaction:
>
> BEGIN TRANSACTION
> update Spread set SecurityID = SecurityID + 1
> select @SecurityID = SecurityID from spread
> COMMIT TRANSACTION
>
> I've also seen it suggested that you can do:
>
> update Spread set @SecurityID = SecurityID = SecurityID + 1
>
> But this syntax is obscure in my eyes, and to me it seems to be
> implementation-dependent.
>
> -- 
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>
> Links for SQL Server Books Online:
> SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
> SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
> SQL 2000: 
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
> 


0
fniles
6/17/2010 2:24:22 AM
On Jun 17, 7:24=A0am, "fniles" <fni...@pfmail.com> wrote:
> Thank you, everybody.
>
> I also have another table HistTradesOrig that has an identity column ID.
> When adding a record to it in the stored procedure
> INSERT_INTO_HistTradesOrig, I want to return the value of ID that was jus=
t
> added, and also set the ORDER column to be @ACCOUNT + '-' +
> convert(varchar(50),@ID).
> I got the value of ID by "select @ID =3D SCOPE_IDENTITY()" as shown below=
..
> If more than 1 process call the stored procedure at the same time, will i=
t
> return the correct ID ?
>
> Thanks
>
> CREATE PROCEDURE INSERT_INTO_HistTradesOrig
> @ID int output,
> @Order varchar(50) =3D NULL,
> @ACCOUNT varchar(10) =A0=3D NULL
> AS
> insert into HistTradesOrig
> ([Order])
> values
> (@Order)
>
> select @ID =3D SCOPE_IDENTITY()
> UPDATE HistTradesOrig
> SET [Order] =3D @ACCOUNT + '-' + convert(varchar(50),@ID)
> WHERE ID =3D @ID
> GO
>
> =A0CREATE TABLE HistTradesOrig (
> =A0 =A0 =A0 =A0 ID =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 int IDENTITY(1,1),
> =A0 =A0 =A0 =A0 [order] =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0varchar(50) NOT NU=
LL,
> =A0 =A0 =A0 =A0 Account =A0 =A0 =A0 =A0 =A0 =A0 =A0varchar(10) NULL
> =A0)
> go
>
> =A0ALTER TABLE HistTradesOrig
> =A0 =A0 =A0 =A0 ADD PRIMARY KEY ([order])
>
> "Erland Sommarskog" <esq...@sommarskog.se> wrote in message
>
> news:Xns9D9A91D9E41Yazorman@127.0.0.1...
>
> > fniles (fni...@pfmail.com) writes:
> >> We are using VS 2008 and SQL Server 2005.
> >> I have a table Spread that has 1 Integer column called SecurityID.
>
> >> I have a stored procedure spUpdateSpread that increment the SecurityID
> >> by 1, and returns that value.
> >> If more than 1 process call the stored procedure at the same time, wil=
l
> >> it
> >> return the correct SecurityID ?
> >>...
> >> CREATE PROCEDURE [dbo].[spUpdateSpread]
> >> @SecurityID int output
> >> as
> >> update Spread set SecurityID =3D SecurityID + 1
> >> select @SecurityID =3D SecurityID from spread
>
> > This is not safe, you would need to wrap it in a transaction:
>
> > BEGIN TRANSACTION
> > update Spread set SecurityID =3D SecurityID + 1
> > select @SecurityID =3D SecurityID from spread
> > COMMIT TRANSACTION
>
> > I've also seen it suggested that you can do:
>
> > update Spread set @SecurityID =3D SecurityID =3D SecurityID + 1
>
> > But this syntax is obscure in my eyes, and to me it seems to be
> > implementation-dependent.
>
> > --
> > Erland Sommarskog, SQL Server MVP, esq...@sommarskog.se
>
> > Links for SQL Server Books Online:
> > SQL 2008:http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
> > SQL 2005:http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
> > SQL 2000:
> >http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

Yes
Scope Identity will give value for that session. so for every call of
SP it will give value related to that call

Amish Shah
http://shahamishm.blogspot.com
0
amish
6/17/2010 11:56:28 AM
In article <Xns9D9A91D9E41Yazorman@127.0.0.1>, Erland Sommarskog
<esquel@sommarskog.se> wrote:

> fniles (fniles@pfmail.com) writes:
> > We are using VS 2008 and SQL Server 2005.
> > I have a table Spread that has 1 Integer column called SecurityID.
> > 
> > I have a stored procedure spUpdateSpread that increment the SecurityID
> > by 1, and returns that value. 
> > If more than 1 process call the stored procedure at the same time, will it 
> > return the correct SecurityID ?
> >... 
> > CREATE PROCEDURE [dbo].[spUpdateSpread]
> > @SecurityID int output
> > as
> > update Spread set SecurityID = SecurityID + 1
> > select @SecurityID = SecurityID from spread
>  
> This is not safe, you would need to wrap it in a transaction:
> 
> BEGIN TRANSACTION 
>  update Spread set SecurityID = SecurityID + 1
>  select @SecurityID = SecurityID from spread
> COMMIT TRANSACTION
> 
> I've also seen it suggested that you can do:
> 
>  update Spread set @SecurityID = SecurityID = SecurityID + 1
> 
> But this syntax is obscure in my eyes, and to me it seems to be
> implementation-dependent.

Instead of either of the above, I'd suggest using OUTPUT  - a bit more
typing, but straightforward.

DECLARE @Output TABLE (securityID int);

UPDATE SPREAD
SET SecurityID = SecurityID + 1
OUPUT INSERTED.SecurityID INTO @Output

select SecurityID from @Output

-- 
J.B. Moreno
0
J
6/17/2010 4:23:21 PM
Thank you.

With OUTPUT codes that you supplied, if more than 1 process call the stored 
procedure at the same time,  it will return the correct SecurityID, correct 
?

"J.B. Moreno" <planB@newsreaders.com> wrote in message 
news:170620100823218963%planB@newsreaders.com...
> In article <Xns9D9A91D9E41Yazorman@127.0.0.1>, Erland Sommarskog
> <esquel@sommarskog.se> wrote:
>
>> fniles (fniles@pfmail.com) writes:
>> > We are using VS 2008 and SQL Server 2005.
>> > I have a table Spread that has 1 Integer column called SecurityID.
>> >
>> > I have a stored procedure spUpdateSpread that increment the SecurityID
>> > by 1, and returns that value.
>> > If more than 1 process call the stored procedure at the same time, will 
>> > it
>> > return the correct SecurityID ?
>> >...
>> > CREATE PROCEDURE [dbo].[spUpdateSpread]
>> > @SecurityID int output
>> > as
>> > update Spread set SecurityID = SecurityID + 1
>> > select @SecurityID = SecurityID from spread
>>
>> This is not safe, you would need to wrap it in a transaction:
>>
>> BEGIN TRANSACTION
>>  update Spread set SecurityID = SecurityID + 1
>>  select @SecurityID = SecurityID from spread
>> COMMIT TRANSACTION
>>
>> I've also seen it suggested that you can do:
>>
>>  update Spread set @SecurityID = SecurityID = SecurityID + 1
>>
>> But this syntax is obscure in my eyes, and to me it seems to be
>> implementation-dependent.
>
> Instead of either of the above, I'd suggest using OUTPUT  - a bit more
> typing, but straightforward.
>
> DECLARE @Output TABLE (securityID int);
>
> UPDATE SPREAD
> SET SecurityID = SecurityID + 1
> OUPUT INSERTED.SecurityID INTO @Output
>
> select SecurityID from @Output
>
> -- 
> J.B. Moreno 


0
fniles
6/17/2010 8:34:08 PM
fniles (fniles@pfmail.com) writes:
> With OUTPUT codes that you supplied, if more than 1 process call the
> stored procedure at the same time,  it will return the correct
> SecurityID, correct 
> ?

Yes, the method suggested by John should be safe, although personally
I find it a little clumsy, with the addition of an extra table.

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

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

0
Erland
6/17/2010 9:42:28 PM
fniles (fniles@pfmail.com) writes:
> I also have another table HistTradesOrig that has an identity column ID.
> When adding a record to it in the stored procedure 
> INSERT_INTO_HistTradesOrig, I want to return the value of ID that was just 
> added, and also set the ORDER column to be @ACCOUNT + '-' + 
> convert(varchar(50),@ID).
> I got the value of ID by "select @ID = SCOPE_IDENTITY()" as shown below.
> If more than 1 process call the stored procedure at the same time, will it 
> return the correct ID ?

Yes, scope_identity is guaranteed to return a value which no other
process gets.

However, beware that you may not get contiguous values. That is, if
one insert yields 18 as the id, but the transaction later fails, 
18 will still be consumed and never be reused.



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

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

0
Erland
6/17/2010 9:44:44 PM
Erland Sommarskog <esquel@sommarskog.se> wrote:

> fniles (fniles@pfmail.com) writes:
> > With OUTPUT codes that you supplied, if more than 1 process call the
> > stored procedure at the same time,  it will return the correct
> > SecurityID, correct 
> > ?
> 
> Yes, the method suggested by John should be safe, although personally
> I find it a little clumsy, with the addition of an extra table.

I find the extra table a bit clumsy too, but OUPUT requires a table...

But it's simple and easy to understand.

-- 
J.B. Moreno
0
J
6/18/2010 6:59:29 AM
Reply:

Similar Artilces:

Exchange 2003 Question #3
Dear all, I have upgraded from Exchange 5.5 and notice that I miss the feature where I can clean/delete mail based on certain criteria from users mailbox via the System Manager. Is this feature still available in Exchange 2003, If so, where is it? Thanks. Regards, Kueh. You can use ExMerge to remove emails based on certain criteria (ie. attachment name, subject, etc). http://www.msexchange.org/tutorials/MF013.html "KA Kueh" wrote: > Dear all, > > I have upgraded from Exchange 5.5 and notice that I miss the feature where I > can clean/delete mail based on ...

Question On Fields
What is the (Microsoft desciption)difference between the SIC field and the Industry Code field? To me they seem like a duplication. Thanks! Shauna Hi, According to the Deployment Manager descriptions of attributes: SIC - Standard Industrial Classification code for the Account industrycode - the type of industry with which the account is associated... Hope this helps! "Shauna Koppang" <anonymous@discussions.microsoft.com> wrote in message news:034101c48af4$62524a70$a401280a@phx.gbl... > What is the (Microsoft desciption)difference between the > SIC field and the...

newbie question
Excel help says it should be a tab under tools, but I can't see it in my version. I would appreciate any help. Thanks. You must first load the Solver Add-in through Tools>Add-ins. Gord Dibben MS Excel MVP On Sat, 03 Nov 2007 07:46:34 -0700, analyst41@hotmail.com wrote: >Excel help says it should be a tab under tools, but I can't see it in >my version. > >I would appreciate any help. > >Thanks. On Nov 3, 10:56 am, Gord Dibben <gorddibbATshawDOTca> wrote: > You must first load the Solver Add-in through Tools>Add-ins. > > Gord Dibben MS E...

Baseball Stats question: How can I get the RBI's?
I have a data table that looks like this: Code ------------------- STR-S SNK-S STR-K STR-F SNK-S STR-3 STR-2 STR-F SNK-S SNK-4 SNK-S STR-3 SNK-F STR-4 STR-O ------------------- "STR", etc at the beginning are pitch types, SNK is Sinker for example The end character is the result of the pitch, a 4 would be a home run, 3 a triple, and so forth. O is out, F is foul, S is strike --- you ge it. How can I figure the amount of RBI's? I know that it's 5, but I can' think of any automated way to calculate this, anyone got any ideas? THANK YOU!! :confused -- AVER...

Formula Question #18
I have built a workbook in which I have inserted a formula to tell me whether the contents of a supply bin needs replenishment or not. The formula I used is: =IF(E3>F3,"REPLENISH!","No Action"). Each morning, I run a report to see what parts have been used, which becomes a new sheet in the workbook. Now, I want to add a formula that, whenever it sees "REPLENISH!," it will back through the workbook to count whether that same part needed replenishment on consecutive previous days. If it has, then the latest worksheet will report the number of days that ...

REQ: Can Someone Help Me With This Outlook XP Question?
Hello All: I use Word to edit my e-mail msgs in Outlook XP. I had to reinstall Office the other day and now whenever I want to start a new e-mail or reply to an e-mail I get a warning that comes up: "A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this? If this is unexpected it may be a virus and you should choose 'No'" There is a box that asks for the amount of time to allow the access: 1 to 10 minutes. Do I have to have specific settings for my Outlook address book? I use the Contact area in Outlook for addresses. I have ...

Incorrect Office Updates in Microsoft Update
Hello I recently did clean installs of XP and Win7 on 2 different PCs. Each PC was loaded with Office 2007. When I ran Microsoft Update after the Office installs, it shows I needed Office 2007 SP1, not SP2. I manually downloaded and installed Office 2007 SP2 and then checked Windows Updates for any needed patches. It still showed I needed Office 2007 SP1...even though I just installed SP2. Does anyone know how to 1) have Office SP2 show up as a needed update instead of SP1, and 2) how to configure Windows Update to show that no SP is needed after SP2 is installed? th...

Update Manager
Everytime I boot up my PC a small window pops up entitled "UPDATE MANAGER". It shows two progress bars, but nothing ever happens. Why is this window popping up every tiem I turn on the computer and how do I get it to stop? It never used to do this, it just statred lately. Thankyou. tony Because you installed something which features an update manager "Omaha Tony" <OmahaTony@discussions.microsoft.com> wrote in message news:A08659C0-1560-4E8C-8A1C-76A5B1DBB1F8@microsoft.com... > Everytime I boot up my PC a small window pops up entitled "UP...

automatic office updates
Is there a way to configure a PC to receive Office Updates automatically like Windows Update? Thanks. Jeff Via MicrosoftUpdate as apposed to windowsupdate, and then configuring how you update. eg automatic or download and notify "J Miller" <jmiller@*nospam*pcsdps.org> wrote in message news:456db17c$0$81355$ae4e5890@news.nationwide.net... > Is there a way to configure a PC to receive Office Updates automatically > like Windows Update? > > Thanks. > > > Jeff > > Yes. Microsoft updates does this. What version of Office do you use? -- Diane...

question about using the correct schema namespace
I have a Access/VBA client that exports xml to the local drive, then posts it over http to an aspx page. The aspx page consumes it, then builds itself based on the xml data. This works find only if I first mannually change the root entry's namespace url as shown below. Does anyone know how I can get the two (cleint xml export and aspx xml consume) to work together with the appropriate namespace? Here is the top three lines of my xml export (prior to mannually changing it): <?xml version="1.0" encoding="UTF-8"?> <root xmlns:xsd="http://www.w3.org/200...

AD/Network design question
Hello all I have a 2 sites which users come and go from. These sites have 2 different network ip domains (192.168.1.x and 192.168.2.x). Users need to be authenticated using the same user id and password at both sites. DC/GC is at 192.168.1.x and is a SBS 2003. Server at 192.168.2.x is Server 2003. When the server at 192.168.2.x is connected via vpn to 192.168.1.x all is well. How do I get the server at 192.168.2.x to act as a AD/DC when it’s not connected to 192.168.1.x ? Thank you Hal I think you will run here into the limitations of SBS :-( @ SBS experts : ...

Re: Update for Windows Vista (KB980248) -- No more fonts available!
cf. http://social.answers.microsoft.com/Forums/en-US/vistawu/thread/f7fa37ca-683c-4be1-b4ad-ab2dd1249399 PA Bear [MS MVP] wrote: > Are you running Vista SP1 or Vista SP2? Is Office 2010 installed? > > Was KB980248 offered & eventually installed via Windows Update or did you > (attempt to) install it manually? > > What anti-virus application or security suite is installed and is your > subscription current? What anti-spyware applications (other than > Defender)? > What third-party firewall (if any)? > > Has a(another) Norton or McAfee ap...

Mail merge & staple question
Does anyone know how to use mail merge in Publisher with a printer that folds and staples?? Publisher is sending it to the printer as "one" big file and trying to staples "all" my newsletters together instead of individual ones with the addresses on them. Or if anyone has any other programs or ideas on how I can accomplish this task, sure would be appreciated. Thanks While waiting for decisions from his 6 university choices, Ed sees a message from Parishsecretary <Parishsecretary@discussions.microsoft.com>. On it is written: > Does anyone know how to use mai...

Prices and cost Set to zero when exporting a new store
When I export a new store with 1.2.085v from headquarters all the cost and price information is set to zero. I have seen that there is a fix for 1.3v but i cannot seem to find any other fix for our version. Any suggestions? Thanks Joe Just run worksheets to update the cost and price. Glenn Adams Tiber Creek Consulting http://www.tibercreek.com glenn@tibercreek.com ---------------------------------------------- Please DO NOT respond to me directly but post all responses here in the newsgroup so that all can share the information. Joe Gonzalez wrote: > When I export a new store with ...

Office 2010 Buying Question Assistance Needed
I've been looking through the MS Office 2010 web site to try to determine what my new small company would require, but I can't find the information I need. We for sure would need Office Pro Plus, but other than that I'm not sure. We want to run it on our own server. We will initially have 3-5 people using it and perhaps more later on. Would we need to purchase site licensing? Unfortunately, our programmers are MS haters (I'm not) and I can't get any assistance from them on this, but I have power of the pen. I would appreciate any assistance I can get. Th...

can't update office xp
I can't download the latest updates for office xp. I get a "hotfix" error. I also can't have microsoft check my computer for installed updates. it just tells me that my computer is unable to communicate with microsoft. >-----Original Message----- >I can't download the latest updates for office xp. I get >a "hotfix" error. I also can't have microsoft check my >computer for installed updates. it just tells me that my >computer is unable to communicate with microsoft. >. >guess no one has any reply to this, should I reload outloo...

does vista installed on virtual machine 2007 get wsus updates ?
It is searching for updates but it is not finding anything and saying that Windows is up to date. I have set the updates to install from the wsus server and assigned the updates to the same Vista virtual machine .. Thank you -- aconti ------------------------------------------------------------------------ aconti's Profile: http://forums.techarena.in/members/73272.htm View this thread: http://forums.techarena.in/active-directory/1290161.htm http://forums.techarena.in Hello aconti, If the machine is getting the correct GPO for the WSUS settings, check with rsop...

Need help with update sql plus filter
I have the following update sql (copied from the query design view) UPDATE ListQry SET ListQry.ApprovalStatusID = [Forms]![OpeningForm]![Responsibility] WHERE (((ListQry.ApprovalStatusID)<[Forms]![OpeningForm]![Responsibility] And (ListQry.ApprovalStatusID)>-1) AND ((ListQry.OtherStatusID)>300)) OR (((ListQry.ApprovalStatusID)<[Forms]![OpeningForm]![Responsibility] And (ListQry.ApprovalStatusID)>-1) AND ((ListQry.OtherStatusID) Is Null)); ApprovalStatusID is an integer OtherStatusID is an integer ListQry is the recordsource for my form. I would like to add the f...

Outlook 2000 doesn't respond after downloading MS update!!
Luckily, my Outlook Express seems to work, but my Outlook 2000 will open, but if I click on a message or do Anything, it FREEZES. HELP!! I rely on calendar functions, other things. HOW could MS allow an update that screws up their own programs? I did restore - to no avail. I lent CD to someone, so can't do "repair." (Trying to get a hold of friend) Please help! I'm in process of job hunt & really need Outlook to function... Thanks, Sherry Did you recently apply SP3 for Office/Outlook 2000 and is Outlook 2000 configured in Internet Mail Only mode? If yes, you...

Question About Missing Data
So, this is probably really easy, but I just want to ask and see if I may be missing something here. Some data on vendor numbers changed. Let’s say IBM used to have a vendor number 12345 and now it’s vendor number is 56789. I can identify IBM as IBM, but I really want to use the number, not the name. Should I set up a table that ties the numbers together, so that Access knows 12345 = 56789? Or, should I do some kind of Update Query and change all incidences of 12345 to be 56789? Or, is there some other, method, like a ‘best practices for missing data’? Thanks! Ryan--- ...

Custom CRect Question
I have a custom rectangle class that inherits from CRect: class CCustomRect : public CRect { private: CPoint m_maxPt; COLORREF m_color; TCHAR text[50]; public: CCustomRect(RECT* source, CPoint pt, COLORREF rgb); RECT* RectBase(); void Update(RECT* r); } Inheritance has worked well until I found myself needing to create the RectBase function (above) to return the rectangle dimensions. CRect does not seem to have any methods that can be called to return the base class's RECT value. I could take CRect::Size and construct a rectangle to return, but this seems a bit much. My...

Excel link update question
I need to maintain an excel workbook which contains a lot of links to other workbooks. Since the linked workbooks change every week, I need to change all the links accordingly. For example, a cell with formula "='[aug_28.xls]sheet1' !A10" will be changed into "='[sep_4.xls]sheet1'!A10". I tried to do this with Find/Replace. However, the link is updated every time it is changed. The link updating takes a couple of seconds. So it may take a hour to finsh it for a workbook with thousands of links. Could anyone tell me how to shut down the link updating when...

Store limit in Exchange
I'm currently researching the migration of my organization's mail system to Exchange and see that the standard edition of Exchange has a data store limit of 16GB. If we were to do a front end, back end setup with two server and the back end server that has the data store were to reach the 16GB limit would adding another back end server resolve this? I read in another post that this would double the space. But doing this the users that are currently create would have to be split up and some moved to the new data store server correct? Also since the Enterprise edition allows m...

can not mount information store
i am receiving event id 454, Information Store (2704) Database recovery/restore failed with unexpected error -540. . in exchange admin i get the error An internal processing error has occurred. Try restarting the Exchange System Manager or the Microsoft Exchange Information Store service, or both we have plently of disk space available which is stated as the cause by a number of tech notes. Can anyone help? Hi Did it happen after restore? Try to move the exchange log files (cut-paste) and mount the store. If still can’t mount run eseutil.exe /p -- "nick reed" wrote...

Update Query
Access 2003 XP SP2 I am having a problem with an update query. Table is in a one-to-one relationship, referentail integrity and cascading data are checked. (The fileds I want to update are not in both tables) Table name= payForward Has 15 fields ie: ID, Name, MemID, Oct , Nov, Dec, etc Oct-Sep fields are yes/no type I want to "select" a field (Oct-Sep) via a query parameter and repalce "yes" with "no". Here is my query: UPDATE payForward SET [Enter month]=No The messages I get is 'operation must use an updateable query' Wh...