ODBC and DAO connection problem

ODBC and DAO connection problem

Post by sschaff.. » Sat, 10 Feb 2001 03:07:44

 I'm connecting to a MS SQL Server Database with VB using DAO.
it's connecting and reading fine, but when ever I try to edit, I get
this error "Run-time error '3027': Can't update. Database or object is

my opendatebase looks like this:
Set MyDatabase = OpenDatabase("", dbDriverNoPrompt,
False, "ODBC;DSN=mydbdsn;UID=xxx;PWD=xxx;")

my openrecordset looks like this:
Set myrec = MyDatabase.OpenRecordset("Select * from MyTable",

any help is greatly appreciated

Sent via Deja.com


1. Query read-only connection with ODBC using DAO?

Is this possible?

I have a VB app which connects to an Oracle database through ODBC using
DAO.  I am using Intersolv's ODBC drivers.  I have a login screen where the
user enters an Oracle userid and password to sign on.  Since Oracle has the
capability of assigning 'read-only' userids, I was wonder if, after I make
the connection, there was a way I can query the Connection object (or
something else) to find out the user has read-only access.

What I'd like to do is disable some screen fields if the user connects with
a read-only userid.  I am quite certain doing this would be much easier if
I had used the ODBC API, but since I am using DAO I am wondering if anyone
has tried this or has any recommendations.

By the way, the flag you can specify while opening a connection which
indicates the connection should be read-only *does not* work.  You are
still allowed to make updates.  Even if it did, I'd rather query the DAO
object to see if the user is connected read-only as opposed to hard-coding
a special userid into my login screen that will make a read-only connection

2. Little question

3. DAO and ADO connection for ODBC Oracle Databases

4. *** Free Help with Designer and Developer 2000 ***

5. DAO caches UID and PWD for a given ODBC connection

6. CdbDatabase class

7. Handle of an ODBC connection via DAO ?

8. Display Forms on Startup

9. Counting TableDefs in a DAO ODBC Connection

10. SQL Server 7 And DAO ODBC Connection in VB5

11. Help: Connection to Oracle tables via ODBC/JET/DAO

12. Connection DAO with ODBC

13. Question on ODBC Connection with DAO