Posted on: 12/17/2013 8:36:27 AM | Views : 729

Dear All,

i had select a data from SQL Database, now i want write  an operation condition, but it had an error, kindly advise, thank you.

protected void TransID() { string UniIDSQL = "SELECT ISNULL(MAX(CAST(INV_TRANS_ID AS INT)),0) AS TRANSID FROM OTH_INV_TRANSACTION"; SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["CIMProRPT01ConnectionString"].ConnectionString); SqlCommand cmd = new SqlCommand(UniIDSQL, con); SqlDataReader reader; { if (WMFENewID = "0" Then WMFENewID = 1) else WMFENewID = WMFENewID + 1; } try { con.Open(); reader = cmd.ExecuteReader(); reader.Read() ...

Go to the complete details ...