Search Results

Search found 17501 results on 701 pages for 'stored functions'.

Page 43/701 | < Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >

  • Change default Console I/O functions handle.

    - by b-gen-jack-o-neill
    Hello. Is it possible to somehow change standart I/O functions handle on Windows? Language preffered is C++. If I understand it right, by selecting console project, compiler just pre-allocate console for you, and operates all standart I/O functions to work with its handle. So, what I want to do is to let one Console app actually write into another app Console buffer. I though that I could get first´s Console handle, than pass it to second app by a file (I don´t know much about interprocess comunication, and this seems easy) and than somehow use for example prinf with the first app handle. Can this be done? I know how to get console handle, but I have no idea how to redirect printf to that handle. Its just study-purpose project to more understand of OS work behind this. I am interested in how printf knows what Console it is assiciated with.

    Read the article

  • ASP.Net Architecture Specific to Shared/Static functions

    - by Maxim Gershkovich
    Hello All, Could someone please advise in the context of a ASP.Net application is a shared/static function common to all users? If for example you have a function Public shared function GetStockByID(StockID as Guid) as Stock Is that function common to all current users of your application? Or is the shared function only specific to the current user and shared in the context of ONLY that current user? So more specifically my question is this, besides database concurrency issues such as table locking do I need to concern myself with threading issues in shared functions in an ASP.Net application? In my head; let’s say my application namespace is MyTestApplicationNamespace. Everytime a new user connects to my site a new instance of the MyTestApplicationNamespace is created and therefore all shared functions are common to that instance and user but NOT common across multiple users. Is this correct?

    Read the article

  • using operators and functions for sql report charts (visual studio 2010)

    - by user1682566
    I want to create some charts using sql reporting services. But i am unable to use a lot of functions and operators in combination with my data-fields the following work(Stroke-data type is decimal): > =Fields!Stroke.Value > =Sum(Fields!Stroke.Value) > =First(Fields!Stroke.Value) > =Last(Fields!Stroke.Value) > =2+2394.12 the following dont work: > =Fields!Stroke.Value + 2 > =CStr(Fields!Stroke.Value) > =CDbl(Fields!Stroke.Value) > =Fields!Stroke.Value / Fields!Stroke.Value > =Sum(Fields!Stroke.Value) * 2 all other operators and functions(using Fields!Stroke.Value) dont work too

    Read the article

  • BizTalk - generating schema from Oracle stored proc with table variable argument

    - by Ron Savage
    I'm trying to set up a simple example project in BizTalk that gets changes made to a table in a SQL Server db and updates a copy of that table in an Oracle db. On the SQL Server side, I have a stored proc named GetItemChanges() that returns a variable number of records. On the Oracle side, I have a stored proc named Update_Item_Region_Table() designed to take a table of records as a parameter so that it can process all the records returned from GetItemChanges() in one call. It is defined like this: create or replace type itemrec is OBJECT ( UPC VARCHAR2(15), REGION VARCHAR2(5), LONG_DESCRIPTION VARCHAR2(50), POS_DESCRIPTION VARCHAR2(30), POS_DEPT VARCHAR2(5), ITEM_SIZE VARCHAR2(10), ITEM_UOM VARCHAR2(5), BRAND VARCHAR2(10), ITEM_STATUS VARCHAR2(5), TIME_STAMP VARCHAR2(20), COSTEDBYWEIGHT INTEGER ); create or replace type tbl_of_rec is table of itemrec; create or replace PROCEDURE Update_Item_Region_table ( Item_Data tbl_of_rec ) IS errcode integer; errmsg varchar2(4000); BEGIN for recIndex in 1 .. Item_Data.COUNT loop update FL_ITEM_REGION_TEST set Region = Item_Data(recIndex).Region, Long_description = Item_Data(recIndex).Long_description, Pos_Description = Item_Data(recIndex).Pos_description, Pos_Dept = Item_Data(recIndex).Pos_dept, Item_Size = Item_Data(recIndex).Item_Size, Item_Uom = Item_Data(recIndex).Item_Uom, Brand = Item_Data(recIndex).Brand, Item_Status = Item_Data(recIndex).Item_Status, Timestamp = to_date(Item_Data(recIndex).Time_stamp, 'yyyy-mm-dd HH24:mi:ss'), CostedByWeight = Item_Data(recIndex).CostedByWeight where UPC = Item_Data(recIndex).UPC; log_message(Item_Data(recIndex).Region, '', 'Updated item ' || Item_Data(recIndex).UPC || '.'); end loop; EXCEPTION WHEN OTHERS THEN errcode := SQLCODE(); errmsg := SQLERRM(); log_message('CE', '', 'Error in Update_Item_Region_table(): Code [' || errcode || '], Msg [' || errmsg || '] ...'); END; In my BizTalk project I generate the schemas and binding information for both stored procedures. For the Oracle procedure, I specified a path for the GeneratedUserTypesAssemblyFilePath parameter to generate a DLL to contain the definition of the data types. In the Send Port on the server, I put the path to that Types DLL in the UserAssembliesLoadPath parameter. I created a map to translate the GetItemChanges() schema to the Update_Item_Region_Table() schema. When I run it the data is extracted and transformed fine but causes an exception trying to pass the data to the Oracle proc: *The adapter failed to transmit message going to send port "WcfSendPort_OracleDBBinding_HOST_DATA_Procedure_Custom" with URL "oracledb://dvotst/". It will be retransmitted after the retry interval specified for this Send Port. Details:"System.InvalidOperationException: Custom type mapping for 'HOST_DATA.TBL_OF_REC' is not specified or is invalid.* So it is apparently not getting the information about the custom data type TBL_OF_REC into the Types DLL. Any tips on how to make this work?

    Read the article

  • Can I Use ASP.NET Wizard Control to Insert Data into Multiple Tables?

    - by SidC
    Hello All, I have an ASP.NET 3.5 webforms project written in VB that involves a multi-table SQL Server insert. That is, I want the customer to input all their contact information, order details etc. into one control (thinking wizard control). Then, I want to call a stored procedure that does the insert into the respective database tables. I'm familiar and comfortable with the ASP.NET wizard control. However, all the examples I've seen in my searches pertain to inserting data into one table. Questions: 1. Given a typical order process - customer information, order information, order details - should a wizard control be used to insert data into multiple database tables? If not, what controls/workflow do you suggest? 2. I've set primary keys and indexes on my order details, orders and customers tables. Is there special stored procedure syntax to use to ensure that referential integrity is maintained through the insert process? Thanks, Sid

    Read the article

  • Having trouble wrapping functions in the linux kernel

    - by Corey Henderson
    I've written a LKM that implements Trusted Path Execution (TPE) into your kernel: https://github.com/cormander/tpe-lkm I run into an occasional kernel OOPS (describe at the end of this question) when I define WRAP_SYSCALLS to 1, and am at my wit's end trying to track it down. A little background: Since the LSM framework doesn't export its symbols, I had to get creative with how I insert the TPE checking into the running kernel. I wrote a find_symbol_address() function that gives me the address of any function I need, and it works very well. I can call functions like this: int (*my_printk)(const char *fmt, ...); my_printk = find_symbol_address("printk"); (*my_printk)("Hello, world!\n"); And it works fine. I use this method to locate the security_file_mmap, security_file_mprotect, and security_bprm_check functions. I then overwrite those functions with an asm jump to my function to do the TPE check. The problem is, the currently loaded LSM will no longer execute the code for it's hook to that function, because it's been totally hijacked. Here is an example of what I do: int tpe_security_bprm_check(struct linux_binprm *bprm) { int ret = 0; if (bprm->file) { ret = tpe_allow_file(bprm->file); if (IS_ERR(ret)) goto out; } #if WRAP_SYSCALLS stop_my_code(&cs_security_bprm_check); ret = cs_security_bprm_check.ptr(bprm); start_my_code(&cs_security_bprm_check); #endif out: return ret; } Notice the section between the #if WRAP_SYSCALLS section (it's defined as 0 by default). If set to 1, the LSM's hook is called because I write the original code back over the asm jump and call that function, but I run into an occasional kernel OOPS with an "invalid opcode": invalid opcode: 0000 [#1] SMP RIP: 0010:[<ffffffff8117b006>] [<ffffffff8117b006>] security_bprm_check+0x6/0x310 I don't know what the issue is. I've tried several different types of locking methods (see the inside of start/stop_my_code for details) to no avail. To trigger the kernel OOPS, write a simple bash while loop that endlessly starts a backgrounded "ls" command. After a minute or so, it'll happen. I'm testing this on a RHEL6 kernel, also works on Ubuntu 10.04 LTS (2.6.32 x86_64). While this method has been the most successful so far, I have tried another method of simply copying the kernel function to a pointer I created with kmalloc but when I try to execute it, I get: kernel tried to execute NX-protected page - exploit attempt? (uid: 0). If anyone can tell me how to kmalloc space and have it marked as executable, that would also help me solve the above problem. Any help is appreciated!

    Read the article

  • String Functions in IIS Url Rewritting Module

    - by Nariman
    The IIS URL Rewrite Module ships with 3 built-in functions: * ToLower - returns the input string converted to lower case. * UrlEncode - returns the input string converted to URL-encoded format. This function can be used if the substitution URL in rewrite rule contains special characters (for example non-ASCII or URI-unsafe characters). * UrlDecode - decodes the URL-encoded input string. This function can be used to decode a condition input before matching it against a pattern. The functions can be invoked by using the following syntax: {function_name:any_string} The question is: can this list be extended by introducing a Replace function that's available for changing values within a rewrite rule action or condition?

    Read the article

  • String Functions in IIS Url Rewrite Module

    - by Nariman
    The IIS URL Rewrite Module ships with 3 built-in functions: * ToLower - returns the input string converted to lower case. * UrlEncode - returns the input string converted to URL-encoded format. This function can be used if the substitution URL in rewrite rule contains special characters (for example non-ASCII or URI-unsafe characters). * UrlDecode - decodes the URL-encoded input string. This function can be used to decode a condition input before matching it against a pattern. The functions can be invoked by using the following syntax: {function_name:any_string} The question is: can this list be extended by introducing a Replace function that's available for changing values within a rewrite rule action or condition? Another way to frame the question: is there any way to do a global replace on a URL coming in using this module? It seems that you're limited to using regular expressions and back-references to construct strings, without a search/replace functionality to replace every X with Y in {REQUEST_URI} before issuing a redirect.

    Read the article

  • Use LINQ to SQL results inside SQL Server stored procedure

    - by ifwdev
    Note: I'm not trying to call a SQL Server stored proc using a L2SQL datacontext. I use LINQPad for some fairly complex "reporting" that takes L2SQL output saved to an Array and is processed further. For example, it's usually much easier to do multiple levels of grouping with LINQ to Objects instead of trying to optimize a T-SQL query to run in a reasonable amount of time. What would be the easiest way to take the end result of one of these "applications" and use that in a SQL Server 2008 stored proc? The idea is to use the data for a Reporting Services Report, rather than copying and pasting into Excel (manual labor). The reports need to be accessible on the report server (not using the Report Server control in an application). I could output CSV and read that somehow via command line exec, but that seems like a hack. Thanks for your help.

    Read the article

  • Global variables that can be used in multiple jQuery functions

    - by YouBook
    Can you be able to contain variables that can be used in multiple functions in jQuery, example: var self = $(this); var box = self.parents('.box'); $('#title').click(function() { self.css('background', 'red'); box.slideDown('slow'); }).dblclick(function() { self.css('background', 'green'); box.slideUp('slow'); }); So that self and box can be used within these event functions so I don't have to keep doing this: $('#title').click(function() { var self = $(this); var box = self.parents('.box'); self.css('background', 'red'); }).dblclick(function() { var self = $(this); var box = self.parents('.box'); self.css('background', 'green'); }); But question is, is it possible, if so, how can you do that?

    Read the article

  • Porting C++-code from Windows to Unix: systemcalls colliding with name of functions

    - by marvin2k
    Hi I'm porting some crufty C++ Windows-code to Linux, which uses functions called "open" and "close" inside every class... Very bad style, or? Luckily that wasn't a problem in windows, since their systemcalls are named different. When I try to call the systemcalls open() or close() I'm getting some compiler error about "no matching function for call for class:open()". I can't rename all our functions named "class::open" and "class::close" in the whole code, and I have to use open() and close() since I'm working with serial ports. So my question is: How can I tell the compiler, which open I mean? How can I escape or hide the namespace of a class in C++?

    Read the article

  • MVC best practice when adding functions to controller?

    - by Patrick
    Hi I'm writing a function in my controller; this is supposed to take in a form, process it, register the user in DB, send a confirmation email etc etc. to avoid this function to be too cluttered, I was thinking of calling some sub-functions (eg: function registration() { //process form.. _insertInDb($formdata) _send_mail($address); //load confirmation view.. } function _send_mail($to) { //code here } function _insertInDb($formdata) { //other code here... } I'm not sure whether writing all the functions in the controller would be best practice -maybe I should insert all 'supporting' function (eg send_mail and insertInDb in this example) in another file and then import them? This would probably make the controller much more readable.. what's your view?

    Read the article

  • Strange pattern matching with functions instancing Show

    - by Sean D
    So I'm writing a program which returns a procedure for some given arithmetic problem, so I wanted to instance a couple of functions to Show so that I can print the same expression I evaluate when I test. The trouble is that the given code matches (-) to the first line when it should fall to the second. {-# OPTIONS_GHC -XFlexibleInstances #-} instance Show (t -> t-> t) where show (+) = "plus" show (-) = "minus" main = print [(+),(-)] returns [plus,plus] Am I just committing a motal sin printing functions in the first place or is there some way I can get it to match properly? edit:I realise I am getting the following warning: Warning: Pattern match(es) are overlapped In the definition of `show': show - = ... I still don't know why it overlaps, or how to stop it.

    Read the article

  • $.get sends prototype functions in request URL?

    - by pimvdb
    I have some prototype functions added to Object which in my opinion were practical in certain scenarios. However, I noticed that when I executed a $.get, the prototype functions are handled as data members and are sent like http://...?prototypefunc=false. This is rather useless as I don't supply these as data members, but they are added to the query string. To be exact, I have this code: Object.prototype.in = function() { for(var i=0; i<arguments.length; i++) if(arguments[i] == this) return true; return false; } $.get('http://localhost/test.php', {'test': 'foo'}, function(text) { }); The corresponding URL constructed is: http://localhost/test.php?test=foo&in=false How can I avoid this?

    Read the article

  • Best practice for error handling in codeigniter / php apps

    - by Industrial
    Hi everyone, We're working with a new codeigniter based application that are cross referencing different PHP functions forwards and backwards from various libraries, models and such. We're running PHP5 on the server and we try to find a good way for managing errors and status reports that arises from the usage of our functions. While using return in functions, the execution is ended, so nothing more can be sent back. Right? What's the best practice to send a status information or error code upon ending execution of actual function? Should we look into using exceptions or any other approach? http://us.php.net/manual/en/language.exceptions.php

    Read the article

  • Do mini-filter functions need APCs enabled?

    - by botismarius
    Hello, Many Zw* functions that work with files (such as ZwCreateFile) need to be called at PASSIVE_LEVEL with APCs enabled: http://msdn.microsoft.com/en-us/library/ff566424%28VS.85%29.aspx. This is because, internally, I/O operations are asynchronously and the completion of an operation is delivered through an APC (correct me if I'm wrong). However, the documentation for similar functions from a mini-filter (such as FltCreateFile, FltReadFile, etc) does not specify that APCs should be enabled. Is it safe to call FltCreateFile/FltReadFile with APCs disabled? Thanks!

    Read the article

  • calling two functions sequentially in vbscript with single click event

    - by sushant
    i need to call two function on a single click event. and also the functions shud get executed sequentially. i tried click me . but its not working.its not calling any of the functions. here is the complete code. sorry for formatting. function copy() Dim WshShell, oExec,g,h h="D:\d" g="xcopy " & h & " " & "D:\y\ /E" Set WshShell = CreateObject("WScript.Shell") Set oExec = WshShell.Exec(g) Do While oExec.Status = 0 WScript.Sleep 100 Loop WScript.Echo oExec.Status end function function zip() Dim WshShel, oExe Set WshShel = CreateObject("WScript.Shell") Set oExe = WshShel.Exec("cmd /c cd D:\d & D: & winzip32.exe -min -a D:\a") Do While oExe.Status = 0 WScript.Sleep 100 Loop WScript.Echo oExe.Status end function click me any help is appreciated.

    Read the article

  • Stored proc executes >30 secs when called from website, but <1 sec when called from ssms

    - by Blootac
    I have a stored procedure that is called by a website to display data. Today the web page has started timing out so I got profiler going and saw the query that was taking too long. I then ran the same query in management studio, under the same user login, and it takes less than a second to return. Is there anything obvious that could be causing this? I can't think of a reason why when ASP calls the stored proc it takes 30 secs but when I call it it's fine. Thanks

    Read the article

  • Accessing global variables within functions in PHP

    - by st3
    There are multiple times in one page where I need to connect and subsequently query a MySQL database, yet my code won't let me. I think it might be something to do with how my files are nested but it makes no sense. I am opening the SQL connection in the header file. The top of the offending page looks like the following: <?php $page_title = 'Dashboard'; include('templates/header.inc'); // includes a 'require_once('mysqli_connect.php') and a small query to the database; require_once('includes/functions.php'); require_once('includes/dashboard_sql.php'); // Contains functions which connect to database (which are failing.) ?> I get the PHP error Notice: Undefined variable: dbc in /Library/WebServer/Documents/pediatory_site/includes/dashboard_sql.php Where $dbc is the database connection defined in mysqli_connect.php. If anyone could help me out that would be great.

    Read the article

  • boost.asio's socket's recieve/send functions are bad?

    - by the_drow
    Data may be read from or written to a connected TCP socket using the receive(), async_receive(), send() or async_send() member functions. However, as these could result in short writes or reads, an application will typically use the following operations instead: read(), async_read(), write() and async_write(). I don't really understand that remark as read(), async_read(), write() and async_write() can also end up in short writes or reads, right? Why are those functions not the same? Should I use them at all? Can someone clarify that remark for me?

    Read the article

  • ORACLE -1401 error

    - by Sachin Chourasiya
    I have a stored procedure in Oracle 9i which inserts records in a table. The table has a primary key built to ensure duplicte rows doesnot exists. I am trying to insert a record by calling this stored procedure and it works first time properly. I am again trying to insert a duplicate record and expecting unique constraint violation error. But I am getting ORA-01401 inserted value too large for column I knew its meaning but my query is , if the value inserted is really large then how it got successful in the first attempt.

    Read the article

  • Problem with default member functions of class in C++ (constructor, destructor, operator=, copy cons

    - by Narek
    We know that compiler generates some member functions for user-defined class if that member functions are not defined but used, isn't it. So I have this kind of code: class AA { }; void main() { AA a; AA b(a); a = b; } This code works fine. I mean no compiler error. But the following code.... class AA { int member1; int member2; }; But this code gives an run time error, because variable "a" is used without being iniltialized!!! So my question is this: when we instantiate an int, it has a value. So why the default constructer doesn't work and by using those two int numbers initializes variable "a"??

    Read the article

  • Stored Procedure - forcing execution order

    - by meepmeep
    I have a stored procedure that itself calls a list of other stored procedures in order: CREATE PROCEDURE [dbo].[prSuperProc] AS BEGIN EXEC [dbo].[prProc1] EXEC [dbo].[prProc2] EXEC [dbo].[prProc3] --etc END However, I sometimes have some strange results in my tables, generated by prProc2, which is dependent on the results generated by prProc1. If I manually execute prProc1, prProc2, prProc3 in order then everything is fine. It appears that when I run the top-level procedure, that Proc2 is being executed before Proc1 has completed and committed its results to the db. It doesn't always go wrong, but it seems to go wrong when Proc1 has a long execution time (in this case ~10s). How do I alter prSuperProc such that each procedure only executes once the preceding procedure has completed and committed? Transactions?

    Read the article

< Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >