Access Crash Calling Procedure with 3+ Parameters.Add -
11-07-2007
, 06:44 AM
Strangest thing.
I've got an Oracle back-end, and an Access 2000 front-end.
I start a blank database. No objects except for one form, with one
button. Button calls a Send Email procedure on my Oracle server.
This call works fine with ADO, except it is a little slow. So I wanted
to try calling it via OO4O.
Everytime I run the OO4O code, Access crashes and tells me
"MSACCESS.EXE generated errors and will closed by Windows. An error
log is being created"
I figured out that Access crashes only if I try to add more than 2
parameters. My code is below. If I have two
"OraDatabase2.Parameters.Add" lines, it works fine. As soon as I add a
third, Access crashes
Dim OraSession2 As OracleInProcServer.OraSessionClass
Dim OraDatabase2 As OracleInProcServer.OraDatabase
Set OraSession2 = CreateObject("OracleInProcServer.XOraSession")
Set OraDatabase2 = OraSession2.OpenDatabase("myserver", "account/
pw", 0&)
OraDatabase2.Parameters.Add "Sender", "myemail (AT) email (DOT) com",
ORAPARM_INPUT
OraDatabase2.Parameters.Add "recipient", Recipient_Emails,
ORAPARM_INPUT
'************************************************* *
'Everything above runs fine
'Adding any of the two parameters below will cause the crash
'************************************************* *
OraDatabase2.Parameters.Add "p_subject", Email_Subject,
ORAPARM_INPUT
OraDatabase2.Parameters.Add "message", Email_Message,
ORAPARM_INPUT
Any ideas?
Thanks,
Chris |