I got object reference not set, is the connection string wrong? Indeed, I
know int values should be pass to Open() and Execute() method, but don't
know the parameter variable given by .net.
Any help?
// dsn: system dsn
// database: is the database instance used
string connectionStrin g = "dsn=ccbsdb;dat abase=testdb";
String strSQL = "INSERT INTO Outbound (JobID, XMLRequest, DMCUserID,
SubmissionUserI D, Priority, OutboundType) " +
"VALUES( 111, 'XML Request', 'DMCUserID', 'SubmissionUser ID', 1, 2 );";
// Create the command object
ADODB.Command cmdAdder = new ADODB.CommandCl ass();
cmdAdder.Active Connection.Open (connectionStri ng, "sa", "ccbs", 1);
// Start transaction
cmdAdder.Active Connection.Begi nTrans();
// Execute the SQL command
cmdAdder.Comman dText = strSQL;
object rs = new object();
object objParam = new Object();
// Insert into OutboundQueueIt em
cmdAdder.Execut e(out rs, ref objParam , 1);
// commit transaction
cmdAdder.Active Connection.Comm itTrans();
know int values should be pass to Open() and Execute() method, but don't
know the parameter variable given by .net.
Any help?
// dsn: system dsn
// database: is the database instance used
string connectionStrin g = "dsn=ccbsdb;dat abase=testdb";
String strSQL = "INSERT INTO Outbound (JobID, XMLRequest, DMCUserID,
SubmissionUserI D, Priority, OutboundType) " +
"VALUES( 111, 'XML Request', 'DMCUserID', 'SubmissionUser ID', 1, 2 );";
// Create the command object
ADODB.Command cmdAdder = new ADODB.CommandCl ass();
cmdAdder.Active Connection.Open (connectionStri ng, "sa", "ccbs", 1);
// Start transaction
cmdAdder.Active Connection.Begi nTrans();
// Execute the SQL command
cmdAdder.Comman dText = strSQL;
object rs = new object();
object objParam = new Object();
// Insert into OutboundQueueIt em
cmdAdder.Execut e(out rs, ref objParam , 1);
// commit transaction
cmdAdder.Active Connection.Comm itTrans();
Comment