Using adobe javascript i am executing a sql query to fetch data from mysql table which is of datatype VARCHAR. Below is the code snippet (i have removed the loop and provided the code):
var conn = ADBC.newConnection("TestdB"); //TestdB is the DSN configured name
var statement = conn.newStatement();
var query = "SELECT Name FROM loads WHERE ProjectID = 10;"; //loads is the table name and Name is the column name in loads, so is ProjectID
statement.execute(query);
statement.nextRow();
var row = statement.getRow();
var b = row.Name.value;
console.println(b);
The value returned when row.Name.value is some charaters as shown below:
㍁〵䍟剅ㅔ䵟䍆彌ㅘ
and when row.Name.valueAsString is given then the return value is undefined.
Please help me to print the Name (for e.g Mango in var b).
ID ProjectID Name
1 10 Mango
2 10 Orange