Problems adding new records to ODBC source (dBASE III dbf's) 
Author Message
 Problems adding new records to ODBC source (dBASE III dbf's)

Hi all,

my problems probably are of the beginners type, as I'm new to programming
VB3 apps. But I didn't find anything in this group nor in the FAQ, so
here goes my question:

I'm trying to open an ODBC source, that I've set up to use dBASE III
compatible database file, in order to add new records to it. My code looks
something like this:

  Dim D as DataBase
  Dim S as DynaSet

  D=OpenDataBase("data", False, False, "ODBC")
  S=D.CreateDynaset("SELECT * from stamm")

  S.AddNew ("Name")

where data is the name of my ODBC source and stamm is one of the DBF's
contained in the specified directory (Name is a field in stamm).
I checked to have the right version of dBASE Files (III) in the ODBC setup
as weel as having and specifying a unique index to stamm.

With VB3Pro opening and reading from the database is no problem, but when
I try to add a new record, I get: Operation not allowd; it is illegal.
Then I checked the Updatable flag of the dynaset, and it was set to false,
so the error message is correct. But I can't set this flag at run-time,
so what am I doing wrong?

In addition to that, I ftp'd the new comlyr.exe from MS, in order to see,
if it's installation would affect anything; and yes, it did.
Now, I can't even open the data source (I get a reserved error with no
error number).

Please help me, if you know of any tricks or additional configuration (any
environment variables to set?, any special settings in the ODBC.INI file?)

Thank You


  Philipp Schmitz
  I. Physikalisches Institut
  Universitaet zu Koeln                Voice: +49 221 470 3548
  Zuelpicher Strasse 77                Fax  : +49 221 470 5162


Sun, 25 May 1997 23:41:15 GMT  
 [ 1 post ] 

 Relevant Pages 

1. connecting to dBase III dbf table with VB 6

2. Create a .dbf(dbase III) database

3. HELP: Mail merge in VB5.0 between dbase III .dbf and Word 7.0 .doc

4. Using .DBF DBASE III files and Deleting

5. ADO connection string for Dbase III file (*.dbf)

6. HELP: Mail merge in VB5.0 between dbase III .dbf and Word 7.0 .doc

7. Adding new record to DBF in VB6

8. ADO2.5, can't add new record to an empty table using record binding

9. Opening and adding to DBase III file

10. Cannot add fields to dBASE III table

11. Import DBase III records through VB

12. Adding field to the current source does'nt add source to FROM clause


Powered by phpBB® Forum Software