473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Syntax Conundrum

2
Here's my problem, and I surely hope it's best that I post this here, rather than on the SQL Server board.

I have a SQL Server stored procedure that is set up as follows:

Insert Into myTable Select * from firstTable

This will insert the values from firstTable into myTable, and it will work through everything but access.

In access I use the .execute() method with a QueryDef, i get an error saying that it cannot execute a "select" query because this returns rows. This is not the case, because the select is actually being inserted into the temporary table.

Any ideas as to how I can trick access into seeing this Stored Procedure for what it truly is?

Thanks for all of your help.
May 8 '07 #1
4 1188
MMcCarthy
14,534 Expert Mod 8TB
You have posted this question in the Articles section. I am moving it to the Access forum.

ADMIN
May 8 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
Access won't accept the syntax ...

Expand|Select|Wrap|Line Numbers
  1.  Insert Into myTable Select * from firstTable
You will have to actually name the columns.

Expand|Select|Wrap|Line Numbers
  1.  Insert Into myTable (Column1, Column2) Select Column1, Column2 from firstTable
This will work with RunSQL
May 8 '07 #3
MMcCarthy
14,534 Expert Mod 8TB
Access won't accept the syntax ...

Expand|Select|Wrap|Line Numbers
  1.  Insert Into myTable Select * from firstTable
You will have to actually name the columns.

Expand|Select|Wrap|Line Numbers
  1.  Insert Into myTable (Column1, Column2) Select Column1, Column2 from firstTable
This will work with RunSQL
It should work with .Execute as well.
May 8 '07 #4
NeoPa
32,556 Expert Mod 16PB
Here's my problem, and I surely hope it's best that I post this here, rather than on the SQL Server board.

I have a SQL Server stored procedure that is set up as follows:

Insert Into myTable Select * from firstTable

This will insert the values from firstTable into myTable, and it will work through everything but access.

In access I use the .execute() method with a QueryDef, i get an error saying that it cannot execute a "select" query because this returns rows. This is not the case, because the select is actually being inserted into the temporary table.

Any ideas as to how I can trick access into seeing this Stored Procedure for what it truly is?

Thanks for all of your help.
To execute a remote SP in SQL from Access you need to do it as a Pass-Through query (which is explicitly SQL).
May 8 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
22
by: Tuang | last post by:
I'm checking out Python as a candidate for replacing Perl as my "Swiss Army knife" tool. The longer I can remember the syntax for performing a task, the more likely I am to use it on the spot if...
14
by: Sandy Norton | last post by:
If we are going to be stuck with @decorators for 2.4, then how about using blocks and indentation to elminate repetition and increase readability: Example 1 --------- class Klass: def...
16
by: George Sakkis | last post by:
I'm sure there must have been a past thread about this topic but I don't know how to find it: How about extending the "for <X> in" syntax so that X can include default arguments ? This would be very...
19
by: Nicolas Fleury | last post by:
Hi everyone, I would to know what do you think of this PEP. Any comment welcomed (even about English mistakes). PEP: XXX Title: Specialization Syntax Version: $Revision: 1.10 $...
4
by: Jim Ford | last post by:
I have a single C file with the following code: int f2() { /* Blah-blah */ } int f1() { /* Blah-blah */
4
by: Jim Owen | last post by:
I am storing all my application data in the application cache. Anytime I have a method as part of an asp.net form, I need to access the objects in the cache. The only way I can think of to do this...
3
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very...
2
by: subnunciation | last post by:
i know, this shouldnt be a conundrum right? one just shouldnt divide by zero. but this is suddenly happening *all over* my site. after chasing the error here and there, i simplified things down to:...
3
by: carllucas | last post by:
I'm having issues trying to pass a variable basically I get information from an external xml document like this function run(file) { t = file.getElementsByTagName("category"); for(i=0;...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.