- First you have to declare it with board rate 9600 Serial.begin(9600); - Then we check is serial port is available. If available then we write data to it. if (Serial.available()>0) { Serial.Write(byte data); }
For generating the random rows from the data set first you have to generate the random numbae and this number is pass to the dataset CODE: SqlConnection con = new SqlConnection("Data Source=NIRAV-PC;Initial Catalog=Student;Integrated Security=True"); con.Open(); string str = "select * from StudentDetail"; SqlCommand cmd =new SqlCommand(str,con); SqlDataAdapter sda = new SqlDataAdapter(cmd); DataSet ds =new DataSet(); sda.Fill(ds); Random RandomNumber = new Random(); ...
For getting the length of string in NAV we use STRLEN() function write following code in code unit under ‘On Run’ trigger and then run it. MESSAGE(format(STRLEN('Hello-Guys'))); Note: here we also use FORMAT() function because we STRLEN() function gives integer value so we convert it to string and the display it. OUTPUT:
Comments
Post a Comment