
ADO using MS Access with mdw system database for pw-access
Hi Kjell
Quote:
> In the help file I find this about adOpenStatic: "Static cursor. A static
> copy of a set of records that you can use to find data or generate
reports.
> Additions, changes, or deletions by other users are not visible." I
thought
> this might mean additions are possible, but other users of the database
> won't see the update in real time.
This means that if you open a static recordset and other users on the LAN
open and update recordset you don't see the changes in your own recordset.
Error number: -2147217911
To resolve this problem, grant users the appropriate permissions.
--
Vctor Koch.
Quote:
> In the help file I find this about adOpenStatic: "Static cursor. A static
> copy of a set of records that you can use to find data or generate
reports.
> Additions, changes, or deletions by other users are not visible." I
thought
> this might mean additions are possible, but other users of the database
> won't see the update in real time. - Well I have changed it to
> adOpenKeyset - BUT...:
> Using adOpenKeyset I still get this error message:
> Error number: -2147217911; Can't update. Database or object is
read-only.
> The database is not read-only; I have a DAO-vaersion of the same program,
> accessing the same database - with no problems. But after converting the
> program to ADO I cannot update the database anymore!
> Kjell Weding
> > Hi Kjell, CursorType = adOpenStatic is read only, use CursorType =
> > adOpenDynamic or adOpenKeyset if you want addnew or edit the recordset.
> > rec1.Open sSQL, cnn, adOpenDynamic, adLockOptimistic
> > --
> > Vctor Koch From Argentina.
> > > In VB 6.0 I open the database Mybase.mdb using ADO. This is the
> connection
> > > string:
> > > Provider=Microsoft.Jet.OLEDB.3.51;
> > > Data Source=C:\MyFolder\Mybase.MDB;
> > > Persist Security Info=False;
> > > User Id=MyUser;
> > > Password=MyPW;
> > > Jet OLEDB:System database=C:\Myfolder\Mysys.mdw;
> > > The database is opened and everything seemes to be OK - but as soon as
I
> > > want to sve data into the database (new/edit) the program generates an
> > error
> > > telling me that the database is read-only...
> > > This is the routine:
> > > Dim rec1 As ADODB.Recordset
> > > Dim cnn As ADODB.Connection
> > > Dim sSQL As String
> > > sConn = "Provider... (see above)..."
> > > cnn.Open sConn
> > > sSQL = "SELECT * FROM mytable;"
> > > rec1.Open sSQL, cnn, adOpenStatic, adLockOptimistic
> > > rec1.AddNew
> > > Anyone out there with a good idea???
> > > Kjell Weding