Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RECORDSET ISSUE .ADP

Status
Not open for further replies.

rkep

Programmer
Joined
Apr 26, 2007
Messages
7
Location
US

I have the following code which in one program works fine, but i am now experiencing "Invalid object name 'dbo.mpe' and cannot get around this, am i missing something or can anyone see whats causing the issue?? i have verified all references and security. Thanks

Dim Conn As ADODB.Connection
Dim rs As New ADODB.Recordset
Dim strSQL As String
Set Conn = CurrentProject.Connection
Set rs = New ADODB.Recordset
strSQL = "Select * from dbo.mpe"
rs.Open strSQL, Conn, adOpenKeyset
rs.MoveFirst
Do Until rs.EOF
Dim strhdr1 As String
strhdr1 = rs![nom1]
Dim strhdr2 As String
strhdr2 = rs![nom2] & ";" & rs![dirE]
Dim strhdr3 As String
strhdr3 = rs![hr1E] & ";" & rs![he2E]
 
Does the CurrentProject.Connection really point to a SQL-Server database having a table/view named dbo.mpe ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
yes i create this table in a previous step and for testing purposes it has about 10 records in it.
 
my table name on the server was dbo.MPe so i changed my code to caps and it worked, thanks for the help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top