Click here to Skip to main content
15,896,118 members
Home / Discussions / Database
   

Database

 
GeneralRe: SQL counting Pin
Qazzy648-Oct-12 10:07
Qazzy648-Oct-12 10:07 
QuestionRe: SQL counting Pin
Eddy Vluggen8-Oct-12 13:25
professionalEddy Vluggen8-Oct-12 13:25 
AnswerRe: SQL counting Pin
Qazzy648-Oct-12 17:35
Qazzy648-Oct-12 17:35 
GeneralRe: SQL counting Pin
Eddy Vluggen9-Oct-12 5:08
professionalEddy Vluggen9-Oct-12 5:08 
GeneralRe: SQL counting Pin
Qazzy649-Oct-12 7:16
Qazzy649-Oct-12 7:16 
QuestionProblem in Import XML File From SSIS Pin
mos_tafino@hotmail.com8-Oct-12 1:31
mos_tafino@hotmail.com8-Oct-12 1:31 
AnswerRe: Problem in Import XML File From SSIS Pin
mos_tafino@hotmail.com8-Oct-12 19:52
mos_tafino@hotmail.com8-Oct-12 19:52 
QuestionProblem with MySQL stored procedure Pin
Jassim Rahma7-Oct-12 7:27
Jassim Rahma7-Oct-12 7:27 
Hi,

What's the problem with this code?:

SQL
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_delete_channel`(IN param_channel_id int, IN param_volow_member_id int, OUT param_is_channel_created bit)
BEGIN
    DELETE FROM member_posts WHERE member_channel_id = param_channel_id;
    DELETE FROM member_channels WHERE member_channel_id = param_channel_id;

    IF NOT EXISTS (SELECT member_channel_id FROM member_channels WHERE volow_member_id = param_volow_member_id) THEN
    BEGIN
        UPDATE volow_members SET is_channel_created = FALSE;

        SET param_is_channel_created = FALSE;
    END;
    ELSE SET param_is_channel_created = TRUE;
    END IF;
END


I am not getting any error on mysql neither on the .net application?!!

here is my .net code:

C#
sql_connection = new MySqlConnection(ConfigurationManager.ConnectionStrings["SQLdb"].ConnectionString);
sql_command = new MySqlCommand("sp_delete_channel", sql_connection);
sql_command.CommandType = CommandType.StoredProcedure;
sql_connection.Open();

sql_command.Parameters.AddWithValue("param_channel_id", channel_id).MySqlDbType = MySqlDbType.Int32;
sql_command.Parameters.AddWithValue("param_volow_member_id", Convert.ToInt32(Session["volow_member_id"])).MySqlDbType = MySqlDbType.Int32;
sql_command.Parameters.AddWithValue("param_is_channel_created", MySqlDbType.Bit).Direction = ParameterDirection.Output;

// execute the query;
int result_row = sql_command.ExecuteNonQuery();

if (Convert.ToBoolean(sql_command.Parameters["param_is_channel_created"].Value) != true)
{ Session["is_channel_created"] = false; }

AnswerRe: Problem with MySQL stored procedure Pin
Jörgen Andersson7-Oct-12 10:43
professionalJörgen Andersson7-Oct-12 10:43 
GeneralRe: Problem with MySQL stored procedure Pin
Jassim Rahma7-Oct-12 10:52
Jassim Rahma7-Oct-12 10:52 
AnswerRe: Problem with MySQL stored procedure Pin
Eddy Vluggen8-Oct-12 0:51
professionalEddy Vluggen8-Oct-12 0:51 
AnswerRe: Problem with MySQL stored procedure Pin
Bernhard Hiller7-Oct-12 22:26
Bernhard Hiller7-Oct-12 22:26 
GeneralRe: Problem with MySQL stored procedure Pin
Jassim Rahma7-Oct-12 23:31
Jassim Rahma7-Oct-12 23:31 
AnswerRe: Problem with MySQL stored procedure Pin
Shameel8-Oct-12 1:56
professionalShameel8-Oct-12 1:56 
GeneralRe: Problem with MySQL stored procedure Pin
Jassim Rahma8-Oct-12 6:54
Jassim Rahma8-Oct-12 6:54 
GeneralRe: Problem with MySQL stored procedure Pin
Jassim Rahma8-Oct-12 7:11
Jassim Rahma8-Oct-12 7:11 
Questionterminating SqlConnection.Open() call while connecting Pin
Danzy834-Oct-12 7:43
Danzy834-Oct-12 7:43 
AnswerRe: terminating SqlConnection.Open() call while connecting Pin
Shameel4-Oct-12 8:46
professionalShameel4-Oct-12 8:46 
AnswerRe: terminating SqlConnection.Open() call while connecting Pin
Eddy Vluggen4-Oct-12 9:10
professionalEddy Vluggen4-Oct-12 9:10 
GeneralRe: terminating SqlConnection.Open() call while connecting Pin
Danzy835-Oct-12 4:37
Danzy835-Oct-12 4:37 
GeneralRe: terminating SqlConnection.Open() call while connecting Pin
Eddy Vluggen5-Oct-12 4:57
professionalEddy Vluggen5-Oct-12 4:57 
QuestionSQL 2000 to 2008R2 Query Performance Pin
cjb1104-Oct-12 5:13
cjb1104-Oct-12 5:13 
AnswerRe: SQL 2000 to 2008R2 Query Performance Pin
Shameel4-Oct-12 9:01
professionalShameel4-Oct-12 9:01 
GeneralRe: SQL 2000 to 2008R2 Query Performance Pin
cjb1104-Oct-12 22:30
cjb1104-Oct-12 22:30 
AnswerExecution plan Pin
David Mujica4-Oct-12 10:25
David Mujica4-Oct-12 10:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.