Click here to Skip to main content
15,890,043 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralAccess Database Engine 2010 Redistributable is not intended Pin
David Mujica8-Oct-12 2:56
David Mujica8-Oct-12 2:56 
GeneralRe: Access Database Engine 2010 Redistributable is not intended Pin
n.podbielski9-Oct-12 0:28
n.podbielski9-Oct-12 0:28 
AnswerRe: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. Pin
Murugan Kolanji14-Oct-12 3:22
Murugan Kolanji14-Oct-12 3:22 
QuestionRandomize Data of Groupboxes Pin
ASPnoob5-Oct-12 23:38
ASPnoob5-Oct-12 23:38 
AnswerRe: Randomize Data of Groupboxes Pin
Rockstar_7-Oct-12 20:10
professionalRockstar_7-Oct-12 20:10 
AnswerRe: Randomize Data of Groupboxes Pin
Rockstar_7-Oct-12 20:46
professionalRockstar_7-Oct-12 20:46 
Questionweird problems: nothing is happening!! Pin
Jassim Rahma5-Oct-12 6:50
Jassim Rahma5-Oct-12 6:50 
AnswerRe: weird problems: nothing is happening!! Pin
jkirkerx5-Oct-12 8:43
professionaljkirkerx5-Oct-12 8:43 
I don't write in c-sharp, but vb is my thing, but I did my best to rewrite the function in how I think it should be written. The catch will tell you what's wrong with your function or TSQL.

Also it's best practice to package everything first, then open the database, execute, and close the database all in 1 shot.

I can't test your TSQL, in my tester program, that would take another 20 minutes for me.

exitCode int = 2;


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

param_Channel_ID SqlParameter = new SqlParameter("@param_channel_id", SqlDbType.Int);
param_Channel_ID.Value = channel_id;
sql_command.Add(param_Channel_ID);

param_Member_ID SqlParameter = new SqlParameter("@param_volow_member_id", SqlDbType.Int);
param_Member_ID.Value = Convert.ToInt32(Session["volow_member_id"]);
sql_command.Add(param_Memeber_ID);

param_Created SqlParameter = new SqlParameter("@param_is_channel_created", SqlDbType.Bit); 
//[edit] I think it's boolean in mySQL, and bit in SQL Server
param_Created.Value = Convert.ToBoolean(ParameterDirection.Output);
sql_command.Add(param_Created_ID);

try {
   // execute the query;
   sql_connection.Open();
   sql_reader SqlDataReader = sql_command.ExecuteReader();
   sql_command.ExecuteNonQuery();
   sql_reader.Close();
   sql_connection.Close();
   exitCode = 0
}
catch ex as SQLException {
 exitCode = 1
 //Exception for the function
 //SQLException for the TSQL
}

return exitCode;



BEGIN
        SET param_is_channel_created = TRUE;
        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
           SET param_is_channel_created = FALSE;     
           UPDATE volow_members SET is_channel_created=param_is_channel_created;                
        END;
        END IF;
END

GeneralRe: weird problems: nothing is happening!! Pin
Jassim Rahma5-Oct-12 9:36
Jassim Rahma5-Oct-12 9:36 
AnswerRe: weird problems: nothing is happening!! Pin
Rockstar_7-Oct-12 20:15
professionalRockstar_7-Oct-12 20:15 
AnswerRe: weird problems: nothing is happening!! Pin
Sunil_Nikam8-Oct-12 5:27
Sunil_Nikam8-Oct-12 5:27 
GeneralRe: weird problems: nothing is happening!! Pin
Jassim Rahma8-Oct-12 6:52
Jassim Rahma8-Oct-12 6:52 
GeneralRe: weird problems: nothing is happening!! Pin
Jassim Rahma8-Oct-12 7:09
Jassim Rahma8-Oct-12 7:09 
GeneralRe: weird problems: nothing is happening!! Pin
Jassim Rahma8-Oct-12 7:10
Jassim Rahma8-Oct-12 7:10 
GeneralRe: weird problems: nothing is happening!! Pin
Sunil_Nikam8-Oct-12 21:06
Sunil_Nikam8-Oct-12 21:06 
QuestionHow to Develop asp.net application to control Time and authenticationfingerprint Device such as get user ID Pin
osama_hagrass5-Oct-12 3:54
osama_hagrass5-Oct-12 3:54 
AnswerDevice Pin
David Mujica5-Oct-12 6:20
David Mujica5-Oct-12 6:20 
GeneralRe: Device Pin
osama_hagrass5-Oct-12 7:25
osama_hagrass5-Oct-12 7:25 
GeneralRe: Device Pin
Rockstar_7-Oct-12 20:19
professionalRockstar_7-Oct-12 20:19 
Questionhow to Run an URL inside a WCF webservice, the URL return a mp3/zip file Pin
findprasad5-Oct-12 3:50
findprasad5-Oct-12 3:50 
Questionworking with menu control in asp.net 2.0 Pin
rimjhim_45-Oct-12 2:21
rimjhim_45-Oct-12 2:21 
AnswerRe: working with menu control in asp.net 2.0 Pin
Sandeep Mewara5-Oct-12 2:28
mveSandeep Mewara5-Oct-12 2:28 
AnswerRe: working with menu control in asp.net 2.0 Pin
Rockstar_7-Oct-12 20:21
professionalRockstar_7-Oct-12 20:21 
QuestionMVC Pin
JabbarJahambana4-Oct-12 22:52
JabbarJahambana4-Oct-12 22:52 
AnswerRe: MVC Pin
Sandeep Mewara5-Oct-12 2:47
mveSandeep Mewara5-Oct-12 2:47 

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.