Search Results

Search found 15081 results on 604 pages for 'passing by reference'.

Page 37/604 | < Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >

  • Parameter passing Vs Table Valued Parameters Vs XML to SQL 2008 from .Net Application

    - by Harryboy
    As We are working on a asp .net project there three ways one can update data into database when there are multiple rows updation / insertion required Let's assume we need to update employee education detail (which could be 1,3,5 or 10 records) Method to Update Data Pass value as parameter (Traditional approach), If 10 records are there then 10 round trip required Pass data as xml and write logic inside your stored procedure to get that data from xml and update the table (only single roundtrip required) Use Table valued parameters (only single roundtrip required) Note : Data is available as List, so i need to convert it to xml or any other format if i need to pass. There are no. of places in entire application we need to update data in bulk (or multiple records) I just need your suggestions that Which method will be faster (please mention if there are some other overheads) Manageability or testability concern with any approach Any other bottleneck or issue with any of the approach (Serialization /Deserialization concern or limit on size of the data passing) Any other method you suggest for same operations Thanks

    Read the article

  • Passing data from a View to a controller in ASP.Net MVC

    - by kingrichard2005
    Hello, I have a dictionary I'm passing to a View. I want to be able to pass the values of that dictionary back to a Controller action from this same View. Is there anyway this can be accomplished without using a form? The situation is that I need to be able to pass these back to a controller action that is called when a user clicks an ActionLink from the View, and in my experience an ActionLink cannot be used to submit a values of a form, i.e. I've only been able to submit values of a form using the form's submit button. Unless there's a way to use an ActionLink to submit values in a form.

    Read the article

  • Why do i get a circular reference exception when calling to_json on an ActiveRecord::Relation

    - by midas06
    In Rails 3 (beta 3 on 1.8.7), when calling to_json on a relation i get a circular reference exception. Converting that relation to an array first, and THEN calling to_json works. Code That fails: Model.where().to_json (Where model is any model in your Rails 3 app) Code that works: Model.where().to_a.to_json This can be reproed on the console. Has anyone else run in to this? Is this expected?

    Read the article

  • MYSQL join - reference external field from nested select?

    - by PHP thinker
    Is it allowed to reference external field from nested select? E.g. SELECT FROM ext1 LEFT JOIN (SELECT * FROM int2 WHERE int2.id = ext1.some_id ) as x ON 1=1 in this case, this is referencing ext1.some_id in nested select. I am getting errors in this case that field ext1.some_id is unknow. Is it possible? Is there some other way?

    Read the article

  • Control Reference Static Method Performance

    - by dotnetguts
    I have just asked which one is better? Static Vs Non-Static? http://stackoverflow.com/questions/3016717/static-vs-non-static-method-performance-c I would like to take this discussion one step ahead. Consider If i pass reference of Panel control as parameter to Public static method, will static method still rules in performance?

    Read the article

  • Passing Auth to API calls with Web Service References

    - by coffeeaddict
    I am new to web services. The last time I dealt with SOAP was when I created a bunch of wrapper classes that sent requests and received responses back per some response objects/classes I had created. So I had an object to send certain API requests and likewise a set of objects to hold the response back as an object so I could utilize that 3rd party API. Then someone came to me and said why not just use the wsdl and a web service. Ok, so today I went and created a "Service Reference". I see that this is what's called a "Proxy Class". You just instantiate an instance of this and then walla you have access to all the methods from the wsdl. But this leaves me with auth questions. Back when I created my own classes manually, I had a class which exposed properties that I would set then access for things like signature, username, password that got sent along with the Http request that were required by whatever 3rd party API I was using to make API calls. But then with using a Service Reference, how then would I pass this information just like I had done in my custom classes? For instance I'm going to be working with the PayPal API. It requires you to send a signature and a few other pieces of information like username and password. // Determins if API call needs to use a session based URI string requestURI = UseAuthURI == true ? _requestURIAuthBased + aSessionID : _requestURI; byte[] data = XmlUtil.DocumentToBytes(doc); // Create the atual Request instance HttpWebRequest request = CreateWebRequest(requestURI, data.Length); So how do I pass username, password, signature, etc. when using web service references for each method call? Is it as simple as specifying it as a param to the method or do you use the .Credentials and .URL methods of your proxy class object? It seems to me Credentials means windows credentials but I could be wrong. Is it limited to that or can you use that to specify those required header values that PayPal expects with each method call/API request?

    Read the article

  • C++ undefined reference

    - by klaus-johan
    Hi , My problem is the following : I have a class A that inherits from an abstract base class. I override all the virtual functions from the base class, and I have a constructor like this : A::A(B* b) { this->b=b; } In the constructor of class B , I have the following piece of code: A* a=new A(this) However this line of code gives the error : undefined reference to 'A::A(B*)' I have absolutly no idea why could this be happening , so any suggestion would be greatly appreciated !

    Read the article

  • Modify a reference numbered group to match against

    - by StuperUser
    I want to match YYYY-YY for sequential years. I at moment I'm trying to match where all the second YY is the 3rd and 4th characters in YYYY with 1 added to it. So far I've got {19|20}(\d{2})-(\d{2}), but not sure how to use ? with reference to (1) or whether I'm going about this the right way and finding out the inevitable "unknown unknowns" (like YY99) with this approach? Edit: Matches: 2010-11,2011-12,2029-30 Not matches: 2010-12, 2010-09,2011-2,2011-2012

    Read the article

  • win32:libs undefined reference

    - by hector
    I want to link a .lib in my Qt project and I get an error about an undefined reference to vhtIOConn::getDefault(vhtIOConn::DeviceType). I have already added the following specifications to the .pro file: ###################################################################### # Automatically generated by qmake (2.01a) vie 28. ago 12:48:10 2009 ###################################################################### TARGET = DEPENDPATH += . INCLUDEPATH += . LIBS += "C:\agregar\VirtualHandCore.lib" LIBS += "C:\agregar\VirtualHandDevice.lib" LIBS += "C:\agregar\VirtualHandRegistry.lib" # Input HEADERS += "C:/Documents and Settings/halvarado/Mis documentos/respaldos de Qt/Development/include/vhandtk/vhtBase.h" SOURCES += main.cpp What should I do?

    Read the article

  • passing structure directly to function

    - by ra170
    I have a struct that I initialize like this: typedef struct { word w; long v; } MyStruct; MyStruct sx = {0,0}; Update(sx); Now, it seems such a waste to first declare it and then to pass it. I know that in C#, there's a way to do everything in one line. Is there any possiblity of passing it in a more clever (read: cleaner) way to my update function?

    Read the article

  • How to reference an anonymous JavaScript function?

    - by ProfK
    I'm trying to call a Page Method using a jQuery 'attached' event function, in which I like to use the closure to keep the event target local, as below, but page method calls declare several 'error' functions, and I would like to use one function for all of them. If, in the below code, I was handling an error and not success, how could I use my single, anonymous handler for all 3 error functions? $(":button").click(function () { var button = this; PageMethods.DoIt( function (a, b, c) { alert(button); }); }); This example passes an anonymous function for the success callback. There is only one of these. If I was passing an error callback, how could I use 'function (e, c, t)' for all 3 error callbacks?

    Read the article

  • External project reference in android

    - by bryan costanich
    Hi all, I have an android application that utilizes another project as a project reference. i've gone into the application options, build path, and then selected the project in project references. everything builds and deploys fine, but when i try to run the application and instantiate a class in that project, i'm getting a java.lang.NoClassDefFoundError errrrrr. i'm no java project expert, so i assume i've cocked something simple up. any ideas?

    Read the article

  • Passing arguments to anonymous inner classes

    - by synic
    I'm trying to make an API library for our web services, and I'm wondering if it's possible to do something like this: abstract class UserRequest(val userId: Int) { def success(message: String) def error(error: ApiError) } api.invokeRequest(new UserRequest(121) { override def success(message: String) = { // handle success } override def error(error: ApiError) = { // handle the error } } I'm talking about passing parameters to the anonymous inner class, and also overriding the two methods. I'm extremely new to Scala, and I realize my syntax might be completely wrong. I'm just trying to come up with a good design for this library before I start coding it. I'm willing to take suggestions for this, if I'm doing it the completely wrong way, or if there's a better way. The idea is that the API will take some sort of request object, use it to make a request in a thread via http, and when the response has been made, somehow signal back to the caller if the request was a success or an error. The request/error functions have to be executed on the main thread.

    Read the article

  • pass array by reference in c

    - by Yassir
    How can I pass an array of struct by reference ? example : struct Coordinate { int X; int Y; }; SomeMethod(Coordinate *Coordinates[]){ //Do Something with the array } int main(){ Coordinate Coordinates[10]; SomeMethod(&Coordinates); }

    Read the article

  • Passing a JavaScript variable to a helper method

    - by Brendan Vogt
    I am using ASP.NET MVC 3 and the YUI library. I created my own helper method to redirect to an edit view by passing in the item's ID from the Model as such: window.location = '@Url.RouteUrl(Url.NewsEdit(@Model.NewsId))'; Now I am busy populating my YUI data table and would like to call my helper method like above, not sure if it is possible because I get the item's ID by JavaScript like: var formatActionLinks = function (oCell, oRecord, oColumn, oData) { var newsId = oRecord.getData('NewsId'); oCell.innerHTML = '<a href="/News/Edit/' + newsId + '">Edit</a>'; };

    Read the article

  • passing string literal to std::map::find(..)

    - by ra170
    I've got a std::map. I'm passing string literal to find method. Obviously, I can pass a string literal such as .find("blah"); However, I wanted to declare it upfront, instead of hardcoding the string, so I have couple of choices now: const std::string mystring = "blah"; const char mystring[] = "blah"; static const char * mystring = "blah"; They all work. (or at least compile). My question is, which one should I use? what's the advantage/distavantage over of the other?

    Read the article

  • passing parameter to view in IOS after a button is pressed

    - by ghostrider
    I am new to IOS programming. So far I have been programming in android. So in android when pressing a button code for passing an argument would be like that: Intent i = new Intent(MainScreen.this,OtherScreen.class); Bundle b = new Bundle(); b.putString("data_1",data); i.putExtras(b); startActivity(i); and on the activity that opens, i would write something like this: Bundle b = getIntent().getExtras(); ski_center=b.getString("data_1"); what methods should I need to change in MainScreen and in OtherScreen in IOS to achieve the above. Basically I will have 3 buttons lets say in my MainScreen and each of it will open the Otherview but each time a different parameter will be passed. Foe example for each button i have code like these in MainScreen.m @synthesize fl; -(IBAction) ifl:(id) sender { } So I need your help in where to place the "missing" code, too.

    Read the article

< Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >