Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

The Automation Variable has not been instantiated.

$
0
0
Hello,

I am trying to use the automation control to retrieve data from a database as per the following codes:
I am able to compile the code successfully but when running the page, I am getting the error: The Automation Variable has not been instantiated.

Version : NAV 2013 R2.


ConnectionString := 'PROVIDER=SQLOLEDB;SERVER=' + ServerName + ';DATABASE='+DatabaseName+';UID='+USER+';PWD='+Password;

IF ISCLEAR(ADOConnection) THEN BEGIN
IF NOT CREATE(ADOConnection,FALSE,TRUE) THEN BEGIN
ERROR('Cannot create ADO Connection automation variable');
END;
END;

IF ISCLEAR(ADORecordSet) THEN BEGIN
IF NOT CREATE(ADORecordSet,FALSE,TRUE) THEN BEGIN
ERROR('Cannot create ADO Recordset automation variable');
END;
END;

ADOConnection.ConnectionString(ConnectionString);
ADOConnection.Open;


While debugging the code is breaking at IF NOT CREATE(ADOConnection,FALSE,TRUE) THEN BEGIN

Can you please help.

Thanks
Bhavna

Viewing all articles
Browse latest Browse all 10032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>