Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VB 5.0 & DAO 3.5 and the VFP 5.0 ODBC driver
Message
From
18/02/1998 10:21:28
 
 
To
All
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Title:
VB 5.0 & DAO 3.5 and the VFP 5.0 ODBC driver
Miscellaneous
Thread ID:
00079553
Message ID:
00079553
Views:
78
I have a problem with the above and need some help.

We have had to move some parts of our application to VB 5.0, because certain third party OCXs are not supported by VFP (namely: Distinct TCP/IP controls). With this in mind, we need to connect to a VFP 5.0 database and it's various tables from our VB 5.0 application.

The VB 5.0 application needs to be able to add/edit and delete records in the VFP tables.

Using VB & DAO, we have been able to connect to a VFP 5.0 database, and read in a list of all the tables contained there-in. However when we then create a record set from one of those table it always appears to be read-only (at every level in the various collections - futhermore the UPDATABLE properties are all readonly as well), and therefore we are unable to achieve what we want. Sample of my code as shown below:

Private Sub Command1_Click()

Dim x As Integer

Set dbVFP = OpenDatabase("ODBC1", False, False, "DSN = ODBC1")

For x = 0 To dbVFP.TableDefs.Count - 1
List1.AddItem dbVFP.TableDefs(x).Name
Next


End Sub

Private Sub List1_DblClick()

Set rsVFP = dbVFP.OpenRecordset("SELECT cDescription FROM work", dbOpenDynaset, dbSeeChanges)

With rsVFP

.MoveFirst
.Edit
Debug.Print ![cdescription]
.Update

End With


At the .Edit line this fails.


Obviously I have checked the N/W file rights, ODBC set up, file in use, etc.

Any help would be appreciated.

James.
Next
Reply
Map
View

Click here to load this message in the networking platform