Transaction problem between DAO and ADO

Hi,
Was using DAO all along and following code was working fine:

wrkspc.Begintrans

with rst
..MoveFirst
Do Until .EOF
..AddNew
!pkID = DMax("pkID", "Table") +1
....other table fields
..Update
..MoveNext
Loop
End with

User Confirmation...
wrkspc.committrans

User Cancellation
wrkspc.rollback

Have recently switched to ADO - not much experience with it either...
Reworded the above code to make it suitable for ADO. Using connection object 
to begin/commit/rollback the transaction.

Problem is that the code raises an error in ADO because the DMax function 
(in ADO) gets the same pkID each time the loop executes - causing a primary 
key integrity error. Have a feeling this is something to do with the way ADO 
handles transactions - the first record is not added yet when in between a 
begintrans and commit and causes DMax to get the same pkID. Any way out of 
this?? Am I right in using connection object to process transactions?
TIA

Anand


0
Utf
1/26/2010 6:44:01 AM
access.formscoding 7493 articles. 0 followers. Follow

6 Replies
1001 Views

Similar Articles

[PageSpeed] 56

Try removing "Do Until .EOF" because it's not end of file and it's looping
with the same DMax ID.

Anand wrote:
>Hi,
>Was using DAO all along and following code was working fine:
>
>wrkspc.Begintrans
>
>with rst
>.MoveFirst
>Do Until .EOF
>.AddNew
>!pkID = DMax("pkID", "Table") +1
>...other table fields
>.Update
>.MoveNext
>Loop
>End with
>
>User Confirmation...
>wrkspc.committrans
>
>User Cancellation
>wrkspc.rollback
>
>Have recently switched to ADO - not much experience with it either...
>Reworded the above code to make it suitable for ADO. Using connection object 
>to begin/commit/rollback the transaction.
>
>Problem is that the code raises an error in ADO because the DMax function 
>(in ADO) gets the same pkID each time the loop executes - causing a primary 
>key integrity error. Have a feeling this is something to do with the way ADO 
>handles transactions - the first record is not added yet when in between a 
>begintrans and commit and causes DMax to get the same pkID. Any way out of 
>this?? Am I right in using connection object to process transactions?
>TIA
>
>Anand

-- 
Please Rate the posting if helps you.

Message posted via http://www.accessmonster.com

0
AccessVandal
1/26/2010 10:12:18 AM
Wait a minute. what are you trying to do here?

Here's what I see:
> with rst                        'you have a recordset "rst"
> .MoveFirst                    ' you goto to the 1st record
> Do Until .EOF                'you're going to somthing to all records? 

> .AddNew                      ' you ADDNEW? (jump to the end of RST to add a record!)

> !pkID = DMax("pkID", "Table") +1 'now you get the max value of pkID from a table named "TABLE"?????

> ...other table fields
> .Update                       'save
> .MoveNext                  ' you can't movenext you're on the "new" record
> Loop                           ' and  you start over.  
> End with

To add one record to a table here's what I'd do:

dim NewID as long,objMyTable as object
set objMyTable  = CurrentDb.OpenRecordset("tblMyTable")
newID =DMax("pkID", "tblMyTable") +1
with rst
 .AddNew
 .pkID = newID 
 ...other table fields
 .Update
End with

