Problem with Read only in ODBC 
Author Message
 Problem with Read only in ODBC

Hi!

I have a problem with my database creating a connection using
createworkspace
and openconnection method I'm opening the database and if I read the db all
is ok,
but if I try to modify (<recordset>.edit) an error occurs, it says that I
opened the
database for read only but I never set any permissions.

Here's the code

    Set wrkODBC = CreateWorkspace("NuevoWorkspaceODBC", _
        "admin", "", dbUseODBC)

    Set ArchivoRecursoOperacion = wrkODBC.OpenConnection("MiConexion",
dbDriverNoPrompt, False, _
        "ODBC;DSN=" & IIf(varMasterSlave = 0, varODBCMaster, varODBCSlave) &
";")

strSQLQuery = "SELECT * FROM NOMINA WHERE NUMEROEMPLEADO = " & Quote &
varNumeroEmpleado & Quote & _
            " AND NUMEROCAJERO = " & varNumeroCajero & " AND CLAVEPENSION <>
'  '" & _
            " AND STATUSPAGADO = FALSE "

   Set rsNomina = ArchivoRecursoOperacion.OpenRecordset(strSQLQuery,
dbOpenDynamic)
    With rsNomina
        If Not (.EOF And .BOF) Then
            .MoveFirst
            Do While Not .EOF
                .Edit<-----------------Here I have an error as follows

  "3027 Can't update.  Database or object is read-only."

Any idea?

Thanks in advance



Sat, 25 Oct 2003 08:56:19 GMT  
 Problem with Read only in ODBC
Could it be that you are working with an MS Access .MDB file that is disk
write protected?


Sat, 25 Oct 2003 19:18:32 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ODBC and DAO Read Only problem

2. Problem with ODBC/VB6 read-only error (newbie)

3. Problem reading AS/400 double byte data via ODBC

4. ODBC Problem can't just read from my database

5. ODBC Read-only problem

6. Problem with ODBC/VB6 read-only error (newbie)

7. ODBC Problem can't just read from my database

8. problem with ODBC in Excel 5.0 using VBA and ODBC API

9. Make ODBC table read-only?

10. Reading via ODBC, direct updates do not show up

11. Read ODBC entreys

12. Read Excel 5.0 File with ODBC-DSN

 

 
Powered by phpBB® Forum Software