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

Database

 
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 
Questionmysql decimal fromat like ##.## Pin
Gilbert Consellado20-Nov-14 13:12
professionalGilbert Consellado20-Nov-14 13:12 
AnswerRe: mysql decimal fromat like ##.## Pin
Richard Andrew x6420-Nov-14 15:47
professionalRichard Andrew x6420-Nov-14 15:47 
GeneralRe: mysql decimal fromat like ##.## Pin
Gilbert Consellado22-Nov-14 13:46
professionalGilbert Consellado22-Nov-14 13:46 
AnswerRe: mysql decimal fromat like ##.## Pin
Shweta N Mishra21-Nov-14 5:50
professionalShweta N Mishra21-Nov-14 5:50 
GeneralRe: mysql decimal fromat like ##.## Pin
Gilbert Consellado22-Nov-14 13:43
professionalGilbert Consellado22-Nov-14 13:43 
GeneralRe: mysql decimal fromat like ##.## Pin
Shweta N Mishra23-Nov-14 2:06
professionalShweta N Mishra23-Nov-14 2:06 
GeneralRe: mysql decimal fromat like ##.## Pin
Gilbert Consellado24-Nov-14 12:47
professionalGilbert Consellado24-Nov-14 12:47 
QuestionProblem in Insering Long text in mysql from c# Pin
Ramachandra12720-Nov-14 7:09
Ramachandra12720-Nov-14 7:09 
GeneralRe: Problem in Insering Long text in mysql from c# Pin
PIEBALDconsult20-Nov-14 7:33
mvePIEBALDconsult20-Nov-14 7:33 
QuestionSQL Replace Function - error recognizing two or more strings Pin
miss78617-Nov-14 23:44
miss78617-Nov-14 23:44 
AnswerRe: SQL Replace Function - error recognizing two or more strings Pin
Richard Deeming18-Nov-14 2:53
mveRichard Deeming18-Nov-14 2:53 
GeneralRe: SQL Replace Function - error recognizing two or more strings Pin
miss78618-Nov-14 3:53
miss78618-Nov-14 3:53 
GeneralRe: SQL Replace Function - error recognizing two or more strings Pin
Richard Deeming18-Nov-14 6:00
mveRichard Deeming18-Nov-14 6:00 
GeneralRe: SQL Replace Function - error recognizing two or more strings Pin
PhilLenoir18-Nov-14 10:41
professionalPhilLenoir18-Nov-14 10:41 
GeneralRe: SQL Replace Function - error recognizing two or more strings Pin
miss78620-Nov-14 1:45
miss78620-Nov-14 1:45 
GeneralRe: SQL Replace Function - error recognizing two or more strings Pin
PhilLenoir20-Nov-14 3:13
professionalPhilLenoir20-Nov-14 3:13 
AnswerRe: SQL Replace Function - error recognizing two or more strings Pin
PhilLenoir18-Nov-14 3:41
professionalPhilLenoir18-Nov-14 3:41 
Questionsuggest various tables for shopping site Pin
smart_vikas12-Nov-14 18:53
smart_vikas12-Nov-14 18:53 
AnswerRe: suggest various tables for shopping site Pin
Jörgen Andersson12-Nov-14 19:59
professionalJörgen Andersson12-Nov-14 19:59 

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.