Hi all,
I have written following procedure in MySql.I want to insert record if it is not exist in table or update it if it is already exist.
But when i call it from C# code to fetch data from XMl file, it gives error as "Cannot isert record" because in table sid is Primary Key.
Please Help...
DELIMITER $$
DROP PROCEDURE IF EXISTS `dbsims`.`SystemInfoInsert` $$
CREATE PROCEDURE `dbsims`.`SystemInfoInsert`
(
IN p_sid varchar(100),
IN p_host_name varchar(20),
IN p_ip varchar(20),
IN p_solution varchar(50)
)
BEGIN
IF EXISTS(select * from system_info where sid = p_sid) THEN
UPDATE system_info set sid=p_sid, host_name=p_host_name, ip=p_ip, solution=p_solution;
ELSE
INSERT INTO system_info
(
sid,
host_name,
ip,
solution,
last_updated_date
)
VALUES
(
p_sid,
p_host_name,
p_ip,
p_solution,
NOW()
);
END IF;
END $$
DELIMITER ;
Answers (2)
0
http://www.devx.com/dotnet/Article/6997/0/page/1
0
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbconinternationalizingapplications.asp
0
http://www.microsoft.com/globaldev/
0
https://www.aspsnippets.com/Articles/ASPNet-Multilingual-website-Support-and-display-Multiple-Languages-English-French-in-ASPNet.aspx