Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error when opening recordset of SQL Server via ADO
We're trying to upsize from MS Jet (Access) db to SQL Server and am having a
major problem. This may be SQL Server - related, but I'll post here as well in case anyone else has seen this. The servername is "sqlbox" and the database name is "TCR". We use WinNT authentication on the db and have a user profile for all our domain users. The connection string executes, but the query does not. If the VBA Project is unlocked, an error stating "Application Error...Unspecified Error" occurs at the line noted below (---). When the VBA Project is locked (normally), the error states "Invalid object name" and then lists the database table (in this example, "Version"). Here's the pertinent code: strConn = "Provider=SQLOLEDB;Data Source=sqlbox;" & _ "Persist Security Info=False;Initial Catalog=TCR;" & _ "Integrated Security=SSPI" Set adoConn = New ADODB.Connection adoConn.ConnectionString = strConn adoConn.Open strSQL = "SELECT * from Version WHERE Version.Filename = '" & strFname & "';" ' open a recordset from Version table Set adoRec = New ADODB.Recordset adoRec.CursorLocation = adUseClient --- adoRec.Open strSQL, adoConn <--- Error occurs here I can run the application without problems; perhaps it is because I am the dbowner (which implicitly grants me full access to the tables). However, I have granted full access to the Domain User profile without success by any other user. Unless I find a way to solve this, there will be no migration! Thanks in advance! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem opening files from server | New Users to Excel | |||
Excel 2003 Error Cannot Locate the Internet Server or Proxy Server | Excel Discussion (Misc queries) | |||
ADO recordset error | Excel Programming | |||
Recordset Opening Excel File | Excel Programming |