odbc openrecordset = readonly ? 
Author Message
 odbc openrecordset = readonly ?

I am having trouble converting from Jet to odbc. I can only open a recordset
that is read only. The database is opended and updateable = true. However,
no matter how I try to open a recordset, it's read only. What am I doing
wrong? Thanks in advance

    cMdb = "DATABASE = YE;"
    cUID = "UID=;"
    cDSN = "DSN=MS Access 7.0 Database;"
    cDBQ = "DBQ=" & App.Path & "\YE.MDB;"
    cPWD = "PWD=;"
    sCONNECT = "ODBC;" & cMdb & cUID & cPWD & cDSN & cDBQ

    On Error GoTo open_err
    Set Form2.GlbWrkODBC = CreateWorkspace("", "", "", dbUseODBC)
    Set conYe = Form2.GlbWrkODBC.OpenConnection("", False, False, sCONNECT)

    Set Form2.gblYeMdb = conYe.Database

  in another module.....

sqlSched = "select * from " & strTableName & ";"
strTableName = "sched_D2"

    Set rsSched = Form2.gblYeMdb.OpenRecordset(sqlSched, dbOpenDynamic,
False)

    Set rsSched2 = Form2.gblYeMdb.OpenRecordset(strTableName, dbOpenDynaset,
False)

neither sets work!!!!



Thu, 14 Feb 2002 03:00:00 GMT  
 odbc openrecordset = readonly ?
Try:

Set rsSched2 = Form2.gblYeMdb.OpenRecordset(strTableName, dbOpenDynaset,
,dbOptimistic)

or just:

Set rsSched2 = Form2.gblYeMdb.OpenRecordset(strTableName, dbOpenDynaset)

Why did you put false for the options parameter?

--
Matthew Arnheiter
Flash Creative Management
http://www.flashcreative.com



Thu, 14 Feb 2002 03:00:00 GMT  
 odbc openrecordset = readonly ?
Set Mode: Read/write in the connection string

Hope this help!

--
Khalid S. Al-Khater

www.khalidalkhater.net



Sun, 17 Feb 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. odbc openrecordset = readonly ?

2. ODBC data readonly, why???

3. ODBC data readonly, why???

4. Providing ODBC data readonly

5. Need help on odbc openrecordset

6. Help! using a datacontrol, openrecordset, and ODBC

7. Type mismatch with OpenRecordset() while connected to ODBC DB.

8. OpenRecordset with DAO/ODBC

9. Database readonly - only it's not readonly

10. VB5.0 MS-SQL6.5 New recordset from openrecordset is readonly !?

11. VB5.0 MS-SQL6.5 New recordset from openrecordset is readonly !?

12. Access ReadOnly Warning Message

 

 
Powered by phpBB® Forum Software