Hello,
Has anyone got an idea how to execute sql queries longer than 1024 characters using ADO in Navision.
The query I want to executed is generated dynamically during run-time, so stored procedures do not help here.
What I did: I output the generated sql to text file and then used special my written automation server (SQLFileExecuterX) which executes text files as sql queries...
But I thought, maybe somehow it is possible to do that without using SQLFileExecuterX, but using such features like BIGTEXT or Stream, or at least some standard software which goes together with navision/ado/windows...?
huh?
0
Answers
BSTRConverter is used to handle long text and has a method which returns BSTR type result. You can pass that result to ADO Recordset...
http://navisionfreak.blogspot.com/
Justas Janauskas
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
xp_execresultset is removed from sql 2005
and ADORecordset.Open(NavHash.BSTR); errors with
Any other solution?
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Changed to
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I'm using this technique to automatically generate some rather large trigger code, about 128K in 3000 lines for example.
You probably want to use BSTRConverter to build the string to avoid the horrible quoting issues.
BTW: for the record, VBScript does seem to be the answer to any little problems you may have with Navision ...
TVision Technology Ltd
xmlTextNode.appendData(query1);
xmlTextNode.appendData(query2);
xmlTextNode.appendData(query3);
xmlTextNode.appendData(query4);
xmlTextNode.appendData(query5);
xmlTextNode.appendData(query6);
xmlTextNode.appendData(query7);
adoRs.Open(xmlTextNode.nodeValue, adoConn);
Nav, T-SQL.