(actually, I'd just use an autonumber)

--Or are you trying to do something to all the records? (do until EOF, loop)
Like, I do that when I open two tables and for each record on this one, add 
a record to that one, but that requires two objects.

HTH
roger

BTW DMax() is not ADO or DAO, its just VBA.

"Anand" wrote:

> Hi,
> Was using DAO all along and following code was working fine:
> 
> wrkspc.Begintrans
> 
> with rst
> .MoveFirst
> Do Until .EOF
> .AddNew
> !pkID = DMax("pkID", "Table") +1
> ...other table fields
> .Update
> .MoveNext
> Loop
> End with
> 
> User Confirmation...
> wrkspc.committrans
> 
> User Cancellation
> wrkspc.rollback
> 
> Have recently switched to ADO - not much experience with it either...
> Reworded the above code to make it suitable for ADO. Using connection object 
> to begin/commit/rollback the transaction.
> 
> Problem is that the code raises an error in ADO because the DMax function 
> (in ADO) gets the same pkID each time the loop executes - causing a primary 
> key integrity error. Have a feeling this is something to do with the way ADO 
> handles transactions - the first record is not added yet when in between a 
> begintrans and commit and causes DMax to get the same pkID. Any way out of 
> this?? Am I right in using connection object to process transactions?
> TIA
> 
> Anand
> 
> 
0
Utf
1/26/2010 12:59:02 PM
Sorry Roger..did not make myself very clear. I am trying to add records from 
one rst to another - opened on the same table.. there are two recordset 
objects opened in ADO.

Each loop on rst1 will add a new record in rst2. Logically I need a new pkID 
in rst2 for each loop on rst1.  This is not happening -DMax gets the same 
pkID for all the loops - generating the PK error for rst1. Any suggestions on 
how to solve this? I use the connection object for transaction processing.

If I use AutoNumbers can I get VBA to tell me the last pkID inserted? 
Sometimes I need to know this for further processing.

Thanks,
Anand


"roger" wrote:

> Wait a minute. what are you trying to do here?
> 
> Here's what I see:
> > with rst                        'you have a recordset "rst"
> > .MoveFirst                    ' you goto to the 1st record
> > Do Until .EOF                'you're going to somthing to all records? 
> 
> > .AddNew                      ' you ADDNEW? (jump to the end of RST to add a record!)
> 
> > !pkID = DMax("pkID", "Table") +1 'now you get the max value of pkID from a table named "TABLE"?????
> 
> > ...other table fields
> > .Update                       'save
> > .MoveNext                  ' you can't movenext you're on the "new" record
> > Loop                           ' and  you start over.  
> > End with
> 
> To add one record to a table here's what I'd do:
> 
> dim NewID as long,objMyTable as object
> set objMyTable  = CurrentDb.OpenRecordset("tblMyTable")
> newID =DMax("pkID", "tblMyTable") +1
> with rst
>  .AddNew
>  .pkID = newID 
>  ...other table fields
>  .Update
> End with
> 
> (actually, I'd just use an autonumber)
> 
> --Or are you trying to do something to all the records? (do until EOF, loop)
> Like, I do that when I open two tables and for each record on this one, add 
> a record to that one, but that requires two objects.
> 
> HTH
> roger
> 
> BTW DMax() is not ADO or DAO, its just VBA.
> 
> "Anand" wrote:
> 
> > Hi,
> > Was using DAO all along and following code was working fine:
> > 
> > wrkspc.Begintrans
> > 
> > with rst
> > .MoveFirst
> > Do Until .EOF
> > .AddNew
> > !pkID = DMax("pkID", "Table") +1
> > ...other table fields
> > .Update
> > .MoveNext
> > Loop
> > End with
> > 
> > User Confirmation...
> > wrkspc.committrans
> > 
> > User Cancellation
> > wrkspc.rollback
> > 
> > Have recently switched to ADO - not much experience with it either...
> > Reworded the above code to make it suitable for ADO. Using connection object 
> > to begin/commit/rollback the transaction.
> > 
> > Problem is that the code raises an error in ADO because the DMax function 
> > (in ADO) gets the same pkID each time the loop executes - causing a primary 
> > key integrity error. Have a feeling this is something to do with the way ADO 
> > handles transactions - the first record is not added yet when in between a 
> > begintrans and commit and causes DMax to get the same pkID. Any way out of 
> > this?? Am I right in using connection object to process transactions?
> > TIA
> > 
> > Anand
> > 
> > 
0
Utf
1/26/2010 6:15:02 PM
> DMax gets the same pkID for all the loops - generating the PK error for 
rst1. Any suggestions on how to solve this?

store it as a separate variable:
dim newID as long
newID =DMax("pkID", "tblMyTable")  '1st store the starting value (the one 
you CAN get)
do while  whatever  'start your loop
newID=newID+1 ' increment IT by 1
AddNew
..pkID = newID  
' etc etc etc
loop


> If I use AutoNumbers can I get VBA to tell me the last pkID inserted? 
> Sometimes I need to know this for further processing.

Assuming .pkAutoID is an autonumber:

..addnew
set other fields here
..update ' saves record and creates the Autonumber
myStoredValue = .pkautoID ' store your autonumber from the ADO record
..movenext 'THEN movenext or Addnew or whatever


HTH 
roger

"Anand" wrote:

> Sorry Roger..did not make myself very clear. I am trying to add records from 
> one rst to another - opened on the same table.. there are two recordset 
> objects opened in ADO.
> 
> Each loop on rst1 will add a new record in rst2. Logically I need a new pkID 
> in rst2 for each loop on rst1.  This is not happening -DMax gets the same 
> pkID for all the loops - generating the PK error for rst1. Any suggestions on 
> how to solve this? I use the connection object for transaction processing.
> 
> If I use AutoNumbers can I get VBA to tell me the last pkID inserted? 
> Sometimes I need to know this for further processing.
> 
> Thanks,
> Anand
> 
> 
> "roger" wrote:
> 
> > Wait a minute. what are you trying to do here?
> > 
> > Here's what I see:
> > > with rst                        'you have a recordset "rst"
> > > .MoveFirst                    ' you goto to the 1st record
> > > Do Until .EOF                'you're going to somthing to all records? 
> > 
> > > .AddNew                      ' you ADDNEW? (jump to the end of RST to add a record!)
> > 
> > > !pkID = DMax("pkID", "Table") +1 'now you get the max value of pkID from a table named "TABLE"?????
> > 
> > > ...other table fields
> > > .Update                       'save
> > > .MoveNext                  ' you can't movenext you're on the "new" record
> > > Loop                           ' and  you start over.  
> > > End with
> > 
> > To add one record to a table here's what I'd do:
> > 
> > dim NewID as long,objMyTable as object
> > set objMyTable  = CurrentDb.OpenRecordset("tblMyTable")
> > newID =DMax("pkID", "tblMyTable") +1
> > with rst
> >  .AddNew
> >  .pkID = newID 
> >  ...other table fields
> >  .Update
> > End with
> > 
> > (actually, I'd just use an autonumber)
> > 
> > --Or are you trying to do something to all the records? (do until EOF, loop)
> > Like, I do that when I open two tables and for each record on this one, add 
> > a record to that one, but that requires two objects.
> > 
> > HTH
> > roger
> > 
> > BTW DMax() is not ADO or DAO, its just VBA.
> > 
> > "Anand" wrote:
> > 
> > > Hi,
> > > Was using DAO all along and following code was working fine:
> > > 
> > > wrkspc.Begintrans
> > > 
> > > with rst
> > > .MoveFirst
> > > Do Until .EOF
> > > .AddNew
> > > !pkID = DMax("pkID", "Table") +1
> > > ...other table fields
> > > .Update
> > > .MoveNext
> > > Loop
> > > End with
> > > 
> > > User Confirmation...
> > > wrkspc.committrans
> > > 
> > > User Cancellation
> > > wrkspc.rollback
> > > 
> > > Have recently switched to ADO - not much experience with it either...
> > > Reworded the above code to make it suitable for ADO. Using connection object 
> > > to begin/commit/rollback the transaction.
> > > 
> > > Problem is that the code raises an error in ADO because the DMax function 
> > > (in ADO) gets the same pkID each time the loop executes - causing a primary 
> > > key integrity error. Have a feeling this is something to do with the way ADO 
> > > handles transactions - the first record is not added yet when in between a 
> > > begintrans and commit and causes DMax to get the same pkID. Any way out of 
> > > this?? Am I right in using connection object to process transactions?
> > > TIA
> > > 
> > > Anand
> > > 
> > > 
0
Utf
1/26/2010 6:50:01 PM
Anand wrote:
>Sorry Roger..did not make myself very clear. I am trying to add records from 
>one rst to another - opened on the same table.. there are two recordset 
>objects opened in ADO.

Why do you need to open the table with two recordsets? According to your code,
you don't need to unless you tell us why.

>Each loop on rst1 will add a new record in rst2. Logically I need a new pkID 
>in rst2 for each loop on rst1.  This is not happening -DMax gets the same 
>pkID for all the loops - generating the PK error for rst1. Any suggestions on 
>how to solve this? I use the connection object for transaction processing.

Again, if you didn't my message. DMax() will always get the same ID.

>If I use AutoNumbers can I get VBA to tell me the last pkID inserted? 
>Sometimes I need to know this for further processing.

With AutoNumber, you don't even need any coding. Can you tell us why you need
to know the autonumber ID?

-- 
Please Rate the posting if helps you.

Message posted via http://www.accessmonster.com

0
AccessVandal
1/27/2010 1:02:29 AM
Thanks Roger, Problem solved.

Anand


"roger" wrote:

> > DMax gets the same pkID for all the loops - generating the PK error for 
> rst1. Any suggestions on how to solve this?
> 
> store it as a separate variable:
> dim newID as long
> newID =DMax("pkID", "tblMyTable")  '1st store the starting value (the one 
> you CAN get)
> do while  whatever  'start your loop
> newID=newID+1 ' increment IT by 1
> AddNew
> .pkID = newID  
> ' etc etc etc
> loop
> 
> 
> > If I use AutoNumbers can I get VBA to tell me the last pkID inserted? 
> > Sometimes I need to know this for further processing.
> 
> Assuming .pkAutoID is an autonumber:
> 
> .addnew
> set other fields here
> .update ' saves record and creates the Autonumber
> myStoredValue = .pkautoID ' store your autonumber from the ADO record
> .movenext 'THEN movenext or Addnew or whatever
> 
> 
> HTH 
> roger
> 
> "Anand" wrote:
> 
> > Sorry Roger..did not make myself very clear. I am trying to add records from 
> > one rst to another - opened on the same table.. there are two recordset 
> > objects opened in ADO.
> > 
> > Each loop on rst1 will add a new record in rst2. Logically I need a new pkID 
> > in rst2 for each loop on rst1.  This is not happening -DMax gets the same 
> > pkID for all the loops - generating the PK error for rst1. Any suggestions on 
> > how to solve this? I use the connection object for transaction processing.
> > 
> > If I use AutoNumbers can I get VBA to tell me the last pkID inserted? 
> > Sometimes I need to know this for further processing.
> > 
> > Thanks,
> > Anand
> > 
> > 
> > "roger" wrote:
> > 
> > > Wait a minute. what are you trying to do here?
> > > 
> > > Here's what I see:
> > > > with rst                        'you have a recordset "rst"
> > > > .MoveFirst                    ' you goto to the 1st record
> > > > Do Until .EOF                'you're going to somthing to all records? 
> > > 
> > > > .AddNew                      ' you ADDNEW? (jump to the end of RST to add a record!)
> > > 
> > > > !pkID = DMax("pkID", "Table") +1 'now you get the max value of pkID from a table named "TABLE"?????
> > > 
> > > > ...other table fields
> > > > .Update                       'save
> > > > .MoveNext                  ' you can't movenext you're on the "new" record
> > > > Loop                           ' and  you start over.  
> > > > End with
> > > 
> > > To add one record to a table here's what I'd do:
> > > 
> > > dim NewID as long,objMyTable as object
> > > set objMyTable  = CurrentDb.OpenRecordset("tblMyTable")
> > > newID =DMax("pkID", "tblMyTable") +1
> > > with rst
> > >  .AddNew
> > >  .pkID = newID 
> > >  ...other table fields
> > >  .Update
> > > End with
> > > 
> > > (actually, I'd just use an autonumber)
> > > 
> > > --Or are you trying to do something to all the records? (do until EOF, loop)
> > > Like, I do that when I open two tables and for each record on this one, add 
> > > a record to that one, but that requires two objects.
> > > 
> > > HTH
> > > roger
> > > 
> > > BTW DMax() is not ADO or DAO, its just VBA.
> > > 
> > > "Anand" wrote:
> > > 
> > > > Hi,
> > > > Was using DAO all along and following code was working fine:
> > > > 
> > > > wrkspc.Begintrans
> > > > 
> > > > with rst
> > > > .MoveFirst
> > > > Do Until .EOF
> > > > .AddNew
> > > > !pkID = DMax("pkID", "Table") +1
> > > > ...other table fields
> > > > .Update
> > > > .MoveNext
> > > > Loop
> > > > End with
> > > > 
> > > > User Confirmation...
> > > > wrkspc.committrans
> > > > 
> > > > User Cancellation
> > > > wrkspc.rollback
> > > > 
> > > > Have recently switched to ADO - not much experience with it either...
> > > > Reworded the above code to make it suitable for ADO. Using connection object 
> > > > to begin/commit/rollback the transaction.
> > > > 
> > > > Problem is that the code raises an error in ADO because the DMax function 
> > > > (in ADO) gets the same pkID each time the loop executes - causing a primary 
> > > > key integrity error. Have a feeling this is something to do with the way ADO 
> > > > handles transactions - the first record is not added yet when in between a 
> > > > begintrans and commit and causes DMax to get the same pkID. Any way out of 
> > > > this?? Am I right in using connection object to process transactions?
> > > > TIA
> > > > 
> > > > Anand
> > > > 
> > > > 
0
Utf
1/28/2010 4:49:01 AM
Reply:

Similar Artilces:

Problem removing 0
Helper Sheet AQ2:AQ901 contain phone numbers some have been entered 0 when there is no number provided. I am tryin to write a formula that will state if AQ2 = 0 then field is blank. in cell V2 I have tried to write all the following formulas and al result with the 0 still remaining =IF(ISNUMBER('Helper Sheet'!AQ2)="0","",IF('Helpe Sheet'!AQ2="","",'Helper Sheet'!AQ2)) =IF(ISTEXT('Helper Sheet'!AQ2)="0","",IF('Helpe Sheet'!AQ2="","",'Helper Sheet'!AQ2)) =IF('...

Transaction to read when no actual transaction
I have an account called 'Honda accord'. It is an asset account that has a loan associated with it. The loan account is 'Honda loan.' I imported a transaction into Honda accord and says i have 1 transaction to read. I have view all dates/transactions selected and nothing comes up. The box to the left says i still have a transaction to read and I cant find the darn thing. Any Ideas???? -- Stephen and Erica Chenelle In microsoft.public.money, Stephen & Erica Chenelle wrote: >I have an account called 'Honda accord'. It is an asset account that has a >...

Task delegation problem -- please help!
Apologies for re-posting this one, but it is really driving me nuts. Please help! After reformatting my hard disk and reinstalling Windows, almost everything on my computer works again. The one thing that doesn't is a bizarre change to the way Outlook 2000 handles task delegation. In the past, I could assign a task to a colleague, and it would appear on both my colleague's and my own task lists. When my colleague completed the task, I would get an 'update' message, and the task on my list would be marked as completed. I can still delegate tasks, but I no longer get the autom...

Hyperlink problem #4
can you create a hyperlink on one page to link to text on another pag that changes it cell location as i import new stocki need the link t reference a block of text rather than a cell locatio -- klatla ----------------------------------------------------------------------- klatlap's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1290 View this thread: http://www.excelforum.com/showthread.php?threadid=27797 Can you pick out a unique value in a cell to link to? If yes, I put that unique value in A1 of sheet1 and looked for that string in column A of 'Sheet 2...

Paid Transaction Removal not removing some transactions
When running Paid Transaction Removal two transactions for an account were not removed to history while seemingly identical transactions in another account were. As I understand the rules of paid transaction removal, a transaction will be removed if it meets the following criteria. 1. If it's an invoice it must be fully paid. 2. If it's a payment, the document amount must be fully applied to one or more invoices. 3. The removal date must be after the document date. The documents are debit notes, are fully paid off (CURTRXAM = .00000) and the document dates precede the cut-off d...

Time problem in sent items
Windows XP, Outlook XP, in my sent all ( work with IMAP Folders ) my time appears to be +10 hours than my actual local time, my local settings on my computer are correct Can anyone help me ? Thanks CJ .. Outlook will follow Windows lead, so if the time is incorrect in Windows, don't bother opening outlook. Check your time zone and BIOS time. ~jason "CJ Foster" <anonymous@discussions.microsoft.com> wrote in message news:041901c3cf41$bade98c0$a501280a@phx.gbl... > Windows XP, Outlook XP, in my sent all ( work with IMAP > Folders ) my time appears to be +10 hour...

Strange problem in toolbar
Hi I have created an IE Toolbar using ATL,COM and WTL.But a strange thing I am getting here.After opening an IE with the toolbar visible if I lock the system for some time then after unlocking it I am getting the buttons at not desired state.means suppose,I am having a homepage button,a search box,a search button,a settings button and an option button in the toolbar serially from left,then after unlocking the system I am not getting the search button and settings button and also the option button is coming from its middle.why it is behaving so? Does anybody have any idea? On Jul 12, 2:36 am...

PM Transaction Work vs Open
What is the difference between PM_Transaction_WORK and PM_Transaction_OPEN? Thanks, Steven work = saved open - posted "Steven" wrote: > What is the difference between PM_Transaction_WORK and PM_Transaction_OPEN? > > Thanks, > Steven As an add on, the work also includes recurring transactions. "Doug" wrote: > work = saved > open - posted > > "Steven" wrote: > > > What is the difference between PM_Transaction_WORK and PM_Transaction_OPEN? > > > > Thanks, > > Steven Thanks, Guys! Steven "klewis&quo...

How are transactions automatically assigned to categories?
When I download my credit card statements into Money, I notice that some of them are automatically assigned to categories. How does Money do this? Is the information included in the info I download from my bank, or are there rules within money? More importantly, how can I add my own rules to auto- categorize things? Thanks! -Aaron ...

V10 - Transaction by debtor enquiry report
Hi, Anyone any ideas why when printing the transaction by debtor enquiry report, the last digit of the amount is dropped off? This is when printed as A4 - payables is okay going to same printer. Okay when displayed to screen - only lost when actually printed. Thanks Jean -- JB Is the last digit perhaps trying to print outside the 'printable' area of the printer? If you do not use A4 paper does it work? Do you have the A4 module installed? "JB" wrote: > Hi, > > Anyone any ideas why when printing the transaction by debtor enquiry report, ...

New ISP problem...
I just changed from a free school dialup service to AOL. Now I suddenly can't send outgoing emails through Outlook. It isn't an AOL email account, either. It's a school one. any ideas, thoughts, suggestions? Thanks. ...

problems with SQL.REQUEST
I am trying to use =SQL.REQUEST in an Excel spreadsheet http://office.microsoft.com/en-us/assistance/HP052092671033.aspx http://www.microsoft.com/downloads/details.aspx?FamilyID=57E79367-13A0-4895-9942-5B177846AB8A&displaylang=EN I have installed the xlodbc.xla add-in under Excel 2002 and 2003 and I still get #NAME? in the cell with the SQL.REQUEST This document talks about the xlodbc.xla not available for 2003 but does not say if an add-in is needed or not to get SQL.REQUEST http://support.microsoft.com/kb/288118/EN-US/ I was able to get the 2002 add-in to install and show up under E...

installed earthinktotalaccess 2004 problems with outlook
Just installed the above. Have had earthlink with no problems. The settings are correct, did the auto set e- mail and checked. I also use the outlook express which sends and recieves fine. but my regular outlook, when I hit "send/recieve" it days "operation failed". When I"m in an e-mail and send it, it sends and is fine. I have the e-mail to auto check every 3 minutes and I'll get e- mail then, it is just when I manually hit send and recieve it "operation fails" me. I Have windows XP professional on a Dell 8400 computor. Outlook 2002. Ear...

Receivables transactions not aging individual transactions
Looking at smartlist, the Receivables transactions have a search/favourite added, including the aging periods. When you look at the search, it doesn't age the individual transactions, but instead ages the entire customers balance. I would expect it to show the aged balance per transation. Assessment: With how Smartlist is currently designed, the default smartlist object pulls from the Summary table for those aging period amounts. This is the reason why it does not show the aging for individual transactions. I know that the ability to see the aging of the individual accounts would b...

Urgent excel problem....
I have a workbook with multiple sheets. In sheet1 there is the output of a lab machine. It only consists of a column A that is filled with many rows. Something like this: >>>>>>> Hysteresis 1,1 : 3.00% Hysteresis 1,2 : 3.00% Meten display 1,1 : Eff. waarde (V) Meten display 1,2 : Eff. waarde (V) Weergeven meting display 1,1 : Ch1 Weergeven meting display 1,2 : Ch2 Impedantie display 1,1 : 600.0000 Impedantie display 1,2 : 600....

Problems with an order showing up in open order report
Great Plains 6.0, PSQL2000i We have an order (from July, long transferred to invoice and posted) that is showing up on our open order report. We just ran checklinks, and when I try to go into the order, it says it is posted. When I do an inquiry on sales documents, it show as unposted. How can I fix this. I also tried to all the sales utilities, but nothing seems to work. Is there something I can do in access to remove this? Thanks for all and any help. Julie Carpenter ...

TRANSACTION and SELECT *
Hi all I have a question about SQL Transactions: For example, I have a table with 3 rows (ID 1, 2 and 3). Now I insert a new row within BEGIN TRANSACTION, and I do not commit yet. In another SQL Session, I try to select data. When I do SELECT * FROM Table, it is blocked. When I do SELECT * FROM Table WHERE ID = 2 I get a result. How can I make SELECT * FROM Table possible even when there is a open Transaction ? Of corse I only expect to get the ID's 1, 2 and 3 back and not the new row. I have looked about IsolationLevel, but this does not help. Thanks for any comments ...

SMTP problem #6
On our Exchange Server 2003, in the New SMTP Virtual Server wizard, I get only one IP address in the IP address drop down list. But the server has 2 network cards. How can I add the second IP address, in order to select it from the list? I've been searching everywhere, but I didn't find it. -- Riki Is the other IP address associated with an existing SMTP VS? Nue "Riki" <riki@bounce.com> wrote in message news:uGGGrdsmGHA.856@TK2MSFTNGP03.phx.gbl... > On our Exchange Server 2003, in the New SMTP Virtual Server wizard, > I get only one IP address in the IP ...

Installing Problem
I have a computer with Office 2000 installed on it. I needed to install Access 97. After I installed it, everytime I use Access 97 icon to open some databases that were originally created with Access97, Access 2000 opens instead, further more the Access 97 icon shows like Access 2K icon !! A lot of other users have the two versions installed and are able to open Access97. Why this is happening on my machine now? I have an urgent need to open a database with Access 97. Please help. Thanks a lot. Hi Tamer, See the following articles for information on installing and running multiple ...

Sorting - Keeping multiple locations together
Have a spreadsheet with items. A = Multiple Locations B = item id (in each location) C = Description D = Qty on Hand (some have zero) E thru J = has misc data I am trying to sort by D - Highest qty on hand and bring all locations with it - no matter what qty is showing. example A B C D 100002 PC12345 tool for PC 2500pc 100003 PC12345 tool for PC 0pc 100004 PC12345 tool for PC 400pc 100005 PC12345 tool for PC 10pc url:http://www.ureader.com/gp/1027-1.aspx date: Thu, 5 Nov 2009 21:58:00 +0800 author: CARM Re: Sorting - Keeping multiple ...

Rounding on Investment transactions
I've seen this problem for quite a while in Monday (at least 01, 02, 03, and 04). But when I'm entering my transactions, often times the final amount (shares*cost+comm) don't equal out, it's always the matter of 1 penny, but I'm a bit anal that way. For instance. 0.78800 shares at 27.8900 per share. Fully worked out it comes to 21.97732. So when Money does the transaction it rounds it to 21.98 (makes perfect sense). My brokerage relays the cost as 21.97. What options do I have to make these transactions actually work out? Since I can't do a negative commis...

Problems with SendMail or automation of Send To
I am having trouble and I hope someone can help. I am trying to email single worksheets out of a workbook to individual stores and automate the whole thing. If I manually select the worksheet and use File - Send To - Mail Recipient, the worksheet is sent perfectly. I cannot find a way to automate this function so I attempted to use SendMail instead. Whenever I attempt to send something using SendMail, a box appears off the left side of my screen with a message saying "A program is trying to automatically send e-mail on your behalf. Do you want to allow this?" This message, according...

Excel Charts
I have several Excel charts that I am working on for a presentation. I plan on using Powerpoint for the presentation but am creating the charts in Excel. One problem that I am having is that I have a text box that I have placed on my chart below the title - I need to copy the entire chart so that I can paste it into Powerpoint but when I click on the chart to copy.... the text box disappears. I've tried sending the chart to back.... the funny thing is if I copy the text box to another cell and paste it.... then copy it back on to the chart it seems to stay. What's that all about. Any...

OnDeviceChange() event problem...
Hi All, I am calling RegisterDeviceNotifications() to register my device for OnDeviceChange() having below mentioned class GUID... //Attached is copy of code struct __declspec(uuid("03480C33-5CDA-4F8B-94D3-796A93B72663")) uuidUsbDevClass { }; //calling this in OnCreate() GUID guidUsbDevClass = __uuidof(uuidUsbDevClass); DEV_BROADCAST_DEVICEINTERFACE deviceFilter; ZeroMemory( &deviceFilter, sizeof(deviceFilter) ); deviceFilter.dbcc_size = sizeof(DEV_BROADCAST_DEVICEINTERFACE); deviceFilter.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE; deviceFilter.dbcc_classguid ...

Recalculation Problem
Hi Hi I posted this issue in the "New Users" group but have not found a solution. > In F22 I have a date > > In G22 I have the following formula > > =F22+1096 (which is date formatted) > > This gives a result of a date which is 3 years on from the > date in F22 > > In H22 I the following formula > > =IF(NOW()>G22,"OUT OF DATE","") > > This works fine providing that I press F9 for > recalculation. > > The "TOOLS", "OPTIONS", "CALCULATION" is set to Automatic > yet I still ha...