A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

multi-table select stored procedure subform ole eb error



 
 
Thread Tools Display Modes
  #1  
Old January 6th, 2010, 01:03 PM posted to microsoft.public.access.forms
tomocb
external usenet poster
 
Posts: 3
Default multi-table select stored procedure subform ole eb error

As soon as I add a field to the select statement of my subform's stored
procedure record source from a foreign table in the join the subform presents
"multiple-step ole db operation generated errors..." when I try to insert a
new record in the subform.

I have specified the unique table, I have the input parameters specified and
the resync command works perfectly.

If I only include fields from the unique table in the select of the stored
procedure there isn't a problem. I'm using access 2007, adp, sp2, WinXP.

I cannot for the life of me work out what is wrong with this. Please help.
  #2  
Old January 7th, 2010, 12:50 PM posted to microsoft.public.access.forms
tomocb
external usenet poster
 
Posts: 3
Default multi-table select stored procedure subform ole eb error

Found the problem. It is because the foreign key that I'm updating in the
subform is part of a concatenated key in its foreign table. The reason it is
part of concat key is because I need to make it unique against the primary
key of the main form.

I wasn't previously setting the foreign key value programattically, but now
I'm doing so in the BeforeInsert event and it has fixed the problem, even
though Access automatically populates this value because it recognises as
part of the link child/master records.

It must be that it was populating it later than my new BeforeInsert sub
routine and consequently produced the error, which makes sense as this error
commonly relates to NULL values being parsed to tables when they should not.


"tomocb" wrote:

As soon as I add a field to the select statement of my subform's stored
procedure record source from a foreign table in the join the subform presents
"multiple-step ole db operation generated errors..." when I try to insert a
new record in the subform.

I have specified the unique table, I have the input parameters specified and
the resync command works perfectly.

If I only include fields from the unique table in the select of the stored
procedure there isn't a problem. I'm using access 2007, adp, sp2, WinXP.

I cannot for the life of me work out what is wrong with this. Please help.

  #3  
Old January 8th, 2010, 09:45 AM posted to microsoft.public.access.forms
tomocb
external usenet poster
 
Posts: 3
Default multi-table select stored procedure subform ole eb error

Now that I have more time to test this, I'm wondering if this is actually a
bug in Access?

The error message will always appear if you select a columns from multiple
tables in a stored procedure where the join is a foreign key linked to a
concatenated primary key.

Could someone confirm, please?

"tomocb" wrote:

Found the problem. It is because the foreign key that I'm updating in the
subform is part of a concatenated key in its foreign table. The reason it is
part of concat key is because I need to make it unique against the primary
key of the main form.

I wasn't previously setting the foreign key value programattically, but now
I'm doing so in the BeforeInsert event and it has fixed the problem, even
though Access automatically populates this value because it recognises as
part of the link child/master records.

It must be that it was populating it later than my new BeforeInsert sub
routine and consequently produced the error, which makes sense as this error
commonly relates to NULL values being parsed to tables when they should not.


"tomocb" wrote:

As soon as I add a field to the select statement of my subform's stored
procedure record source from a foreign table in the join the subform presents
"multiple-step ole db operation generated errors..." when I try to insert a
new record in the subform.

I have specified the unique table, I have the input parameters specified and
the resync command works perfectly.

If I only include fields from the unique table in the select of the stored
procedure there isn't a problem. I'm using access 2007, adp, sp2, WinXP.

I cannot for the life of me work out what is wrong with this. Please help.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.