Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Ado Data RDS > RDS Questions.....
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 298 of 305
Post > Topic >>

RDS Questions...

by =?Utf-8?B?RmVyZ2FyZA==?= <Fergard@[EMAIL PROTECTED] > Sep 19, 2007 at 03:38 AM

Hi,

I want to use RDS for my applications to provide data access to remote SQL

Server 2000 database. Everything works just fine, but I have encountered
some 
problems that I cannot resolve:

So I have stored procedure that looks like this:
CREATE     PROCEDURE TestInputOutput
	@[EMAIL PROTECTED]
 int out,
	@[EMAIL PROTECTED]
 int out,
	@[EMAIL PROTECTED]
 int
AS
	SELECT @[EMAIL PROTECTED]
 = 2
	SELECT @[EMAIL PROTECTED]
 = 3
	return

And a simple programm code written on C#:
                ADODB.Connection cn = new ADODB.ConnectionClass();
                cn.Open("Provider=MS Remote;Remote 
Server=http://server;Handler=MSDFMAP.Handler;Data
Source=MyPubsConn",
null, 
null, 0);
                //cn.Open("Provider=SQLOLEDB.1;Data Source=(local);Initial

Catalog=catalog;User ID=user;Password=password", null, null, 0);
                ADODB.Command com = new ADODB.CommandClass();
                com.CommandType = ADODB.CommandTypeEnum.adCmdText;
                com.CommandText = "exec TestInputOutput ? out, ? out, ?";
                com.ActiveConnection = cn;
                ADODB.Parameter par = new ADODB.ParameterClass();
                par = com.CreateParameter("@[EMAIL PROTECTED]
", 
ADODB.DataTypeEnum.adInteger, 
ADODB.ParameterDirectionEnum.adParamInputOutput, 4, 330);
                com.Parameters.Append(par);
                par = com.CreateParameter("@[EMAIL PROTECTED]
", 
ADODB.DataTypeEnum.adInteger, 
ADODB.ParameterDirectionEnum.adParamInputOutput, 4, 1);
                com.Parameters.Append(par);
                par = com.CreateParameter("@[EMAIL PROTECTED]
", 
ADODB.DataTypeEnum.adInteger, ADODB.ParameterDirectionEnum.adParamInput,
4, 
DBNull.Value);
                com.Parameters.Append(par);
                object recAffected = Type.Missing;
                object pars = new object[3] { 330, 1, 1 };
                com.Execute(out recAffected, ref recAffected, 0);
                cn.Close();

1. When I try to use InputOutput or Output Parameter when executing stored

procedure - MS REMOTE returns me "an unexpected error". With Input
Parameters 
everything works OK and if I use that commented connection string it works

fine also. So, does RDS sup****ts Output Parameters?

2. if I supply DBNull.Value as a value of any parameter I get an error 
"Procedure 'TestInputOutput' expects parameter '@[EMAIL PROTECTED]
', which was not 
supplied." Of course with native SQLOLEDB Provider everything works fine.
I 
think that it must sup****t null values for the parameter. Of course I can 
avoid this problem by setting default values for parameters in stored 
procedure, but it's not what I want to do really.

3. this one is not critical, but MS REMOTE returns "an unexpected error"
if 
you try to set parameter's Attribute value to 
AdoEnums.ParameterAttributes.LONG for binary data parameter.

So I want to know can it be fixed, or may be I'm doing something wrong
with 
it.

I'm looking forward to hearing from you.

Fergard
 




 1 Posts in Topic:
RDS Questions...
=?Utf-8?B?RmVyZ2FyZA==?=   2007-09-19 03:38:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 15:40:27 CST 2008.