Click here to Skip to main content
12,503,591 members (54,073 online)
   

Database

 
AnswerRe: MySQL code- Problems with cade when inside a WHERE clause Pin
Jörgen Andersson9-Oct-12 11:47
memberJörgen Andersson9-Oct-12 11:47 
QuestionDatabase connectivity failure when using ODBC Pin
bharath_ben9-Oct-12 3:16
memberbharath_ben9-Oct-12 3:16 
AnswerRe: Database connectivity failure when using ODBC Pin
Jochen Arndt9-Oct-12 3:43
memberJochen Arndt9-Oct-12 3:43 
GeneralRe: Database connectivity failure when using ODBC Pin
bharath_ben28-Nov-12 3:46
memberbharath_ben28-Nov-12 3:46 
QuestionSQL counting Pin
Qazzy648-Oct-12 8:27
memberQazzy648-Oct-12 8:27 
AnswerRe: SQL counting Pin
scottgp8-Oct-12 9:33
memberscottgp8-Oct-12 9:33 
GeneralRe: SQL counting Pin
Qazzy648-Oct-12 10:07
memberQazzy648-Oct-12 10:07 
QuestionRe: SQL counting Pin
Eddy Vluggen8-Oct-12 13:25
memberEddy Vluggen8-Oct-12 13:25 
AnswerRe: SQL counting Pin
Qazzy648-Oct-12 17:35
memberQazzy648-Oct-12 17:35 
GeneralRe: SQL counting Pin
Eddy Vluggen9-Oct-12 5:08
memberEddy Vluggen9-Oct-12 5:08 
GeneralRe: SQL counting Pin
Qazzy649-Oct-12 7:16
memberQazzy649-Oct-12 7:16 
QuestionProblem in Import XML File From SSIS Pin
mos_tafino@hotmail.com8-Oct-12 1:31
membermos_tafino@hotmail.com8-Oct-12 1:31 
AnswerRe: Problem in Import XML File From SSIS Pin
mos_tafino@hotmail.com8-Oct-12 19:52
membermos_tafino@hotmail.com8-Oct-12 19:52 
QuestionProblem with MySQL stored procedure Pin
jrahma7-Oct-12 7:27
memberjrahma7-Oct-12 7:27 
Hi,

