472,371 Members | 1,575 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,371 software developers and data experts.

ADODB Command parameter error !

Hi all !

I've created a .net serviced component with only one method. This method
receive an ADODB.Command object and execute it.
The ADODB.Command object is created in the client process. (VB for example).

When I try to set the connection property or try to open a recordset using
the Command object I've got an error.

Here is the mehotd code for the connection set error:

public ADODB.Recordset ExecuteCommand(ADODB.Command cmd)
{

ADODB.Recordset rst = new RecordsetClass();

cmd.ActiveConnection = cnn; <------------ Argument invalid error here !
cnn is an ADODB.Connection already created and opened !

rst.CursorLocation = CursorLocationEnum.adUseClient;

object o = System.Reflection.Missing.Value;

rst.Open(cmdnew, o, ADODB.CursorTypeEnum.adOpenStatic,
ADODB.LockTypeEnum.adLockReadOnly, -1);

return rst;

}

Here is the mehotd code for the "OLE IDispatch Provider: no such interface
supported" error:

public ADODB.Recordset ExecuteCommand(ADODB.Command cmd)
{

ADODB.Recordset rst = new RecordsetClass();

rst.CursorLocation = CursorLocationEnum.adUseClient;

//---- the following line produces that error. If I change the cmdnew
Command object with a select string ("select * from ...), works fine !
rst.Open(cmdnew, cnn, ADODB.CursorTypeEnum.adOpenStatic,
ADODB.LockTypeEnum.adLockReadOnly, -1);

return rst;

}

Any Ideas ? Any comment or tip will be apreciated !

TIA,

--
Andre Azevedo


Nov 15 '05 #1
0 3101

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sandie Towers | last post by:
We use a number of similar databases and frequently create a new database using a backup restore of another similar database. We try to keep changes between databases in _Additional tables - like...
1
by: Jonathan Presnell via .NET 247 | last post by:
I am trying to insert some data into a sql server 2000 databaseusing c#.net. I am getting the following error message: SQL Error 8178: Prepared Statement ..... expects @Param1, whichwas not...
1
by: tina | last post by:
Hello, I would really appreciate some help. I am still learning VBA and I feel like my brain is fried already. Below I am trying to run a query and do a loop. I actually get the data set but...
0
by: Manuel Arroba | last post by:
asp.net oledb command parameter error calling an as400 program Hi... I have an as400 program that I can call it directly and it works: variable= "xxxx" sql = "CALL METSIGOP.SIGOPRC ('" +...
1
by: Khodr | last post by:
Hi everyone, I am calling an Oracle StoredProc that returns a CLOB data type value as an output parameter. What parameter data type should I use? >> I tried adLongVarChar and adVarChar with the...
8
by: Ben | last post by:
Hi! I already sent this to the ACCESS newsgroup. But since I do not know really which side is really causing the problem, I have decided to send this inquiry to this newsgroup also, if I may....
1
by: DragonFields | last post by:
I'm hoping someone can help me. I keep receiving the ADODB.Command error '800a0cc1' error (Item cannot be found in the collection corresponding to the requested name or ordinal.) I found a couple...
0
by: itamar82 | last post by:
I have a SP running on mssql server 2005. When I try to execute the SP through asp I receive back an error that the parameter @City is not supplied, although I clearly do supply it. Here is my...
2
by: jmartmem | last post by:
I have this very confounding connections problem that I hope someone can help me with. I've created an ASP page (pic.asp). On this page I used the Record Insertion Form Wizard to insert a Data...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.