Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Execute Multiple Update Statements in Oracle w/C#

Status
Not open for further replies.

VBRookie

Programmer
May 29, 2001
331
US
Hi,

I'm write a class to update data in a oracle database. I want to run multiple statements and from my understanding I can do that by just adding a semi-colon to the end of each statement.

But it appears that oracle also likes for there to be a carriage return following that semi-colon. So how do I add a carraige return to the sql string that I'm executing?

If I use /r or /n it just gets sent as part of the sql statement string and Oracle gives me an error. How do I append an actual carraige return?

Thanks in advance,
- VB Rookie
 
Could you say what are you using to access Oracle?
(I mean one or ADO/DAO/OO4O/OleDB/ODBC)

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
ADO.NET ...

I found a post that says Oracle doesn't support executing multiple statements using the semicolon outside of SQLPlus. I was getting an invalid character error until I removed the semicolon from my sql statements.

I therefore modified my class to perform a loop and execute each statement individually. Its not really the way I wanted to do it ... but it works.

Thanks, [thumbsup2]
- VBRookie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top