Is there a way to do the following:
I have a MySQL DB , and there are many stored procs written in it as well. I use MySQL client library in C to connect to this DB and amongst other things , call the stored procedures. Is there a way to set breakpoints in the stored procedures such that when the call is made from C program ( using myS...
If I run a store procedure with two parameter values (admin, admin)
(parameters : admin, admin)
I get the following message :
Session_UID User_Group_Name Sys_User_Name
------------------------------------ -------------------------------------------------- -
NULLAdministratorsNTMSAdmin
No rows affected.
(1 row(s) returned)
@...
i have maintained two datas into my table
1 column 2 column
PaidDate validitydate
in padidate ill give insert todaydate. but in validity date i may either insert validity for 1 week/1 month.
I have used validity=DATEADD(Day,7,@paiddate) to insert validity for 1 week. but how to gtet the validity for 1 month from todays date
...
I am trying to call a legacy stored function in an Oracle9i DB from Java using Hibernate. The function is declared like this:
create or replace FUNCTION Transferlocation_Fix (mnemonic_code IN VARCHAR2)
RETURN VARCHAR2
After several failed tries and extensive googling, I found this thread on the Hibernate forums which suggested a ma...
Is it possible to execute a php file using mysql stored procedure or event scheduler?
...
I'm trying to execute a simple stored procedure with Spring/Hibernate using Annotations.
Here are my code snippets:
DAO class:
public class UserDAO extends HibernateDaoSupport {
public List selectUsers(final String eid){
return (List) getHibernateTemplate().execute(new HibernateCallback() {
p...
In SQL Server, it is possible to test the result of a stored procedure to know if the result return rows or nothing ?
Example :
EXEC _sp_MySp 1, 2, 3
IF @@ROWCOUNT = 0
BEGIN
PRINT('Empty')
END
ELSE
BEGIN
PRINT(@@ROWCOUNT)
END
But @@ROWCOUNT always return 0 so maybe is there another way of doing this ?
...
Hi all,
I am trying to use a Stored Procedure which takes two parameters (login, pw) and returns the user info.
If I execute the SP manually, I get
Session_UID User_Group_Name Sys_User_Name
------------------------------------ -------------------------------------------------- -
NULL Administrators NTMSAd...
I want to be able to pass in the name of a stored procedure as a string into another stored procedure and have it called with dynamic parameters. I'm getting an error though.
Specifically I've tried:
create procedure test @var1 varchar(255), @var2 varchar(255) as
select 1
create procedure call_it @proc_name varchar(255)
as
...
Hello everyone,
I am using SQL Server 2008 Enterprise. I met with issue which says line 9 of stored procedure foo is meeting with dead lock issue. My question is how to find exactly the 9th line of the stored procedure?
My confusion is because of coding format issue, how to locate 9th line correctly.
thanks in advance,
George
...
Possible Duplicate:
Does SQL Server 2005 have an equivalent to MySqls ENUM data type?
Is there any way to define ENUM in SQL Server 2005?
I have fixed values which I need to use in procedures and functions.
...
How to execute a stored procedure with a nullable parameter in c#?
EDIT:
Actually, I've written below code. As you can see, status parameter is a nullable value type.
Is it correct? or not?
public void LoadAll(DataTable tb, int? status=null)
{
try
{
using (SqlConnection connection = new SqlConnection()...
I have an Oracle procedure - editBacklog which I'm calling from a CFM page via cfstoredproc. After several changes to the procedure I started getting ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'EDITBACKLOG'. I've gotten this before and found that if I changed the name of the procedure it start...
I use IDataReader to call stored procedures without parameters. I am not finding examples of how to do this when parameters are present. Does IDataReader handle parameters of stored procedure?
Please provide an example.
...
I work in a location where a single person is responsible for creating and maintaining all stored procedures for SQL servers, and is the conduit between software developers and the database. There are a lot of stored procedures in place, and with a database diagram it is simple enough 90% of the time to figure out what the stored proced...
Is it possible to turn result sets obtained in LINQ through a stored procedure or function call into a "live" set of objects of which I can retrieve Foreign Key related objects?
If, for example, my stored procedure returns a set of rows (= LINQ objects) of type "Contact", then I can't seem to obtain Contact.BillingAddress (which is rela...
Hello,
I have a unique issue that I need advice on.
I've been writing asp.net apps with SQL Server back ends for the past 10 years. During that time, I have also written some PHP apps, but not many.
I'm going to be porting some of my asp.net apps to PHP and have run into a bit of an issue. In the Asp.net world, it's generally understo...
Hi,
Am trying to debug a stored proc in SQL Server 2005, which is located at a remote location, from within my VS 2008 Team System (which is located in my local machine). The SQL Server and my machine are in 2 different domains. I tried to run visual studio using the Runas command for the User with which I am connecting to the remote sq...
We're using NHibernate.Mapping.Attributes to do our mappings.
In order to get NHibernate to populate a data object automatically, it appears that you need to allow for an identity column. Okay, no problem, I added a (fake) PK column to my stored procedure results (it's a report query, so the identifier doesn't need to mean anything as l...
I am forced to manage an auto-increment field from code. I've decided to write a stored procedure to do this for me. The idea is to have a procedure that inserts a new row and returns the auto-incremented value to Java so I can work with it further. The following is what I have so far. I don't know what to change to fill the gaps to ...