Search Results

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

Page 32/701 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • Calling DLL functions from VB6.

    - by Tim Ring
    I've got a Windows DLL that I wrote, written in C/C++ (all exported functions are 'C'). The DLL works fine for me in VC++. I've given the DLL to another company who do all their development in VB. They seem to be having a problem linking to the functions. I haven't used VB in ten years and I don't even have it installed. What could be the problem? I've declared all my public functions as follows: define MYDCC_API __declspec(dllexport) MYDCCL_API unsigned long MYDCC_GetVer( void); . . . Any ideas? Finally got back to this today and have it working. The answers put me on the right track but I found this most helpful: http://www.codeproject.com/KB/DLL/XDllPt2.aspx Also, I had a few problems passing strings to the DLL functions, I found this helpful: http://www.flipcode.com/archives/Interfacing_Visual_Basic_And_C.shtml

    Read the article

  • How are thumbnails stored on Mac OS X?

    - by Alberto Moriconi
    I have noticed that thumbnails on Mac OS X don't seem to be generated every time I open a folder, but to be somehow "cached" instead. I wasn't able, however, to find a folder where they clearly look to be stored. I thought then they could be saved as some kind of metadata; i found, however, that when deleting a file (e.g. from the Desktop) and saving immediately after a file by the same name, the preview for the previous file is showed for ~ a second. Are they stored separately from data? How and when are they invalidated (e.g. only when a file by the same name appears in the same directory)?

    Read the article

  • MySQL triggers cannot update rows in same table the trigger is assigned to. Suggested workaround?

    - by Cory House
    MySQL doesn't currently support updating rows in the same table the trigger is assigned to since the call could become recursive. Does anyone have suggestions on a good workaround/alternative? Right now my plan is to call a stored procedure that performs the logic I really wanted in a trigger, but I'd love to hear how others have gotten around this limitation. Edit: A little more background as requested. I have a table that stores product attribute assignments. When a new parent product record is inserted, I'd like the trigger to perform a corresponding insert in the same table for each child record. This denormalization is necessary for performance. MySQL doesn't support this and throws: Can't update table 'mytable' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. A long discussion on the issue on the MySQL forums basically lead to: Use a stored proc, which is what I went with for now. Thanks in advance!

    Read the article

  • Error message when renaming files on a network drive stored in Windows 7 favorites

    - by paulmorriss
    I have a network drive mapped to a share on a Window Server 2003. I have a shortcut to this drive stored in my Windows 7 favorites. When I double click the shortcut and then rename a file on the drive, if the file is longer than 8 chars or contains spaces then I get this error The drive that this file or folder is stored on does not allow long file names, or names containing blanks or any of the following characters:... If I get to the network drive by click on it in the tree under computer then it works fine. Is there a way to get round this?

    Read the article

  • [macosx]does dlopen call open and read functions?

    - by zbencik
    Hello, I've intercepted(interposed) dlopen function under MacOS X and some other functions. I see how my applications calls dlopen in the log, but don't find anything related to open/read functions after dynamic library was dlopened. How does the system accesses and reads the dynamic library file? I've looked at the source code of dyld, and it does call open/read on dlopen. Can anybody let me know what I'm missing? intercepted functions: dlopen, open, read, write, access, all stat functions, close, etc. thanks, any help is highly appreciated.

    Read the article

  • My Oracle 9i package won't compile, says that a user-defined function is out of scope... but it isn'

    - by bitstream
    I have an Oracle package which contains user-defined functions and procedures, including two user-defined functions which are called from SELECT and UPDATE statements. The functions in question are defined before the procedures that call them. This piece of code compiles and works fine on Oracle 10g but won't compile on 9i. The code should work as-is according to Oracle's own documentation. Any idea why it would throw this error on 9i?

    Read the article

  • Aggregate functions in ANSI SQL

    - by morpheous
    I want to use multiple aggregate functions in a query. All the examples i have seem on aggregate functions however, are trivial. Typically, they are of the form: SELECT field1,agg_func1, agg_func2 GROUP BY SOME_COLUMNS HAVING agg_func1 OP SOME_SCALAR Where: OP: is a boolean operator (e.g. <, = etc) SOME_SCALAR: is a scalar (i.e. a constant number) What I want to know is if it is possible to write (IN ANSI SQL) queries like: SELECT field1,agg_func1, agg_func2, agg_func3 GROUP BY SOME_COLUMNS HAVING (agg_func1 OP1 agg_func2) OP2 (agg_func2 OP3 agg_func3) Where: OP[N] are boolean operators or ANSI SQL clause operators like 'BETWEEN', 'LIKE', 'IN' etc. Also, assuming this is possible (I have not seen any documentation saying otherwise) are there any efficiency/performance considerations (i.e. penalties) when the HAVING clause consists of a boolean expression combining the output of the aggregate functions - instead of the normal comparison of the output of the aggregate with a constant number (e.g. min('salary') 100 ) - which is often used in the most banal examples involving aggregate functions?

    Read the article

  • Getting .NET schema for a stored procedure result

    - by PHeiberg
    I have a couple of stored procedures in T-SQL where each stored procedure has a fixed schema for the result set. I need to map the result sets for each procedure to a POCO object and need the column name and type for each column in the result set. Is there a quick way of accessing the information? The best way I have found so far is accessing each stored procedure from .NET and writing my own extension method on a IDataReader/IDataRecord for dumping the information (column names and types) out. Example, a stored procedure executing the following query: SELECT Id, IntField, NullableIntField, VarcharField, DateField FROM SomeTable would require me to have the mapping information: Id - Guid IntField - System.Int32 NullableIntField - Nullable<System.Int32> VarcharField - String DateField - DateTime

    Read the article

  • Adding a MySQL StoredProcedure causes not responding state

    - by Omie
    I'm on Windows 7 ultimate 32bit + xampp 1.7.2 [MySQL v5.1.37] This is my stored procedure : delimiter // CREATE PROCEDURE updatePoints(IN parentid INT(5),IN userid INT(5)) DECLARE chpoints INT(5); BEGIN SELECT points INTO chpoints FROM quiz_challenges WHERE id = parentid; UPDATE quiz_users SET points = points + chpoints WHERE forumid=userid; END; // delimiter ; At first it was showing error 1064 while creating stored procedure. I added delimiters part and when I tried running the query from phpmyadmin, Firefox went into not responding state. After that I started Internet Explorer and tried opening my pages which use the same database, it worked fine. However, I tried opening phpmyadmin and IE went into not responding state as well. I restarted both servers. Later restarted PC. Tried again but its same behavior. So whats wrong with this tiny little code ? Am I missing something which might be causing infinite loop ? Thanks

    Read the article

  • Installing PHP DOM functions on Apache

    - by user352556
    I have just moved my code over to a new server (running on Apache 2.2.3), and PHP's DOM functions are now returning "Fatal error: Class 'DOMDocument' not found". I did some research and it appears that the installation I am now on does not have PHP's DOM functions enabled. I need to enable these functions, so what is the quickest way to go about this? Is it doable from a configuration file or will it require installation of extensions? Thanks!

    Read the article

  • Linq-to-SQL- A stored procedure returns field which is not there in Mapped Table Info

    - by jalpesh
    We are using Linq-to-SQL with stored Procedures we need help on one of our problem. We are having user tables which is having all field required for user table like firstname,lastname and other fields that table is also there in our DBML files.Now the problem is that we are having a stored procedure that is mapped to table-User returning a field called fullname (Combination of firstname and lastname)which is not there in usertable. So what is the best way to slove this. Another thing is that one of other stored procedure return inner join of two tables with mix columns in this case how can i mapped that stored procedure with Table mapped info class in our dbml files.

    Read the article

  • DBD::CSV: Problem with userdefined functions

    - by sid_com
    From the SQL::Statement::Functions documentation: Creating User-Defined Functions ... More complex functions can make use of a number of arguments always passed to functions automatically. Functions always receive these values in @_: sub FOO { my( $self, $sth, $rowhash, @params ); } #!/usr/bin/env perl use 5.012; use warnings; use strict; use DBI; my $dbh = DBI->connect( "DBI:CSV:", undef, undef, { RaiseError => 1, } ); my $table = 'wages'; my $array_ref = [ [ 'id', 'number' ], [ 0, 6900 ], [ 1, 3200 ], [ 2, 1800 ], ]; $dbh->do( "CREATE TEMP TABLE $table AS import( ? )", {}, $array_ref ); sub routine { my $self = shift; my $sth = shift; my $rowhash = shift; # return $_[0] / 30; }; $dbh->do( "CREATE FUNCTION routine" ); my $sth = $dbh->prepare( "SELECT id, routine( number ) AS result FROM $table" ); $sth->execute(); $sth->dump_results(); When I try this I get an error-message: DBD::CSV::st execute failed: Use of uninitialized value $_[0] in division (/) at ./so.pl line 27. [for Statement "SELECT id, routine( number ) AS result FROM "wages""] at ./so.pl line 34. When I comment out the third argument I works as expected ( because it looks as if the third argument is missing ): #!/usr/bin/env perl ... sub routine { my $self = shift; my $sth = shift; #my $rowhash = shift; return $_[0] / 30; }; ... 0, 230 1, 106.667 2, 60 3 rows Is this a bug?

    Read the article

  • Lua - How to use functions from another script

    - by Person
    I'm wondering how to use functions from another script in Lua. For example, say GameObjectUtilities holds functions that many GameObject scripts will use. The Slime (a GameObject) script wants to use a function in GameObjectUtilities. I'm having trouble getting this to work. I've looked here, but I still don't really fully understand. Do I need to create a module or a table to hold the functions in GameObjectUtilities for the functions in it to be used in other scripts? If so, what is the best way to go about this?

    Read the article

  • Where and how to store functions in asp.net.vb

    - by si
    Hi. I am using visual studio 2008, asp.net.vb I have various functions; 1 that calculates totals, 1 that calculates averages, 1 that calculates percentages etc. The data they act upon is different depending on the particular web page, but all my pages use these functions. So I want to know how I can store these functions in a single place so that all of my web pages can access the routines. At the moment all I know how to do is to write seperate functions in the code-behind for each individual web page. Obviously that is just so long winded and inefficient, but try as I might I can't figure out how to do it better. Please can anyone help. Many thanks.

    Read the article

  • "reduce" or "apply" using logical functions in Clojure

    - by Alex B
    I cannot use logical functions on a range of booleans in Clojure (1.2). Neither of the following works due to logical functions being macros: (reduce and [... sequence of bools ...]) (apply or [... sequence of bools ...]) The error saying that I "can't take value of a macro: #'clojure.core/and". How to apply these logical functions (macros) without writing boilerplate code?

    Read the article

  • Increasing understanding of validating a string with PHP string functions

    - by user1554264
    I've just started attempts to validate data in PHP and I'm trying to understand this concept better. I was expecting the string passed as an argument to the $data parameter for the test_input() function to be formatted by the following PHP functions. trim() to remove white space from the end of the string stripslashes() to return a string with backslashes stripped off htmlspecialchars() to convert special characters to HTML entities The issue is that the string that I am echoing at the end of the function is not being formatted in the way I desire at all. In fact it looks exactly the same when I run this code on my server - no white space removed, the backslash is not stripped and no special characters converted to HTML entities. My question is have I gone about this in the wrong approach? Should I be creating the variable called $santised_input on 3 separate lines with each of the functions trim(), stripslashes() and htmlspecialchars()? By my understanding surely I am overwriting the value of the $santised_input variable each time I recreate it on a new line of code. Therefore the trim() and stripslashes() string functions will never be executed. What I am trying to achieve is using the "$santised_input" variable to run all of these PHP string functions when the $data argument is passed to my test_input() function. In other words can these string functions be chained together so that I only need to create $santised_input once? <?php function test_input($data) { $santised_input = trim($data); $santised_input = stripslashes($data); $santised_input = htmlspecialchars($data); echo $santised_input; } test_input("%22%3E%3Cscript%3Ealert('hacked')%3C/script%3E\ "); //Does not output desired result "&quot;&gt;&lt;script&gt;alert('hacked')&lt;/script&gt;" ?>

    Read the article

  • Get functions called with GDB

    - by Werner
    Hi, I am using GDB to understand a C++ program. I put a break in the middle of the running which turns to be something like: break main.cpp:500 and I would like to see which functions have been called before. I tried "backtrace" but it shows only info about main, as previous calls to previous functions have already finished. My question is how can I get (with GDB or another method) the info about which functions have been called before this point, even if the call has been returned. Thanks

    Read the article

  • Problem about C++ class (inheritance, variables scope and functions)

    - by Luigi Giaccari
    I have a class that contains some data: class DATA Now I would to create some functions that uses those data. I can do it easily by writing member functions like DATA::usedata(); Since there are hundreds of functions, I would to keep an order in my code, so I would like to have some "categories" (not sure of the correct name) like: DATA data; data.memory.free(); data.memory.allocate(); data.file.import(); data.whatever.foo(); where memory, file and whatever are the "categories" and free, allocate and foo are the functions. I tried the inheritance way, but I got lost since I can not declare inside DATA a memory or file object, error C2079 occurs: http://msdn.microsoft.com/en-us/library/9ekhdcxs%28VS.80%29.aspx Since I am not a programmer please don't be too complicated and if you have an easier way I am all ears.

    Read the article

  • Creating new Entities from Stored Procedure

    - by SK
    I have a stored procedure that retrieves existing rows from a table and also creates includes new rows that match the table definition and mapped entity (.net 3.5 entity framework). These new rows are not written to the database in the stored procedure. The stored procedure executes, but the new rows that were created will not load the navigation properties sucessfully i.e. the rows that do not actually exist in the database. e.g. database rows: key, data, FK 1, xxx, a 2, xxx, b returned rows from stored procedure: key, data, FK 1, xxx, a 2, xxx, b 3, yyy, a 4, yyy, b The entity will load FK entities a and b for rows 1 and 2, but for rows 3 and 4 the FK entity is null. Do I somehow need to add the new rows to the data context? or turn off tracking?

    Read the article

  • How to save a Stored Procedure ?

    - by Richard77
    Hello, I've been playing today with stored procedures. I'm stoned that I picked the basic of it up so easily. (I'll also try triggers very soon). Now, I'd like to know how to save my SPROC under the stored procedure folder (Programmability - Stored Procedure) so that I can access it by name (eventually from my C# application). So far, when I press the save icon, I'm proposed to save the whole query. That's not what I want. Thanks for helping

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >