Forum Discussion

Veroniquelu's avatar
Veroniquelu
Contributor
9 years ago

recordset does not support left join

Just found out if there is left join in your query , you won't be able to use below function.

It returned an error like "Error: Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype. "

 

Just wanted to share in the community, Please correct me if I am wrong.

 

 

 

function GetDataFromDB (sql,ColumnName1,ColumnName2)
{


var conn = new ActiveXObject("ADODB.Connection");
webPageObj = Sys.Browser("iexplore*").Page("*");
conn.Open = "Driver=SQL Server Native Client 11.0;Data Source="+ProjectSuite.Variables.dbserver+";Initial Catalog="+ProjectSuite.Variables.database+";Trusted_Connection=Yes";
Log.Message(sql);
conn.execute(sql);
var RecSetData = new ActiveXObject("ADODB.Recordset");
RecSetData.Open(sql,conn);
RecSetData.MoveFirst();
while (!RecSetData.EOF)
{
var RecSetDataP1 =[];
var RecSetDataP2 =[];
i=0;i++;
RecSetDataP1[i]= RecSetData.Fields(ColumnName1).Value;
RecSetDataP2[i]=RecSetData.Fields(ColumnName2).Value;
RecSetData.MoveNext()
var NodeID = aqString.ToLower(RecSetDataP1[i]);
NodeID = NodeID.substring(1,NodeID.length - 1);
var Name = RecSetDataP2[i]
}

RecSetData.Close();
conn.Close();
return {NodeID:NodeID,Name:Name};

}

No RepliesBe the first to reply