Search Results

Search found 24382 results on 976 pages for 'tutor process procedure f'.

Page 51/976 | < Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >

  • Getting Stored Procedure Information from .Net

    - by Ben
    Hi, I am trying to get some data relevant to a stored procedure (or funtion) back from a database using .Net. The first thing I need to be able to do, is get the stored proc from the database and turn it into string format. The information I need is: The return set of columns, tables used within the SP, Stored Procedures called from the SP. The only way of doing this at the moment that i can think of, is though parsing the text and looking for keyword matches. Is there a better way of doing this? Any ideas? Thanks.

    Read the article

  • Invoking a function call in a string in an Oracle Procedure

    - by DMS
    Hello, I writing an application using Oracle 10g. I am currently facing this problem. I take in "filename" as parameter of type varchar2. A sample value that filename may contain is: 'TEST || to_char(sysdate, 'DDD')'. In the procedure, I want to get the value of this file name as in TEST147. When i write: select filename into ffilename from dual; I get the value ffilename = TEST || to_char(sysdate, 'DDD') whick makes sense. But how can I get around this issue and invoke the function in the string value? Help appreciated. Thanks.

    Read the article

  • Procedure Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32).

    - by Nick
    The stored proc is failing at below location,Thanks, for all your help. --Insert MSOrg Information DECLARE @PersonnelNumber int, @MSOrg varchar(255) DECLARE csr CURSOR FAST_FORWARD FOR SELECT PersonnelNumber FROM Person OPEN csr FETCH NEXT FROM csr INTO @PersonnelNumber WHILE @@FETCH_STATUS = 0 BEGIN EXEC GetMSOrg @PersonnelNumber, @MSOrg out INSERT INTO PersonSubject ( PersonnelNumber ,SubjectID ,SubjectValue ,Created ,Updated ) SELECT @PersonnelNumber ,SubjectID ,@MSOrg ,getDate() ,getDate() FROM Subject WHERE DisplayName = 'MS Org' FETCH NEXT FROM csr INTO @PersonnelNumber END CLOSE csr DEALLOCATE csr Below is the stored prc defination GetMSOrg and fails at third condition CREATE PROCEDURE [dbo].[GetMSOrg] ( @PersonnelNumber int ,@OrgTerm varchar(200) out ) AS DECLARE @MDRTermID int ,@ReportsToPersonnelNbr int --Check to see if we have reached the top of the chart SELECT @ReportsToPersonnelNbr = ReportsToPersonnelNbr FROM ReportsTo WHERE PersonnelNumber = @PersonnelNumber IF (@ReportsToPersonnelNbr IS NULL) --Reached the Top of the Org Ladder BEGIN SET @OrgTerm = 'Non-standard rollup' END ELSE IF (@PersonnelNumber IN (SELECT PersonnelNumber FROM OrgTermMap)) BEGIN SELECT @OrgTerm = s.Term FROM OrgTermMap tm JOIN Taxonomy..StaticHierarchy s ON tm.OrgTermID = s.TermID WHERE tm.PersonnelNumber = @PersonnelNumber END ELSE BEGIN SELECT @MDRTermID = tm.OrgTermID FROM ReportsTo r JOIN OrgTermMap tm ON r.ReportsToPersonnelNbr = tm.PersonnelNumber WHERE r.PersonnelNumber = @PersonnelNumber IF (@MDRTermID IS NULL) BEGIN EXEC GetMSOrg @ReportsToPersonnelNbr, @OrgTerm out END ELSE BEGIN SELECT @OrgTerm = Term FROM Taxonomy..StaticHierarchy WHERE VocabID = 118 AND TermID = @MDRTermID END END GO

    Read the article

  • Caching stored procedure results in Linq'u

    - by itdebeloper
    In our web application we have a lots of stored procedures look like this one: getSomeData(/* 7 diffrent params */) This stored procedure don't make any updates. We are using Linq'u. I know that the date are changing no often than once per day so the results for the same sets of parameters values will be the same. Does Linqu have cache simple solution? I know how to 'manually' write cache mechanism in .net, but I supposed that in Linqu this problem was solved. I'm a lazy guy :) so I'm looking for something realy simple like: Linqu_global_store_procedure_configuration.CacheDuration="600" Linqu_global_store_procedure_configuration.CacheVaryByParam="*" I'm using .net 3.5 but its not any problem to move for 4.0.

    Read the article

  • Linq to SQl Stored Procedure Problem( it can't figure out the return type)

    - by chobo2
    Hi I have this SP USE [Test] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[UsersInsert](@UpdatedProdData XML) AS INSERT INTO dbo.UserTable(UserId,UserName,LicenseId,Password,PasswordSalt,Email,IsApproved,IsLockedOut,CreateDate, LastLoginDate,LastLockOutDate,FailedPasswordAttempts,RoleId) SELECT @UpdatedProdData.value('(/ArrayOfUsers/Users/UserId)[1]', 'uniqueidentifier'), @UpdatedProdData.value('(/ArrayOfUsers/Users/UserName)[1]', 'varchar(20)'), @UpdatedProdData.value('(/ArrayOfUsers/Users/LicenseId)[1]', 'varchar(50)'), @UpdatedProdData.value('(/ArrayOfUsers/Users/Password)[1]', 'varchar(128)'), @UpdatedProdData.value('(/ArrayOfUsers/Users/PasswordSalt)[1]', 'varchar(128)'), @UpdatedProdData.value('(/ArrayOfUsers/Users/Email)[1]', 'varchar(50)'), @UpdatedProdData.value('(/ArrayOfUsers/Users/IsApproved)[1]', 'bit'), @UpdatedProdData.value('(/ArrayOfUsers/Users/IsLockedOut)[1]', 'bit'), @UpdatedProdData.value('(/ArrayOfUsers/Users/CreateDate)[1]', 'datetime'), @UpdatedProdData.value('(/ArrayOfUsers/Users/LastLoginDate)[1]', 'datetime'), @UpdatedProdData.value('(/ArrayOfUsers/Users/LastLockOutDate)[1]', 'datetime'), @UpdatedProdData.value('(/ArrayOfUsers/Users/FailedPasswordAttempts)[1]', 'int'), @UpdatedProdData.value('(/ArrayOfUsers/Users/RoleId)[1]', 'int') Now this SP creates just fine. It's when I go to VS2010 and try to drag this SP in my method panel of my linq to sql file in design view. It tells me that it can't figure out the return type. I try to go to the properties but it does not have "none" as a choice and I can't type it in. It should be "none" so how do I set it to "none"?

    Read the article

  • Looping over some selected values in a stored procedure

    - by macca1
    I'm trying to modify a stored procedure hooked into an ORM tool. I want to add a few more rows based on a loop of some distinct values in a column. Here's the current SP: SELECT GRP = STAT_CD, CODE = REASN_CD FROM dbo.STATUS_TABLE WITH (NOLOCK) Order by STAT_CD, SRT_ORDR For each distinct STAT_CD, I'd also like to insert a REASN_CD of "--" here in the SP. However I'd like to do it before the order by so I can give them negative sort orders so they come in at the top of the list. I'm getting tripped up on how to implement this. Does anyone know how to do this for each unique STAT_CD?

    Read the article

  • T-SQL stored procedure to return google style "suggested" search results

    - by stephen776
    Ok, using SQL Server 2008. On my web page I have a textbox with jQuery-UI AutoComplete hooked up. Now I need a stored procedure to search across all columns of a single table(or multiple joined tables I suppose) for a search string coming from the textbox/autocomplete AJAX call, and return "suggested" search strings. I am using the AdventureWorks db for testing(Products table) So for example, the product table has columns for product name and product number(among others) and I want to return suggested search strings based on user input where they may enter a product name and/or a product number. I have it working across a single column which was simple. Any ideas?

    Read the article

  • Stored procedure does not return data if executed from VBA

    - by Sam
    I had stored procedure MySPOld in Sybase db. I created new sp MySP. This new sp returns data while executed from Sybase Sql Advantage. But not returning the data when called from VBA - Excel 2003 (EOF property of recordset is True). Here is my code.. Dim dbCon As ADODB.Connection Dim rstTemp As New ADODB.Recordset Dim query As String query = "exec MySP '01/01/2010', '01/14/2010'" dbCon.Open connectionString, "username" "password" dbCon.CommandTimeout = 300 rstTemp.Open query, dbCon, adOpenForwardOnly The code was working well with old sp. What could be the problem ? any idea ? Thanks in Advance.

    Read the article

  • VS 2008 - Procedure to ship C#/WPF solution to ensure compatibility

    - by Bill
    I am attempting to collaborate on a C#/WPF project with another developer remotely via e-mail; and although the code compiles perfectly when it leaves, my collaborator has not been able to compile the code on his side. We are both using VS 2008 Version 9. This is the first time trying to work with someone else on an application and I was hoping that someone would advise me if there are any suggestions to obtain and ensure compatibility between the two of us? Additionally, is there a recommended procedure to prepare the solution for shipment (ie. just zip up the solution folder? export the application? etc.)? Thanks very much.

    Read the article

  • Stored procedure called from C# executes 6 times longer than from SQL Management studio

    - by Sergey Osypchuk
    I have search stored procedure which is my performance bottleneck. In order to get control about what is happened, I added logging for all parameters and also execution time in SP. I noticed, that when I call SP from MIcrosoft SQL server management Studio execution time is 1.3-1.6 seconds, but when i call it from C#, it takes 6-8 secods (!!!) Parameters | Time (ms) "tb *"TreeType:259Parents:212fL:13;14fV:0;lcid:2057min:0max:10sort:-1 | 6406 "tb *"TreeType:259Parents:212fL:13;14fV:0;lcid:2057min:0max:10sort:-1 | 1346 SP is called with LINQ. Login settings are same. SP uses full text search What could cause this?

    Read the article

  • SQL Server Stored Procedure that return processed records number

    - by Ras
    I have a winform application that fires a Stored Procedure which elaborates several records (around 500k). In order to inform the user about how many record have been processed, I would need a SP which returns a value every n records. For example, every 1000 row processed (most are INSERT). Otherwise I would be able only to inform when ALL record are processed. Any hints how to solve this? I thought it could be useful to use a trigger or some scheduled task, but I cannot figure out how to implement it.

    Read the article

  • Why can't I pass in a uniqueidentifier/GUID to a stored procedure

    - by chobo2
    Hi I have this SP USE [TestDB] GO /****** Object: StoredProcedure [dbo].[sp_test] Script Date: 06/12/2010 11:47:27 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[sp_test] @id uniqueidentifier AS BEGIN select * from TestTbl where ProductId= @id END I then went to the SP with ms sql 2005 and clicked execute. It comes up with a box where I entered in the GUID. I copied and pasted it straight from my test database. I get this error. Msg 102, Level 15, State 1, Line 5 Incorrect syntax near 'cac671b'. So why can't I sent in GUIDs? even ones that are copied right from the database and must be valid as they where allowed into the db.

    Read the article

  • Trouble Passing Parameter to LinqToSql Stored Procedure

    - by Webjedi
    public IEnumerable<T> ExecuteStoredProcedure<T>(params object[] parameters) { Type genericType = typeof(T); string commandthing = genericType.Name.Replace("Result", ""); //_db is my Linq To Sql database return _db.ExecuteQuery<T>(commandthing, parameters).AsEnumerable(); } The stored procedure is named GetOrder and has a single int parameter of orderid. I'm calling the above like so: SqlParameter parm1 = new SqlParameter("@orderid", SqlDbType.Int); parm1.Value = 123; var results = _session.ExecuteStoredProcedure<GetOrderResult>(parm1).Single(); I'm receiving the following error: A query parameter cannot be of type 'System.Data.SqlClient.SqlParameter' Thoughts? Or am I just missing something obvious?

    Read the article

  • Pass in Dynamic number of parameters to a stored procedure

    - by xrum
    Hi, I have a function in my .NET application, that needs to do a search of an unknown number of parameters. for example: select * from tbl where x=1 or x=2 or x=3 or x=4 is it possible to do in .NEt and SQL? how do i go about creating dynamic parameters in .NET (I was thinking doing it with a loop) but then how do i declare them in my stored procedure? does sql have arrays? please help. thank you!

    Read the article

  • What causes VB6 "Run-Time Error '5': Invalid Procedure Call or Argument"

    - by cundh2o
    In VB6, users occasionally receive this error and I am unable to reproduce it. Run-Time Error '5': Invalid Procedure Call or Argument I am referencing the "MSWord 10 Object Library" and sometimes this error occurs at some point after the application has opened MSWord 2002. However, this app has referenced the MSWord 10 Object Library for years, and this error just started occurring in the last few months. I am assuming I have introduced a bug somewhere, but no idea what might be causing it. The error does not occur very often and cannot be reproduced by a user when I am standing there. The error forces the app to totally shut down. Users are running Windows XP

    Read the article

  • Passing NULL values into mysql Stored procedure

    - by McNabbToSkins
    I am trying to pass a few NULL values to a stroed procedure but PHP always retains the varaibles to be empty strings '' and not NULL. My DB insert function looks like this. (I am using a Framework and ADODB so if it looks weird thats why). function insert_emp($f_name, $last_name, $dob) { if(!isset($dob)){ $dob = NULL; } $this->DB->setConnection("CALL insert_emp('$f_name', '$l_name', '$dob')"); } I have ensured that $dob is being passed an empty string ''. But for some reason when it calls the stored proc it is not changed to NULL. dob is a datetime field and mysql complains that you can not enter an empty string as a DATETIME. If I hard code the insert such as this $this->DB->setConnection("CALL insert_emp('Test1', 'Test2', 'NULL')"); it will work. Thanks for the help.

    Read the article

  • SQL alert for a stored procedure?

    - by superdupersomething
    I have a SQL 2005 setup and am rather new :) Been cracking at this for a few hours and I just need some help. I have been able to setup alerts successfully for the standard "SQL server performance events", its fun. So I already have email alerts working. However I need the alert thing to run a stored procedure I have created, and depending on its output it will alert me or not via email. So far I have been trying to use the WMI events, but I keep getting an error "The @wmi_query could not be executed in the @wmi_namespace provided. Verify that an event class selected in the query exists in the namespace and that the query has the correct syntax" the query definitely works so I have no idea.. is there a different way to do this?

    Read the article

  • Sql server Stored Procedure

    - by user177883
    I m passing a variable to stored procedure, i want the proc to make a look up to another table and get the primary key of the table and insert that value to the table. Table A: pk_id int, user varchar Table B: userKey int When i invoke sp_howto, and pass user to it, i want to it to get the pk_id from table A and insert it to table B userKey. @res = select userKey from TableA where user=@user insert into tableB (userKey) values (@res) Does this work? and what if I have many keys I want to populate like this?

    Read the article

  • Function Procedure in Java

    - by Lhea Bernardino
    Create a program that will ask the user to enter 3 numbers using for loop, then test the numbers and display it in ascending order. Sample Input: 5 2 7 Sample Output: 2 5 7 I'm stuck with the testing procedure. I don't know how to test the numbers since the variable holding those numbers is just a single variable and inside the for loop here is my sample code: import javax.swing.JOptionPane; public class ascending { public static void main(String args[]) { for(int x= 0; x<3;x++) { String Snum = JOptionPane.showInputDialog("Enter a number"); int num = Integer.parseInt(Snum); } <Here comes the program wherein I will test the 3 numbers inputted by the user and display in ascending order. I don't know where to start. :'( >

    Read the article

  • Apache - child process exited with status 255

    - by Brian
    I am running Windows 7 64-bit with an older version of (Apache 2.0.59) and PHP 5.2 - just switched from XP and wanted to keep the same versions. Everything will initially be working fine, but then I'll be trying to load a page and Apache crashes. I'll get an error in the browser that says "The connection to the server was reset while the page was loading." Then Apache stops running. Sometimes it can be restarted, but then crashes again on the next page load. Sometimes it can't even be restarted at all. Looking in the Apache error logs, I see a series of messages that goes something like: [notice] Apache/2.0.59 (Win32) PHP/5.2.13 configured -- resuming normal operations [notice] Server built: Jul 27 2006 15:55:03 [notice] Parent: Created child process 1220 [notice] Child 1220: Child process is running [notice] Child 1220: Acquired the start mutex. [notice] Child 1220: Starting 250 worker threads. [notice] Parent: child process exited with status 255 -- Restarting. I have just come from Win XP where I never had any problems - is this an issue with my Apache version on Win7? Or perhaps it's a configuration issue? Any help would be greatly appreciated, I've done days of research and found nothing helpful. Thanks, Brian

    Read the article

  • Can't start Bind9 on Ubuntu 10.04 + Plesk 10.1 - "named: no process found"

    - by bradley.ayers
    I've installed a fresh version of Ubuntu 10.04 64bit, I didn't install bind when choosing what packages should be installed in the Ubuntu installer. I downloaded the auto installer for Plesk 10.1 and installed it successfully. When I logged into the Plesk control panel and tried to change the password, it failed because it couldn't restart bind. I SSH'd into the box and tried a sudo /etc/init.d/bind9 restart and get the following: brad@ws01:/root# sudo /etc/init.d/bind9 restart * Stopping domain name service... bind9 WARNING: key file (/etc/bind/rndc.key) exists, but using default configuration file (/etc/bind/rndc.conf) rndc: connect failed: 127.0.0.1#953: connection refused named: no process found [ OK ] * Starting domain name service... bind9 [fail] Looking at tail /var/log/messages reveals a whole bunch of: Feb 23 16:08:21 ws01 kernel: [ 3840.065851] type=1503 audit(1298441301.831:31): operation="open" pid=5565 parent=5563 profile="/usr/sbin/named" requested_mask="::r" denied_mask="::r" fsuid=108 ouid=0 name="/var/named/run-root/etc/named.conf" Edit: After following ooshro's advice, bind runs, however I still get the named: no process found error: brad@ws01:/etc/apparmor.d$ sudo /etc/init.d/bind9 restart * Stopping domain name service... bind9 WARNING: key file (/etc/bind/rndc.key) exists, but using default configuration file (/etc/bind/rndc.conf) named: no process found [ OK ] * Starting domain name service... bind9 [ OK ]

    Read the article

  • Locating memory leak in Apache httpd process, PHP/Doctrine-based application

    - by Sam
    I have a PHP application using these components: Apache 2.2.3-31 on Centos 5.4 PHP 5.2.10 Xdebug 2.0.5 with Remote Debugging enabled APC 3.0.19 Doctrine ORM for PHP 1.2.1 using Query Caching and Results Caching via APC MySQL 5.0.77 using Query Caching I've noticed that when I start up Apache, I eventually end up 10 child processes. As time goes on, each process will grow in memory until each one approaches 10% of available memory, which begins to slow the server to a crawl since together they grow to take up 100% of memory. Here is a snapshot of my top output: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1471 apache 16 0 626m 201m 18m S 0.0 10.2 1:11.02 httpd 1470 apache 16 0 622m 198m 18m S 0.0 10.1 1:14.49 httpd 1469 apache 16 0 619m 197m 18m S 0.0 10.0 1:11.98 httpd 1462 apache 18 0 622m 197m 18m S 0.0 10.0 1:11.27 httpd 1460 apache 15 0 622m 195m 18m S 0.0 10.0 1:12.73 httpd 1459 apache 16 0 618m 191m 18m S 0.0 9.7 1:13.00 httpd 1461 apache 18 0 616m 190m 18m S 0.0 9.7 1:14.09 httpd 1468 apache 18 0 613m 190m 18m S 0.0 9.7 1:12.67 httpd 7919 apache 18 0 116m 75m 15m S 0.0 3.8 0:19.86 httpd 9486 apache 16 0 97.7m 56m 14m S 0.0 2.9 0:13.51 httpd I have no long-running scripts (they all terminate eventually, the longest being maybe 2 minutes long), and I am working under the assumption that once each script terminates, the memory it uses gets deallocated. (Maybe someone can correct me on that). My hunch is that it could be APC, since it stores data between requests, but at the same time, it seems weird that it would store data inside the httpd process. How can I track down which part of my app is causing the memory leak? What tools can I use to see how the memory usage is growing inside the httpd process and what is contributing to it?

    Read the article

  • How can I find out which processes on my computer are accessing the microphone?

    - by Vinayak
    After reading this interesting Lifehacker post and reading the comments on the page, one person was wondering if it would be possible to use the Physical Device Object Names of other hardware such as the microphone to find out the names of processes using that device. I tried the same approach, but so far it only seems to work for the webcam. Is there any other way I could get this to work in Process Explorer? UPDATE: The Lifehacker post was about finding out which Windows process is currently using your webcam. This is how they went about doing it: Start Device Manager (WIN+R → "devmgmt.msc" → OK) Find your webcam among the list of devices (check under Imaging Devices) Open the properties window of the device and switch to the Details tab (Right click → Properties → Details) In the dropdown menu, select Physical Device Object Name and copy the string(Right click → Copy) Download Process Explorer Make sure you have opened Process Explorer in Administrator Mode(File → Show Details for All Processes) Hit CTRL+F and enter the string you copied earlier(it should be something like \Device\000000XX) Hit the Search button and you should see a list of processes using the webcam(if there are any)

    Read the article

  • Apache2 process stuck at 100% cpu, CLOSE_WAIT socket lingering

    - by mmazing
    I've troubleshooted the heck out of this today, and I can't seem to find any information on how to determine what is happening exactly. Basically, on my development server, another developer is causing CLOSE_WAIT connections that eat up one or more apache2 processes for several hours if I don't restart apache2. strace on any of the processes yields no information, only that it was able to attach. mod_proxy is not enabled. KeepAlive is on, KeepAliveTimeout is 15 seconds, MaxKeepAliveRequests is 100. From what I've been reading, this may or may not be an apache issue at all, just that that's how CLOSE_WAIT works (the server is waiting for a FIN packet to close the connection). I just can't believe that a server would be crippled so easily by not receiving a packet from a remote host telling it to close the connection. Especially without any intervention for well over an hour. Any tips? I'm about to pull my hair out. Edit : Also, there are no unusual entries in any apache log files. Edit 2: lsof -i shows only a single CLOSE_WAIT per hanging process. (That's what has been bothering me about this, as most other discussions talk about many CLOSE_WAIT connections, while I only have one per process.) The nature of the code that is running (php) doesn't really lend itself to closing open connections and whatnot. I can run the same code that he is executing with the same session data, and not result in a hanging process.

    Read the article

  • Mac OS Leopard: SyncServer process constantly using 100% CPU

    - by macca1
    I am running Leopard that I upgraded from Tiger. I've been noticing that every once in a while the SyncServer process starts up and eats up all the CPU. The fans will start going at full blast and the laptop will slow down to a crawl. I need to force quit the process from Activity Monitor to get it under control. It disappears for a while, but eventually gets started again. I do have an iphone as well that I sync so I'm wondering if syncServer might be an apple process checking for my phone plugged in. Edit: Tried iSync and the manual resetsync as suggested, but got this output: Vince-2:~ vince$ /System/Library/Frameworks/SyncServices.framework/Versions/A/Resources/resetsync.pl full 2010-03-12 08:03:50.230 perl[176:10b] SyncServer is unavailable: exception when connecting: connection timeout: did not receive reply PerlObjCBridge: NSException raised while sending reallyResetSyncData to NSObject object name: "ISyncServerUnavailableException" reason: "Can't connect to the sync server: NSPortTimeoutException: connection timeout: did not receive reply ((null))" userInfo: "" location: "/System/Library/Frameworks/SyncServices.framework/Versions/A/Resources/resetsync.pl line 16" ** PerlObjCBridge: dying due to NSException Vince-2:~ vince$ And during that syncServer started spinning up 95-100% just like it always does.

    Read the article

< Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >