passthrough query and error 3125 (not a valid name)

passthrough query and error 3125 (not a valid name)

am 23.01.2008 17:38:35 von KayC

Hi
Can anyone pointme in the right direction?
I run Access2000 and have a passthrough query to a Sybase db
I am trying to make a table out of the passthrough query but get the
following error

error 3125 'Pool Factor 21 Jan 2008' is not a valid name. Make sure
that it does not include invalid characters or punctuation and that it
is not too long

The passthrough query is a stored proc which runs fine when executed -
I am completely lost at why I can't make it into a table! Is it
because of the field 'Pool Factor 21 Jan 2008' - I have made a table
with this as a field heading and Access accepts it

Any help appreciated

Regards

KC

Re: passthrough query and error 3125 (not a valid name)

am 23.01.2008 19:13:24 von Rich P

Greetings,

When you say the stored procedure runs fine, do you mean it runs fine in
Access? Or it just runs fine in Sybase?

Does the procedure run in Access? Or do you mean the passthrough query
runs OK? If the passthrough query runs OK, then I would try an Insert
Into statement instead of a Select * Into statement. The only catch is
that you have to manually create the table to Insert Into first.

DoCmd.RunSql "Insert into yourmanuallycreatedTbl Select * from
passthroughQry"



Rich

*** Sent via Developersdex http://www.developersdex.com ***

Re: passthrough query and error 3125 (not a valid name)

am 23.01.2008 21:48:18 von KayC

On 23 Jan, 18:13, Rich P wrote:
> Greetings,
>
> When you say the stored procedure runs fine, do you mean it runs fine in
> Access? Or it just runs fine in Sybase?
>
> Does the procedure run in Access? Or do you mean the passthrough query
> runs OK? If the passthrough query runs OK, then I would try an Insert
> Into statement instead of a Select * Into statement. The only catch is
> that you have to manually create the table to Insert Into first.
>
> DoCmd.RunSql "Insert into yourmanuallycreatedTbl Select * from
> passthroughQry"
>
> Rich
>
> *** Sent via Developersdexhttp://www.developersdex.com***

Hi Rich
The SP runs fine in both Access and Sybase, I will try your suggestion
of the INSERT sql statement and get back
Thanks
KC

Re: passthrough query and error 3125 (not a valid name)

am 24.01.2008 11:30:19 von KayC

On 23 Jan, 20:48, KayC wrote:
> On 23 Jan, 18:13, Rich P wrote:
>
>
>
>
>
> > Greetings,
>
> > When you say the stored procedure runs fine, do you mean it runs fine in=

> > Access? =A0Or it just runs fine in Sybase?
>
> > Does the procedure run in Access? =A0Or do you mean the passthrough quer=
y
> > runs OK? =A0If the passthrough query runs OK, then I would try an Insert=

> > Into statement instead of a Select * Into statement. =A0The only catch i=
s
> > that you have to manually create the table to Insert Into first.
>
> > DoCmd.RunSql "Insert into yourmanuallycreatedTbl Select * from
> > passthroughQry"
>
> > Rich
>
> > *** Sent via Developersdexhttp://www.developersdex.com***
>
> Hi Rich
> The SP runs fine in both Access and Sybase, I will try your suggestion
> of the INSERT sql statement and get back
> Thanks
> KC- Hide quoted text -
>
> - Show quoted text -

Hey
An update on my error, the cause of the error is due to leading spaces
in one of the columns outputted within the Stored Proc
Thanks for your suggestions
Regards
KC