Click here to Skip to main content
15,900,378 members
Home / Discussions / Database
   

Database

 
QuestionJoining three tables in sql server 2012 Pin
umair275624-Nov-14 4:06
professionalumair275624-Nov-14 4:06 
AnswerRe: Joining three tables in sql server 2012 Pin
Simon_Whale24-Nov-14 4:56
Simon_Whale24-Nov-14 4:56 
AnswerRe: Joining three tables in sql server 2012 Pin
Eddy Vluggen24-Nov-14 7:36
professionalEddy Vluggen24-Nov-14 7:36 
AnswerRe: Joining three tables in sql server 2012 Pin
Jörgen Andersson24-Nov-14 21:47
professionalJörgen Andersson24-Nov-14 21:47 
AnswerRe: Joining three tables in sql server 2012 Pin
syed shanu30-Nov-14 22:13
professionalsyed shanu30-Nov-14 22:13 
Questionclustering index Pin
Amr Mohammad23-Nov-14 9:04
Amr Mohammad23-Nov-14 9:04 
AnswerRe: clustering index Pin
PIEBALDconsult23-Nov-14 9:12
mvePIEBALDconsult23-Nov-14 9:12 
GeneralRe: clustering index Pin
Amr Mohammad23-Nov-14 9:31
Amr Mohammad23-Nov-14 9:31 
GeneralRe: clustering index Pin
PIEBALDconsult23-Nov-14 9:57
mvePIEBALDconsult23-Nov-14 9:57 
AnswerRe: clustering index Pin
PIEBALDconsult23-Nov-14 10:29
mvePIEBALDconsult23-Nov-14 10:29 
GeneralRe: clustering index Pin
Amr Mohammad23-Nov-14 10:44
Amr Mohammad23-Nov-14 10:44 
QuestionProblem reading null Pin
Jassim Rahma21-Nov-14 0:25
Jassim Rahma21-Nov-14 0:25 
AnswerRe: Problem reading null Pin
Chris Quinn21-Nov-14 0:50
Chris Quinn21-Nov-14 0:50 
AnswerRe: Problem reading null Pin
Jörgen Andersson21-Nov-14 1:33
professionalJörgen Andersson21-Nov-14 1:33 
GeneralRe: Problem reading null Pin
Jassim Rahma21-Nov-14 2:51
Jassim Rahma21-Nov-14 2:51 
GeneralRe: Problem reading null Pin
Jörgen Andersson21-Nov-14 3:39
professionalJörgen Andersson21-Nov-14 3:39 
GeneralRe: Problem reading null Pin
Jassim Rahma21-Nov-14 4:38
Jassim Rahma21-Nov-14 4:38 
GeneralRe: Problem reading null Pin
GuyThiebaut21-Nov-14 4:53
professionalGuyThiebaut21-Nov-14 4:53 
GeneralRe: Problem reading null Pin
Jassim Rahma21-Nov-14 5:05
Jassim Rahma21-Nov-14 5:05 
GeneralRe: Problem reading null Pin
GuyThiebaut21-Nov-14 5:48
professionalGuyThiebaut21-Nov-14 5:48 
GeneralRe: Problem reading null Pin
Jassim Rahma21-Nov-14 8:02
Jassim Rahma21-Nov-14 8:02 
GeneralRe: Problem reading null Pin
Jassim Rahma21-Nov-14 5:17
Jassim Rahma21-Nov-14 5:17 
and this is my .NET application code:

C#
sql_connection = new MySqlConnection(xmlClass.get_connectionstring("Assets\\Assets"));
sql_connection.Open();
sql_command = new MySqlCommand("sp_populate_asset_audits", sql_connection);
sql_command.CommandType = CommandType.StoredProcedure;
sql_command.CommandTimeout = Convert.ToInt32(string_encryptor.DecryptString(xmlClass.read_xml_value("Assets\\Assets", "CommandTimeOut"), "JassimRahma@731004167"));
sql_command.Parameters.AddWithValue("param_item_id", item_id).MySqlDbType = MySqlDbType.Int32;
sql_command.Parameters.AddWithValue("param_loaction", Convert.ToInt32(gridLocation.GetRowCellValue(gridLocation.FocusedRowHandle, "location_id"))).MySqlDbType = MySqlDbType.Int32;
if (gridLocation.GetRowCellValue(gridLocation.FocusedRowHandle, "floor_id") != null) sql_command.Parameters.AddWithValue("param_floor", Convert.ToInt32(gridLocation.GetRowCellValue(gridLocation.FocusedRowHandle, "floor_id"))).MySqlDbType = MySqlDbType.Int32; else sql_command.Parameters.AddWithValue("param_floor", DBNull.Value).MySqlDbType = MySqlDbType.Int32;
if (gridLocation.GetRowCellValue(gridLocation.FocusedRowHandle, "room_id") != DBNull.Value) sql_command.Parameters.AddWithValue("param_room", Convert.ToInt32(gridLocation.GetRowCellValue(gridLocation.FocusedRowHandle, "room_id"))).MySqlDbType = MySqlDbType.Int32; else sql_command.Parameters.AddWithValue("param_room", DBNull.Value).MySqlDbType = MySqlDbType.Int32;
if (gridLocation.GetRowCellValue(gridLocation.FocusedRowHandle, "department_id") != DBNull.Value) sql_command.Parameters.AddWithValue("param_department", Convert.ToInt32(gridLocation.GetRowCellValue(gridLocation.FocusedRowHandle, "department_id"))).MySqlDbType = MySqlDbType.Int32; else sql_command.Parameters.AddWithValue("param_department", DBNull.Value).MySqlDbType = MySqlDbType.Int32;
// sql_command.Parameters.AddWithValue("param_employee", Convert.ToInt32(gridLocation.GetRowCellValue(gridLocation.FocusedRowHandle, "employee"))).MySqlDbType = MySqlDbType.Int32;
sql_command.Parameters.AddWithValue("param_employee", DBNull.Value).MySqlDbType = MySqlDbType.Int32;



Technology News @ www.JassimRahma.com

GeneralRe: Problem reading null Pin
Jörgen Andersson21-Nov-14 6:02
professionalJörgen Andersson21-Nov-14 6:02 
GeneralRe: Problem reading null Pin
GuyThiebaut21-Nov-14 4:45
professionalGuyThiebaut21-Nov-14 4:45 
AnswerRe: Problem reading null Pin
Smart00328-Nov-14 4:47
professionalSmart00328-Nov-14 4: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.