473,785 Members | 2,553 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ods calls business object then method calls ta with output params

I have the ods calling the business object. This is the method it is calling

public DataTable GetEditManager( string tab, string state, int rows, int
pageselected, int nbrpages, string sort, byte sortdir, int totaledits, string
userid)
{
int a = nbrpages;
int b = totaledits;

if (dtProv == null)
dtProv = taProv.GetData( tab, state, rows, pageselected, ref a,
sort, sortdir, ref b, userid);
return dtProv; //dtProv is a datatable

}

Here is the header of the sp:

CREATE procedure sp_web_edit_man ager (
@tabselected varchar(5) -- which tab was selected
,@stateselected varchar(5) = null -- which state was selected, optional
,@nbr_edits int = 0 --Number of edits per page
,@page int = 1 --Which page should be returned
,@nbr_pages int =1 output --Let the app know how many pages there are
,@sort_option varchar(255) = 'edit_mast.edit _id' --How should we sort:
1=edit_id, 2=edit_name, 3=error_msg
,@desc tinyint = 0 --What is the sort order 0 = ascending, 1 = descending
,@total_edits int = 0 output --How many edits are there for this tab
,@user_id varchar(20) = 'Install'
) as

Now I need to call the stored proc which is inside of a xsd. The sp is inside
of the ta GetData. The params above nbrpages and totaledits are output params
in the sp. When I try to build the site I get this error message: cannot
convert from 'ref int' to 'out int?'. How do I get the method taProv.GetData
with its input and output params to call the stored proc?

--
Message posted via http://www.dotnetmonster.com
Jun 8 '06 #1
2 1506
Ummm, change it to out int instead of ref int?

andy6 wrote:
I have the ods calling the business object. This is the method it is calling

public DataTable GetEditManager( string tab, string state, int rows, int
pageselected, int nbrpages, string sort, byte sortdir, int totaledits, string
userid)
{
int a = nbrpages;
int b = totaledits;

if (dtProv == null)
dtProv = taProv.GetData( tab, state, rows, pageselected, ref a,
sort, sortdir, ref b, userid);
return dtProv; //dtProv is a datatable

}

Here is the header of the sp:

CREATE procedure sp_web_edit_man ager (
@tabselected varchar(5) -- which tab was selected
,@stateselected varchar(5) = null -- which state was selected, optional
,@nbr_edits int = 0 --Number of edits per page
,@page int = 1 --Which page should be returned
,@nbr_pages int =1 output --Let the app know how many pages there are
,@sort_option varchar(255) = 'edit_mast.edit _id' --How should we sort:
1=edit_id, 2=edit_name, 3=error_msg
,@desc tinyint = 0 --What is the sort order 0 = ascending, 1 = descending
,@total_edits int = 0 output --How many edits are there for this tab
,@user_id varchar(20) = 'Install'
) as

Now I need to call the stored proc which is inside of a xsd. The sp is inside
of the ta GetData. The params above nbrpages and totaledits are output params
in the sp. When I try to build the site I get this error message: cannot
convert from 'ref int' to 'out int?'. How do I get the method taProv.GetData
with its input and output params to call the stored proc?

--
Message posted via http://www.dotnetmonster.com


Jun 8 '06 #2
received errore: cannot convert from 'out int' to 'out int?'

sd********@gmai l.com wrote:
Ummm, change it to out int instead of ref int?
I have the ods calling the business object. This is the method it is calling

[quoted text clipped - 32 lines]
convert from 'ref int' to 'out int?'. How do I get the method taProv.GetData
with its input and output params to call the stored proc?


--
Message posted via DotNetMonster.c om
http://www.dotnetmonster.com/Uwe/For...p-net/200606/1
Jun 9 '06 #3

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

Similar topics

5
2024
by: Magnus Lyck? | last post by:
Something really strange is happening to me (sometimes). I'm using Python 2.3.2 on NT 4.0 as well as win32all-157, adodbapi and db_row. During a recursive call to a method, it seems Python messes up its variable bindings once in a while. Suddenly, one of several local variables gets rebound to the object it was bound to one step up in the recursion. The relevant part of the code looks like this with print statements
6
1689
by: Ivan Voras | last post by:
Can this be done: (this example doesn't work) ---- class A: def a_lengthy_method(self, params): # do some work depending only on data in self and params class B:
1
1279
by: craigkenisston | last post by:
Hi, I'm trying to create a generic function to call stored procedures in a SQL Server database. I'm passing the params, values and the direction of the params in arrays. The function is working, and I get the output parameters values back in my the array I sent, however, I'd like to have the values in my original variables, please see below :
1
3141
by: Darsin | last post by:
Hi all, I am a new programmer to C# and i am having a following problem. I want to make a single method which takes a variable length array and display it contents. i have defined the method as: public void DisplayVals(params object objArray) { foreach (object o in objArray) Console.WriteLine(o.ToString()); }
7
8494
by: The Crow | last post by:
code snippet below briefly shows what i need to do : public void Method1(params object args) { Method2(args); } public void Method2(params object args) { //Do something.
9
6263
by: Hasan O. Zavalsiz | last post by:
Hi , i am trying to figure out which approach is better to use . let me explain the scenario. i am using the "Nortwind" database . in this database i have "Customers " table .The following is the two different ways to handle this table. CASE 1 : create a struct that encaplusates table "Customers" columns public struct structCustomers { public string CustomerID;
6
2211
by: Pucca | last post by:
I have a program that originally compiles into a exe file. I changed the compile option to generate dll file. This program calls a com component. Can I use pinvoke in C# to call it? The following is the main dll file. #include "stdafx.h" #define MAX_ADSPATH_CHARS 2048 //*************************************************************************** // local function prototypes
1
1974
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi... There are a few questions wrapped up in this, but the main one is that the WebService.MyMethodAsync() methods that are automatically generated in the client code by VS 2005 don't seem to be finishing for me. We have a VS add-in written in .net that used to make a number of database calls to fill forms. To improve security, we moved the db calls to a web service and return DataSets for the calls (the result sets are always...
8
1217
by: carton | last post by:
Any opinions on this code as part of a general purpose framework? I expect people will have varying opinions on the use of $ in the property names. I did it for several reasons: 'interface' is reserved, I didn't want to step on 'constructor', and a 'prototype' property on a non-function might be confusing. Gadget is a usage example to make it easier to follow what I'm doing.
0
9480
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
10324
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...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8971
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
7499
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
5380
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
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
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.