I am new with recordsets , error:table not found

G

Guest

hello all
I am trying to run the follwing code but I am getting the error object dbo_study_design not found.it looks like i am being connected to the database but Iwonder why table is not found. i am using recordsets for the first time. if some one can look at the code then it would be very helpful. thanks in advanc

Dim con As ADODB.Connectio
Dim conString As Strin
Dim strSql_Parent As Strin

strSql_Parent = "SELECT Parent_ID FROM dbo_study_design
Set con = New ADODB.Connectio
conString = "Driver={SQL Server};Server=mgarg;DataBase=hello;Uid=;Pwd=;
con.connectionstring = conStrin
con.Ope
Set rst = New ADODB.Recordse
rst.Open strSql_Parent, con, adOpenForwardOnly, adLockReadOnly, adCmdTex
rst.MoveFirs
'Begin loo
Looper
'loop through the dbo_Study_Design tabl
Do While Not rst.EO

'Set myparent equal to the Parent_ID field of the dbo_Study_Design tabl
myparent = rst.Fields("Parent_ID"
List0.RowSource = myparen

Loo
rst.MoveNex

End Su
 
A

Alex Ivanov

SELECT Parent_ID FROM study_design?
The table name should be study_design. Access prependes local names for SQL
server linked tables with "ownername_" and simple cut-and-paste from Access
Queries may not work.

Alex.

mgarg said:
hello all,
I am trying to run the follwing code but I am getting the error object
dbo_study_design not found.it looks like i am being connected to the
database but Iwonder why table is not found. i am using recordsets for the
first time. if some one can look at the code then it would be very helpful.
thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top