473,395 Members | 1,537 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,395 software developers and data experts.

Executing SQL via MDAC ODBC multiple statements?

Is it possible to execute more than one statement in SQL via MDAC
ODBC? I have a fairly complex select I wanted to create a view with,
but trying to send it all as one string with terminators ';' between
doesn't work (invalid character.) How can I do this kind of thing
from VB.NET?

Thanks in advance
Richard
Jul 19 '05 #1
2 6376
ac*****@concentric.net (Richard Adams) wrote in message news:<c2*************************@posting.google.c om>...
Is it possible to execute more than one statement in SQL via MDAC
ODBC? I have a fairly complex select I wanted to create a view with,
but trying to send it all as one string with terminators ';' between
doesn't work (invalid character.) How can I do this kind of thing
from VB.NET?


You can only execute one PL/SQL block at a time in Oracle. You may be
able to combine a number of statements into a single anonymous PL/SQL
block, though-- i.e.

declare
<<list of variables>>
begin
SQL Statement 1;
SQL Statement 2;
SQL Statement 3;
end;

When you start wanting to do this sort of thing from a client
application, however, I would strongly recommend writing a stored
procedure that does whatever you want to do and calling that stored
procedure from the client.

Justin Cave
Distributed Database Consulting, Inc.
www.ddbcinc.com/askDDBC
Jul 19 '05 #2
What I understand from you question is that you want to send multiple
SQL statement at a time.

What my question is that why you want to send all sqls in same call ,
you can rather make multiple calls to database.

Please explain in more detailed that why you need to execute all sqls
in same vb.net API call.
Faheem

jc***@ddbcinc.com (Justin Cave) wrote in message news:<c8**************************@posting.google. com>...
ac*****@concentric.net (Richard Adams) wrote in message news:<c2*************************@posting.google.c om>...
Is it possible to execute more than one statement in SQL via MDAC
ODBC? I have a fairly complex select I wanted to create a view with,
but trying to send it all as one string with terminators ';' between
doesn't work (invalid character.) How can I do this kind of thing
from VB.NET?


You can only execute one PL/SQL block at a time in Oracle. You may be
able to combine a number of statements into a single anonymous PL/SQL
block, though-- i.e.

declare
<<list of variables>>
begin
SQL Statement 1;
SQL Statement 2;
SQL Statement 3;
end;

When you start wanting to do this sort of thing from a client
application, however, I would strongly recommend writing a stored
procedure that does whatever you want to do and calling that stored
procedure from the client.

Justin Cave
Distributed Database Consulting, Inc.
www.ddbcinc.com/askDDBC

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tim Hastings | last post by:
Hello, I am using MyODBC from VB and I want to submit a batch of insert statements in one call from my App. This is more efficient than making multiple calls from code because of the...
2
by: Zach Gastineau | last post by:
I'm having problems using the DB2 Connect ODBC Driver in my SQL Server 2000 DTS packages. It started occuring after installing MDAC 2.7 (which is necessary for the .NET framework). This error...
5
by: Todd Huish | last post by:
I have noticed something disturbing when retrieving datasets over a relatively slow line (multiple T1). I am looking at about 25 seconds to retrieve 500 rows via a php-odbc link. This same select...
1
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
0
by: MLH | last post by:
The following site has a copy of mdacsdk.exeon it....
1
by: Salad | last post by:
Hi: I am developing an application using FoxPro 2.x tables. My client has AccessXP. AccessXP uses Visual Foxpro ODBC to connect to tables. It does not accept the ISAM Foxpro driver used in A97....
3
by: harp | last post by:
If one installs mdac2.8(sdk), must one also install mdac2.8 or does the sdk imply the type? I just want to write a programm with c++builder (in c++) where I just have to send (and receive results)...
2
by: Robert W. | last post by:
I'm trying to add simple database functionality with a Windows Forms app I'm building. FYI my development machine is running Windows XP Pro, with all the service packs installed. First I tried...
2
by: Richard Adams | last post by:
Is it possible to execute more than one statement in SQL via MDAC ODBC? I have a fairly complex select I wanted to create a view with, but trying to send it all as one string with terminators ';'...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.