sql server - SQL query in C#, invalid object name T_Server_Info -
there table named t_server_info
in database, when try run code executing sql query in c#, error:
invalid object name t_server_info
here code:
private void add_click(object sender, eventargs e) { string constring = @"data source=inpddba027\ngep;initial catalog=dev_server;integrated security=true"; try { con = new sqlconnection(constring); con.open(); cmd = new sqlcommand(@"insert t_server_info(fs_uid,server_name) values(@fs_uid,@server_name)", con); cmd.parameters.addwithvalue("@fs_uid", uid.text); cmd.parameters.addwithvalue("@server_name", uid.text); cmd.executenonquery(); } catch (exception ex) { messagebox.show(ex.message); } }
please help.
Comments
Post a Comment