The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 error trapping and adodb connection

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
peter.cook Posted - 11/24/2003 : 04:57:00 AM
Hi,

I am trying to error trap and adodb connection such that my C code doesn't crash out.

eg

SQLString = "select * table";
ocrs = CreateObject("ADODB.Recordset");
ocrs.open(SQLString, "Provider=msdaora; Data Source=Source; User ID=UserID; Password=Password;");


specifically the line ocrs.open...

Any assist would be appreciated.

On a general theme, how can you do error trapping with Origin C?

Thanks,

Cheers,

Pete

2   L A T E S T    R E P L I E S    (Newest First)
peter.cook Posted - 11/24/2003 : 10:05:29 AM
Thanks CP.

Tried searching through help for 'error trapping', 'error trap' and only came up with erroproc macro. I guess this is standard C++?

Cheers,

Pete

cpyang Posted - 11/24/2003 : 08:25:01 AM
Use try catch,

 
SQLString = "select * table";
ocrs = CreateObject("ADODB.Recordset");
try {
ocrs.open(SQLString, "Provider=msdaora; Data Source=Source; User ID=UserID; Password=Password;");
}
catch(int nErr)
{
// err handling
}
// continue with other codes



The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000