473,597 Members | 2,190 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.ActiveConne ction = cnn; <------------ Argument invalid error here !
cnn is an ADODB.Connectio n already created and opened !

rst.CursorLocat ion = CursorLocationE num.adUseClient ;

object o = System.Reflecti on.Missing.Valu e;

rst.Open(cmdnew , o, ADODB.CursorTyp eEnum.adOpenSta tic,
ADODB.LockTypeE num.adLockReadO nly, -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.CursorLocat ion = CursorLocationE num.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.CursorTyp eEnum.adOpenSta tic,
ADODB.LockTypeE num.adLockReadO nly, -1);

return rst;

}

Any Ideas ? Any comment or tip will be apreciated !

TIA,

--
Andre Azevedo


Nov 15 '05 #1
0 3264

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

Similar topics

1
11577
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 Account Additional, Sale_Additional so most tables stay the same. The latest restored database (I'll call it DBaseA) is behaving differently in VB6 code and I need help trying to make it work. I have been using use an ADODB.Command to execute...
1
9594
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 supplied. Here is the code snippet where all the work takes place: private void btnSave_Click(object sender, System.EventArgs e) { int time = 0; sqlInsertCommand1.CommandType = CommandType.Text;
1
11870
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 then I get this error when I am trying to execute "Command text was not set for the command object." What is wrong? How can I make this work? Thank you very much.
0
1442
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 ('" + variable + "')" Dim con As OleDbConnection Dim cmd As OleDbCommand con = New OleDbConnection()
1
4579
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 sizes 1000, 32000, 1000000 and they all fail. Size of returned value will exceed 50k. >> I know that there is a GetChunk, but I noticed that it applies only to SELECT statement. In my case, I have a StoredProc. >> I am using ADODB version 2.7 >>...
8
11677
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. Below is the environment of the application: a. MS Access 2003 application running on Windows XP b. SQL Server 2000 - backend running MS Server 2003 OS
1
8863
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 similar errors on the discussions but am not tracking how to apply the fixes into my code, which of course is slightly different...I'm using Visual Interdev 6.0 with MS SQL Enterprise Mgr 8.0. I'm linking an .asp page to a stored procedure and I've...
0
1466
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 code: SP: CREATE PROCEDURE . @Id int output, @Name varchar(100), @Comments text = NULL,
2
14199
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 Object on this page, which contains a number of controls in an Access 2007 database table. Once created, I filled in sample data in a few text fields and tested whether or not I could insert a record, but I keep getting a 'This page cannot be...
0
7887
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8274
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8036
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6695
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5847
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5434
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3886
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3930
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1241
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.