string SelectProperty_ID = "SELECT Max(Property_ID) FROM Property"; SqlCommand property_id_Command = new SqlCommand(SelectProperty_ID, connect1); SqlDataReader readProperty_ID; try { connect1.Open();//make connection readProperty_ID = property_id_Command.ExecuteReader(); readProperty_ID.Read(); lblSpecial.Text = readProperty_ID["Property_ID"].ToString(); readProperty_ID.Close(); } catch (Exception error) { Label1.Text = "Error Readin.......etc
SELECT MAX(Property_ID) \"Property_ID\" FROM Property
SELECT MAX(Property_ID) "\Property_ID\" FROM Property
try { connect1.Open();//make connection readProperty_ID = property_id_Command.ExecuteReader(); while(readProperty_ID.Read()) { lblSpecial.Text = readProperty_ID["Property_ID"].ToString(); } readProperty_ID.Close(); } catch (Exception error) { Label1.Text = "Error Readin.......etc
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)