What's the problem with this code?:

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:

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
memberJörgen Andersson7-Oct-12 10:43 
GeneralRe: Problem with MySQL stored procedure Pin
jrahma7-Oct-12 10:52
memberjrahma7-Oct-12 10:52 
AnswerRe: Problem with MySQL stored procedure Pin
Eddy Vluggen8-Oct-12 0:51
memberEddy Vluggen8-Oct-12 0:51 
AnswerRe: Problem with MySQL stored procedure Pin
Bernhard Hiller7-Oct-12 22:26
memberBernhard Hiller7-Oct-12 22:26 
GeneralRe: Problem with MySQL stored procedure Pin
jrahma7-Oct-12 23:31
memberjrahma7-Oct-12 23:31 
AnswerRe: Problem with MySQL stored procedure Pin
Shameel8-Oct-12 1:56
memberShameel8-Oct-12 1:56 
GeneralRe: Problem with MySQL stored procedure Pin
jrahma8-Oct-12 6:54
memberjrahma8-Oct-12 6:54 
GeneralRe: Problem with MySQL stored procedure Pin
jrahma8-Oct-12 7:11
memberjrahma8-Oct-12 7:11 
Questionterminating SqlConnection.Open() call while connecting Pin
Dan_K4-Oct-12 7:43
memberDan_K4-Oct-12 7:43 
AnswerRe: terminating SqlConnection.Open() call while connecting Pin
Shameel4-Oct-12 8:46
memberShameel4-Oct-12 8:46 
AnswerRe: terminating SqlConnection.Open() call while connecting Pin
Eddy Vluggen4-Oct-12 9:10
memberEddy Vluggen4-Oct-12 9:10 
GeneralRe: terminating SqlConnection.Open() call while connecting Pin
Dan_K5-Oct-12 4:37
memberDan_K5-Oct-12 4:37 
GeneralRe: terminating SqlConnection.Open() call while connecting Pin
Eddy Vluggen5-Oct-12 4:57
memberEddy Vluggen5-Oct-12 4:57 
QuestionSQL 2000 to 2008R2 Query Performance Pin
cjb1104-Oct-12 5:13
membercjb1104-Oct-12 5:13 
AnswerRe: SQL 2000 to 2008R2 Query Performance Pin
Shameel4-Oct-12 9:01
memberShameel4-Oct-12 9:01 
GeneralRe: SQL 2000 to 2008R2 Query Performance Pin
cjb1104-Oct-12 22:30
membercjb1104-Oct-12 22:30 
AnswerExecution plan Pin
David Mujica4-Oct-12 10:25
memberDavid Mujica4-Oct-12 10:25 
GeneralRe: Execution plan Pin
cjb1104-Oct-12 20:58
membercjb1104-Oct-12 20:58 
GeneralRe: Execution plan Pin
David Mujica8-Oct-12 8:54
memberDavid Mujica8-Oct-12 8:54 
GeneralRe: Execution plan Pin
cjb1108-Oct-12 23:41
membercjb1108-Oct-12 23:41 
GeneralRe: Execution plan Pin
David Mujica9-Oct-12 3:12
memberDavid Mujica9-Oct-12 3:12 
GeneralRe: Execution plan Pin
cjb1109-Oct-12 4:34
membercjb1109-Oct-12 4:34 
GeneralHigh CPU Pin
David Mujica9-Oct-12 9:13
memberDavid Mujica9-Oct-12 9:13 
GeneralRe: High CPU Pin
cjb11010-Oct-12 21:30
membercjb11010-Oct-12 21:30 
GeneralRe: High CPU Pin
cjb11010-Oct-12 23:15
membercjb11010-Oct-12 23:15 
QuestionMySQL Server timestamp changed! Pin
jrahma2-Oct-12 21:53
memberjrahma2-Oct-12 21:53 
AnswerRe: MySQL Server timestamp changed! Pin
Shameel3-Oct-12 4:05
memberShameel3-Oct-12 4:05 
QuestionConnection String for Ms access 2010 to Windows 7 64 Bit Pin
Satyam Tripathi2-Oct-12 21:33
memberSatyam Tripathi2-Oct-12 21:33 
AnswerRe: Connection String for Ms access 2010 to Windows 7 64 Bit Pin
Richard MacCutchan2-Oct-12 22:00
mvpRichard MacCutchan2-Oct-12 22:00 
QuestionBackup/Recover of row data in a multi-Company database Pin
DeDawg2-Oct-12 10:35
memberDeDawg2-Oct-12 10:35 
AnswerRe: Backup/Recover of row data in a multi-Company database Pin
Mika Wendelius2-Oct-12 11:17
mvpMika Wendelius2-Oct-12 11:17 
GeneralRe: Backup/Recover of row data in a multi-Company database Pin
DeDawg2-Oct-12 11:22
memberDeDawg2-Oct-12 11:22 
GeneralRe: Backup/Recover of row data in a multi-Company database Pin
Mika Wendelius2-Oct-12 18:22
mvpMika Wendelius2-Oct-12 18:22 
AnswerRe: Backup/Recover of row data in a multi-Company database Pin
Mycroft Holmes3-Oct-12 7:39
memberMycroft Holmes3-Oct-12 7:39 
GeneralRe: Backup/Recover of row data in a multi-Company database Pin
DeDawg3-Oct-12 7:43
memberDeDawg3-Oct-12 7:43 
GeneralRe: Backup/Recover of row data in a multi-Company database Pin
Mycroft Holmes3-Oct-12 8:02
memberMycroft Holmes3-Oct-12 8:02 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160919.1 | Last Updated 26 Sep 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid