(username/password/database name/servername/DSN name) is specified wrong.
You don't need to use TRY/CATCH block for this explicitely.
However, you can use TRY/CATCH block while using resultset or statements.
Regards
Harsh
On 3/17/06, Ronnie Lu <[EMAIL PROTECTED]> wrote:
>
> Dear Liviu,
>
> Thanks for your example.
> Do you know how to catch the ODBC connection error in Axapta? Such as
> wrong username or password. It seems that the code in catch section will not
> be executed.
>
> Any help would be appreciated.
>
> Thanks
> Ronnie
>
> LIVIU STOICA <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> An OciConnection establishes a database connection using Oci (Oracle Call
> Interface).
>
> Within the context of an OciConnection, SQL statements are executed and
> results are returned
>
> Example{ loginProperty LoginProperty = new LoginProperty();
> ociConnection ociConnection;
> statement stmt;
> resultSet res;
> ;
> LoginProperty.setServer("ORACLETESTSRV");
> LoginProperty.setDatabase("AXDB");
> LoginProperty.setUsername("TEST");
> LoginProperty.setPassword("TEST_PWD");
>
> try
> {
> ociConnection = new ociConnection(LoginProperty);
> }
> catch
> {
> print "Unable to establish connection with database";
> return;
> }
>
> stmt = ociConnection.createStatement();
> res = stmt.executeQuery("SELECT empName FROM emp");
> while (res.next())
> print res.getString(1);
>
> pause;
> }
> Best regards,
> Liviu
>
> daniellim_yh <[EMAIL PROTECTED]> wrote:
> hi there,
>
> anyone have idea how to call an oracle 9's stored procedure? from
> connection setup until the calling syntax?thx in advance.
>
>
> daniel
>
>
>
>
>
>
>
>
> SPONSORED LINKS
> Computer part Programming languages Microsoft axapta
> Support exchange
>
> ---------------------------------
> YAHOO! GROUPS LINKS
>
>
> Visit your group "development-axapta" on the web.
>
> To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
> ---------------------------------
>
>
>
>
>
> ---------------------------------
> Yahoo! Mail
> Bring photos to life! New PhotoMail makes sharing a breeze.
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
> SPONSORED LINKS
> Computer part Programming languages Microsoft axapta
> Support exchange
>
> ---------------------------------
> YAHOO! GROUPS LINKS
>
>
> Visit your group "development-axapta" on the web.
>
> To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
> ---------------------------------
>
>
>
>
>
> ---------------------------------
> Brings words and photos together (easily) with
> PhotoMail - it's free and works with Yahoo! Mail.
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
[Non-text portions of this message have been removed]
SPONSORED LINKS
| Computer part | Programming languages | Microsoft axapta |
| Support exchange |
YAHOO! GROUPS LINKS
- Visit your group "development-axapta" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

