Re: Oracle input parameter of type string problem
From: Cowboy \(Gregory A. Beamer\) (NoSpamMgbworld_at_comcast.netNoSpamM)
Date: 01/19/05
- Next message: The God's Awful Truth: "Re: Copy a dataset to a new dataset with new records"
- Previous message: Cowboy \(Gregory A. Beamer\): "Re: Oracle input parameter of type string problem"
- In reply to: Cowboy \(Gregory A. Beamer\): "Re: Oracle input parameter of type string problem"
- Next in thread: Vladimir Sergeyev [MS]: "Re: Oracle input parameter of type string problem"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 18 Jan 2005 21:55:19 -0600
BTW, the syntax of my sproc may not be 100% correct. It has been a few
months since I have coded in Oracle and I typed the syntax from memory.
Check it with a PL/SQL manual before running.
-- Gregory A. Beamer MVP; MCP: +I, SE, SD, DBA ************************************************* Think outside the box! ************************************************* "Cowboy (Gregory A. Beamer)" <NoSpamMgbworld@comcast.netNoSpamM> wrote in message news:ORVogid$EHA.1292@TK2MSFTNGP10.phx.gbl... > In particular, this is a PL/SQL specific param: > > :pYear > > With the standard OleDb provider, I believe it is safe to use @Year or ? > (know the ? works for Access, but have not tried with Oracle). I prefer > the following: > > CREATE OR REPLACE PROCEDURE MyProc > ( > year IN int > , OutCur OUT Types.Cursor > ) > AS > > OPEN OutCur FOR > SELECT DRE_YEAR FROM DENSEREPORT > WHERE DRE_YEAR = pYear; > > END; > / > > My syntax may be off a bit, but you can then create two params, one for > the year and one for the cursor (if OracleClient (not 10g)). If OleDb, you > do not need an out param for the cursor, as the OleDb namespace objects > automagically hook up. > > The ODP.NET download is still the best object. remember the Microsoft > objects are either a) a bit generic (OleDb) or old (8i in the case of > OracleClient). > > -- > Gregory A. Beamer > MVP; MCP: +I, SE, SD, DBA > > ************************************************* > Think outside the box! > ************************************************* > "brisers" <brisers@discussions.microsoft.com> wrote in message > news:57BDE367-BE0C-40C9-8C92-D6577C2BAF26@microsoft.com... >> Gregory, thanks for taking the time to help me out. >> >> Are you suggesting that my query is not in the correct syntax? How would >> I >> need to change it? I assumed it was possible to use parameterized queries >> with the OracleClient. I have done so before, using a numeric parameter. >> >> As for using stored procedures with Oracle client, do you have a >> reference >> to some resources to explain how to code the solution you suggested? >> >> kind regards >> >> Brian >> >> > >
- Next message: The God's Awful Truth: "Re: Copy a dataset to a new dataset with new records"
- Previous message: Cowboy \(Gregory A. Beamer\): "Re: Oracle input parameter of type string problem"
- In reply to: Cowboy \(Gregory A. Beamer\): "Re: Oracle input parameter of type string problem"
- Next in thread: Vladimir Sergeyev [MS]: "Re: Oracle input parameter of type string problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|