create function[dbo].[book_id](@id int) return char(12) as begin return 'bkooID'+right('00000'+convert(varchar(10),@id),5) end
this is my sqlconnection code SqlConnection con; SqlCommand cmd; string str = ConfigurationManager.ConnectionStrings["connect"].ConnectionString; protected void btnSubmit_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(str); }