Problem accessing SQL Server with VB5 via DAO

Problem accessing SQL Server with VB5 via DAO

Post by Keith Woodbur » Mon, 15 Feb 1999 04:00:00

I have code that will properly access (Select) data via ODBC from SQL
server 6.5 using DAO, but when I try to edit any of the fields (and
issue an edit then update) VB says that it is read only.  I opened the
connection via DAO with a dynaset recordsetType and there is an index
created in SQL server for this table with a primary key. Does anyone
have any ideas? I would use RDO, but I don't have the enterprise edition
of VB. If I wanted to update records on the form and then have them
updated in SQL what would be the proper statements?

This is my main form  statement...
Private Sub Form_Load()
    With datPrimaryRS
    .RecordSource = "Select * from utblProject ORDER By ProjectID"
    .RecordsetType = 2 ' dbOpenDynaset (I have also tried this with a 1
- and had the same problem)
    .Connect = "ODBC;DSN=CCISVB;UID=sa;PWD=;APP=Visual
    txtNumRecs = .Recordset.RecordCount
   End With
End Sub


1. btrieve access via DAO in VB5

There doesn't seem to be a way to get a data control to access a btrieve
data file. The options are vast for various Excel and Paradox formats, but
nothing for Btrieve, even though it's listed as an ISAM format which is
supported by the DAO in the Microsoft help file.

Any way to do this? Is there a file I need to download?

Steve Brown

2. Does NewEra Support XA

3. Printing MS-Access Reports from VB5 via DAO

4. Spell checking using the Windows Dist. Kit

5. Access DB via VB5/DAO

6. New web site for performance and capacity planning

7. DAO 2.5 to DAO 3.5 and Access 2.0 to Access 97 Answers and Questions (VB5)

8. Fastest Deletion Of Entire Table Contents

9. VB5, SQL Server and DAO - Pretty odd problem

10. Problem: VB5, Access, DAO and Data Controls

11. VB5 and Access via Active Server Pages

12. Data base access problems MS SQL Server 7.0 from VB5 applications