I'm trying to connect to a SQL Server 6.5 Database with the following code:
Option Explicit
Private Sub Form_Load()
Dim cn As Connection
Dim rs As Recordset
Set cn = New Connection
cn.Open "Provider=SQLOLEDB.1;Password=firmlink;Persist Security Info=True;User ID=firmlink;Initial Catalog=FirmLink;Data Source=SQLTEMP"
Set rs = New Recordset
rs.Open "FIRMLINK", cn, adOpenForwardOnly, adLockReadOnly
cn.Close
Set cn = Nothing
Set rs = Nothing
End Sub
I know this will work because I had it working when creating a Data Project, but when I do it this way I get an error that says 'Execute Permission denied on object FIRMLINK, database FirmLink, owner dbo' I know I have access to this, what could be going wrong?
Thanks
Option Explicit
Private Sub Form_Load()
Dim cn As Connection
Dim rs As Recordset
Set cn = New Connection
cn.Open "Provider=SQLOLEDB.1;Password=firmlink;Persist Security Info=True;User ID=firmlink;Initial Catalog=FirmLink;Data Source=SQLTEMP"
Set rs = New Recordset
rs.Open "FIRMLINK", cn, adOpenForwardOnly, adLockReadOnly
cn.Close
Set cn = Nothing
Set rs = Nothing
End Sub
I know this will work because I had it working when creating a Data Project, but when I do it this way I get an error that says 'Execute Permission denied on object FIRMLINK, database FirmLink, owner dbo' I know I have access to this, what could be going wrong?
Thanks