Click here to Skip to main content
11,437,002 members (66,007 online)
   

Database

 
AnswerRe: MySQL code- Problems with cade when inside a WHERE clause Pin
Jörgen Andersson9-Oct-12 12:47
memberJörgen Andersson9-Oct-12 12:47 
QuestionDatabase connectivity failure when using ODBC Pin
bharath_ben9-Oct-12 4:16
memberbharath_ben9-Oct-12 4:16 
AnswerRe: Database connectivity failure when using ODBC Pin
Jochen Arndt9-Oct-12 4:43
memberJochen Arndt9-Oct-12 4:43 
GeneralRe: Database connectivity failure when using ODBC Pin
bharath_ben28-Nov-12 4:46
memberbharath_ben28-Nov-12 4:46 
QuestionSQL counting Pin
Qazzy648-Oct-12 9:27
memberQazzy648-Oct-12 9:27 
AnswerRe: SQL counting Pin
scottgp8-Oct-12 10:33
memberscottgp8-Oct-12 10:33 
GeneralRe: SQL counting Pin
Qazzy648-Oct-12 11:07
memberQazzy648-Oct-12 11:07 
QuestionRe: SQL counting Pin
Eddy Vluggen8-Oct-12 14:25
memberEddy Vluggen8-Oct-12 14:25 
AnswerRe: SQL counting Pin
Qazzy648-Oct-12 18:35
memberQazzy648-Oct-12 18:35 
GeneralRe: SQL counting Pin
Eddy Vluggen9-Oct-12 6:08
memberEddy Vluggen9-Oct-12 6:08 
GeneralRe: SQL counting Pin
Qazzy649-Oct-12 8:16
memberQazzy649-Oct-12 8:16 
QuestionProblem in Import XML File From SSIS [modified] Pin
mos_tafino@hotmail.com8-Oct-12 2:31
membermos_tafino@hotmail.com8-Oct-12 2:31 
AnswerRe: Problem in Import XML File From SSIS Pin
mos_tafino@hotmail.com8-Oct-12 20:52
membermos_tafino@hotmail.com8-Oct-12 20:52 
QuestionProblem with MySQL stored procedure Pin
jrahma7-Oct-12 8:27
memberjrahma7-Oct-12 8: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 11:43
memberJörgen Andersson7-Oct-12 11:43 
GeneralRe: Problem with MySQL stored procedure Pin
jrahma7-Oct-12 11:52
memberjrahma7-Oct-12 11:52 
AnswerRe: Problem with MySQL stored procedure Pin
Eddy Vluggen8-Oct-12 1:51
memberEddy Vluggen8-Oct-12 1:51 
AnswerRe: Problem with MySQL stored procedure Pin
Bernhard Hiller7-Oct-12 23:26
memberBernhard Hiller7-Oct-12 23:26 
GeneralRe: Problem with MySQL stored procedure Pin
jrahma8-Oct-12 0:31
memberjrahma8-Oct-12 0:31 
AnswerRe: Problem with MySQL stored procedure Pin
Shameel8-Oct-12 2:56
memberShameel8-Oct-12 2:56 
GeneralRe: Problem with MySQL stored procedure Pin
jrahma8-Oct-12 7:54
memberjrahma8-Oct-12 7:54 
GeneralRe: Problem with MySQL stored procedure Pin
jrahma8-Oct-12 8:11
memberjrahma8-Oct-12 8:11 
Questionterminating SqlConnection.Open() call while connecting Pin
Dan_K4-Oct-12 8:43
memberDan_K4-Oct-12 8:43 
AnswerRe: terminating SqlConnection.Open() call while connecting [modified] Pin
Shameel4-Oct-12 9:46
memberShameel4-Oct-12 9:46 
AnswerRe: terminating SqlConnection.Open() call while connecting Pin
Eddy Vluggen4-Oct-12 10:10
memberEddy Vluggen4-Oct-12 10:10 
GeneralRe: terminating SqlConnection.Open() call while connecting Pin
Dan_K5-Oct-12 5:37
memberDan_K5-Oct-12 5:37 
GeneralRe: terminating SqlConnection.Open() call while connecting Pin
Eddy Vluggen5-Oct-12 5:57
memberEddy Vluggen5-Oct-12 5:57 
QuestionSQL 2000 to 2008R2 Query Performance Pin
cjb1104-Oct-12 6:13
membercjb1104-Oct-12 6:13 
AnswerRe: SQL 2000 to 2008R2 Query Performance Pin
Shameel4-Oct-12 10:01
memberShameel4-Oct-12 10:01 
GeneralRe: SQL 2000 to 2008R2 Query Performance Pin
cjb1104-Oct-12 23:30
membercjb1104-Oct-12 23:30 
AnswerExecution plan Pin
David Mujica4-Oct-12 11:25
memberDavid Mujica4-Oct-12 11:25 
GeneralRe: Execution plan Pin
cjb1104-Oct-12 21:58
membercjb1104-Oct-12 21:58 
GeneralRe: Execution plan Pin
David Mujica8-Oct-12 9:54
memberDavid Mujica8-Oct-12 9:54 
GeneralRe: Execution plan Pin
cjb1109-Oct-12 0:41
membercjb1109-Oct-12 0:41 
GeneralRe: Execution plan Pin
David Mujica9-Oct-12 4:12
memberDavid Mujica9-Oct-12 4:12 
GeneralRe: Execution plan Pin
cjb1109-Oct-12 5:34
membercjb1109-Oct-12 5:34 
GeneralHigh CPU Pin
David Mujica9-Oct-12 10:13
memberDavid Mujica9-Oct-12 10:13 
GeneralRe: High CPU Pin
cjb11010-Oct-12 22:30
membercjb11010-Oct-12 22:30 
GeneralRe: High CPU Pin
cjb11011-Oct-12 0:15
membercjb11011-Oct-12 0:15 
QuestionMySQL Server timestamp changed! Pin
jrahma2-Oct-12 22:53
memberjrahma2-Oct-12 22:53 
AnswerRe: MySQL Server timestamp changed! Pin
Shameel3-Oct-12 5:05
memberShameel3-Oct-12 5:05 
QuestionConnection String for Ms access 2010 to Windows 7 64 Bit Pin
Satyam Tripathi2-Oct-12 22:33
memberSatyam Tripathi2-Oct-12 22:33 
AnswerRe: Connection String for Ms access 2010 to Windows 7 64 Bit Pin
Richard MacCutchan2-Oct-12 23:00
mvpRichard MacCutchan2-Oct-12 23:00 
QuestionBackup/Recover of row data in a multi-Company database Pin
DeDawg2-Oct-12 11:35
memberDeDawg2-Oct-12 11:35 
AnswerRe: Backup/Recover of row data in a multi-Company database Pin
Mika Wendelius2-Oct-12 12:17
mvpMika Wendelius2-Oct-12 12:17 
GeneralRe: Backup/Recover of row data in a multi-Company database Pin
DeDawg2-Oct-12 12:22
memberDeDawg2-Oct-12 12:22 
GeneralRe: Backup/Recover of row data in a multi-Company database Pin
Mika Wendelius2-Oct-12 19:22
mvpMika Wendelius2-Oct-12 19:22 
AnswerRe: Backup/Recover of row data in a multi-Company database Pin
Mycroft Holmes3-Oct-12 8:39
memberMycroft Holmes3-Oct-12 8:39 
GeneralRe: Backup/Recover of row data in a multi-Company database Pin
DeDawg3-Oct-12 8:43
memberDeDawg3-Oct-12 8:43 
GeneralRe: Backup/Recover of row data in a multi-Company database Pin
Mycroft Holmes3-Oct-12 9:02
memberMycroft Holmes3-Oct-12 9:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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
Web01 | 2.8.150428.2 | Last Updated 6 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid