Showing results for 
Search instead for 
Do you mean 

actreader account - help with OLEDB connection in VB

New Member
Posts: 7
Country: USA

actreader account - help with OLEDB connection in VB

Hi.  I have read the documentation about the actreader account for connecting to an ACT database.  I ran the actreader.exe utility and created a password for this account as per the instructions.  I was then able to create a connection string which uses the actreader account.  Everything seems to be working except that I get no results back.  In Visual Studio, I can run the same query and get data returned.  I'm wondering if perhaps I am not using the correct syntax for the SQL.  Are the table and column names different when using the actreader account?


Below is the code I have.  I'm not getting any errors, just no results are being returned.  If anyone can point me in the right direction for using the actreader account to retrieve data via an OLEDB connection, it would be greatly appreciated.


Dim conACT As New OleDbConnection
Dim comACT As New OleDbCommand
Dim dsAct As New DataSet
Dim daAct As New OleDbDataAdapter

'* Configure connection object
conACT.ConnectionString = "Provider=SQLOLEDB;Data Source=289614-APP1\ACT7;User ID=actreader;Password=xxxxxx;Initial Catalog=SchillerGroundsCareDev"

'* Configure command object
comACT.Connection = conACT
comACT.CommandType = CommandType.Text

'* Configure data adapter
daAct.SelectCommand = comACT

'* Open the connection

'* Execute the SQL and fill a dataset table with query results
daAct.Fill(dsAct, "Companies")

'* Bind query results to combo box
dataGrid1.DataSource = dsAct.Tables("Companies")

'* Close the connection



Posts: 1,163
Country: USA

Re: actreader account - help with OLEDB connection in VB

The ActReader account is used to gain access to an ODBC connection, not OLEDB. 


You can connect to the OLEDBv2 Reporting Provider like so:


OleDbConnection connection = new OleDbConnection(ActApp.ActFramework.CurrentACTOLEDB2);


This will connect to the provider as the currently logged in user and respect the security of the said user. 

Matthew Wood
Act! SDK Support
Community Moderator
Posts: 34
Country: USA

Re: actreader account - help with OLEDB connection in VB

Also, the OLEDB connection uses the views, not the tables.  So your query would be Select Name from Company order by Name.  


Or, use an ODBC connection for ActReader and your query will be correct.