VB ODBC updata

VB ODBC updata

Post by Da » Tue, 21 Jul 1998 04:00:00

Trying to update a database through a system DSN using:

    Dim wrkspace As Workspace
    Dim dbsSnap As Connection
    Dim rstTemp As Recordset

    Set wrkspace = CreateWorkspace("ODBCWorkspace", "admin", "",

    Set dbsSnap = wrkspace.OpenConnection("snapDB", _
        dbDriverCompleteRequired, False, _

   Set rstTemp = dbsSnap.OpenRecordset("info", dbOpenDynamic,

    MsgBox (rstTemp.RecordCount)

    MsgBox (rstTemp.Updatable)   'gives false, want true

    rstTemp.Edit  'error on this line (database is read-only)
    rstTemp!output1 = "myOutput"
    rstTemp.Bookmark = rstTemp.LastModified


End Sub

The database was set up to be not read-only.  I can't seem to figure
out why I can only read the data.  In the docs it said something about
indexing your table, I indexed it with an autonumber in access but
that made no difference.  I'm thinking that maybe I have to index it
in VB  somehow?

Please let me know if you have any knowledge on this, I'm sure it's
some small thing somewhere.


1. Upgrading VB 3\ODBC 2.0 to VB 5.0\ODBC 2.5 with MS SQL 6.5 database

I am upgrading an application from Visual Basic 3 (ODBC 2.0) with third
party VBX controls using Microsoft SQL Server 6.5 to Visual Basic 5
(ODBC 2.5). I have been able to connect to the database using ODBC calls
and submit queries to update,delete and insert records with the
SQLExecDirect function. The problem I have encountered is when I issue
certain ODBC commands such as SQLFetch or SQLFreeStmt, VB 5 issues a
execution error regarding the entry point for these functions were not
found in the ODBC32.dll. Do you know what may cause this problem. Is
ODBC 3.0 a more appropriate choice for upgrading from ODBC 2.0 .

Walter Piagno

2. Running an .sql file via Server Agent

3. updata data in linked server

4. Executing sql

5. Updata Statistics vs reinsex

6. Open Cursor with dynamic SQL

7. unable to updata the data on the subscriber!!!

8. problem in updata a recordset

9. Updata JOIN based Query in Access

10. Text - ODBC Driver - VB 3.0 to VB 4.0