connection using udl

J

Jörg Werner

I'm using ACC2000 and SQL Server 2000.
The main form uses three subforms. .
In the open event of the main form I set the current connection.

CurrentProject.OpenConnection ConnectionString

After that I want to assign the recordsources for the subforms.

frmSub1.Form.RecordSource = "sp_GetSomeData"

But it does't work. I always get the error message:
2101: the setting you entered isn't valid for this property

What's wrong?

Thanks

Jörg
 
S

Sylvain Lafontaine

There is numerous bug with Access 2000 ADP. Upgrading to Acc2002 or 2003
will help you a lot.

From now, you can try adding the prefixe "dbo" as in: .RecordSource =
"dbo.sp_GetSomeData". Trying with EXEC or call may also help:
..RecordSource = "EXEC dbo.sp_GetSomeData"

Also, you shouldn't prefixe the names of your stored procedures with "sp_" .
This prefixe is reserved for system stored procedures and cause SQL Serve to
change the way it compiles theses stored procedures. Using it for your own
stored procedures can lead to some serious near-intractable bugs and a
diminution of performance. See the BOL for more information.

S. L.
 
A

aligök

Jörg Werner said:
I'm using ACC2000 and SQL Server 2000.
The main form uses three subforms. .
In the open event of the main form I set the current connection.

CurrentProject.OpenConnection ConnectionString

After that I want to assign the recordsources for the subforms.

frmSub1.Form.RecordSource = "sp_GetSomeData"

But it does't work. I always get the error message:
2101: the setting you entered isn't valid for this property

What's wrong?

Thanks

Jörg
 

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

Top